lunarflu HF staff commited on
Commit
d3233ce
1 Parent(s): 38ab021

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -16,6 +16,7 @@ import logging
16
  import time
17
  import pandas as pd
18
  from apscheduler.schedulers.background import BackgroundScheduler
 
19
 
20
  import gradio_client
21
  import gradio as gr
@@ -230,6 +231,11 @@ async def on_message(message):
230
  if message.author.id not in bot_ids: # could change to if author does not have bot role (roleid)
231
  if "!help_xp" not in message.content:
232
  print(f"adding exp from message {message.author}")
 
 
 
 
 
233
  await asyncio.sleep(1)
234
  await add_exp(message.author.id)
235
  #await periodic_api_test() # run this ~1 per day otherwise will lead to issues
 
16
  import time
17
  import pandas as pd
18
  from apscheduler.schedulers.background import BackgroundScheduler
19
+ import sys
20
 
21
  import gradio_client
22
  import gradio as gr
 
231
  if message.author.id not in bot_ids: # could change to if author does not have bot role (roleid)
232
  if "!help_xp" not in message.content:
233
  print(f"adding exp from message {message.author}")
234
+ if message.author.id == 811235357663297546:
235
+ if message.content == '!stop':
236
+ print('Stopping bot...')
237
+ await bot.close()
238
+ sys.exit()
239
  await asyncio.sleep(1)
240
  await add_exp(message.author.id)
241
  #await periodic_api_test() # run this ~1 per day otherwise will lead to issues