artintel235 commited on
Commit
7678033
·
verified ·
1 Parent(s): 49500f7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -2,6 +2,7 @@ import discord
2
  from discord import app_commands
3
  import os
4
  import asyncio
 
5
 
6
  DISCORD_BOT_TOKEN = os.getenv("DISCORD_BOT_TOKEN")
7
 
@@ -26,7 +27,11 @@ async def main():
26
  async with client:
27
  print("Starting client...")
28
  await client.start(DISCORD_BOT_TOKEN)
29
- print("Bot has stopped.")
 
 
 
 
30
 
31
  if __name__ == "__main__":
32
  print("Running main()")
 
2
  from discord import app_commands
3
  import os
4
  import asyncio
5
+ import time
6
 
7
  DISCORD_BOT_TOKEN = os.getenv("DISCORD_BOT_TOKEN")
8
 
 
27
  async with client:
28
  print("Starting client...")
29
  await client.start(DISCORD_BOT_TOKEN)
30
+ print("Bot has started.")
31
+
32
+ # Keep the main function alive:
33
+ while True:
34
+ await asyncio.sleep(60) # Sleep for 60 seconds
35
 
36
  if __name__ == "__main__":
37
  print("Running main()")