wop commited on
Commit
68da665
1 Parent(s): 1a45034

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -23,14 +23,6 @@ async def wait(job):
23
  while not job.done():
24
  await asyncio.sleep(0.2)
25
 
26
- @bot.command()
27
- async def uptime(ctx):
28
- """Displays the uptime of the bot."""
29
- delta = datetime.datetime.utcnow() - bot.start_time
30
- hours, remainder = divmod(int(delta.total_seconds()), 3600)
31
- minutes, seconds = divmod(remainder, 60)
32
- days, hours = divmod(hours, 24)
33
- await ctx.send(f"Uptime: {days} days, {hours} hours, {minutes} minutes, {seconds} seconds")
34
 
35
  def get_client(session: Optional[str] = None) -> grc.Client:
36
  client = grc.Client("https://wop-xxx-opengpt.hf.space/", hf_token=HF_TOKEN)
@@ -50,6 +42,15 @@ def truncate_response(response: str) -> str:
50
  intents = discord.Intents.all()
51
  bot = commands.Bot(command_prefix="$", intents=intents)
52
 
 
 
 
 
 
 
 
 
 
53
 
54
  @bot.event
55
  async def on_ready():
 
23
  while not job.done():
24
  await asyncio.sleep(0.2)
25
 
 
 
 
 
 
 
 
 
26
 
27
  def get_client(session: Optional[str] = None) -> grc.Client:
28
  client = grc.Client("https://wop-xxx-opengpt.hf.space/", hf_token=HF_TOKEN)
 
42
  intents = discord.Intents.all()
43
  bot = commands.Bot(command_prefix="$", intents=intents)
44
 
45
+ @bot.command()
46
+ async def uptime(ctx):
47
+ """Displays the uptime of the bot."""
48
+ delta = datetime.datetime.utcnow() - bot.start_time
49
+ hours, remainder = divmod(int(delta.total_seconds()), 3600)
50
+ minutes, seconds = divmod(remainder, 60)
51
+ days, hours = divmod(hours, 24)
52
+ await ctx.send(f"Uptime: {days} days, {hours} hours, {minutes} minutes, {seconds} seconds")
53
+
54
 
55
  @bot.event
56
  async def on_ready():