govisi commited on
Commit
d5a5e2a
1 Parent(s): 5bf88a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -15,8 +15,8 @@ bot = commands.Bot("", intents=discord.Intents(messages=True, guilds=True))
15
  async def on_ready():
16
  print(f'We have logged in as {bot.user}')
17
 
18
- @bot.event
19
- async def on_message(message):
20
  if message.author == bot.user:
21
  return
22
 
@@ -24,7 +24,7 @@ async def on_message(message):
24
  print(message.content)
25
  # await message.channel.send(model_pipe.predict([message.content]))
26
  await message.channel.send('Hello from hugging face')
27
- await bot.process_commands(message)
28
 
29
  bot.env = "prod" # type: ignore
30
  bot.name = "testAniPin" # type: ignore
 
15
  async def on_ready():
16
  print(f'We have logged in as {bot.user}')
17
 
18
+ @bot.listen('on_message')
19
+ async def on_message_event(message):
20
  if message.author == bot.user:
21
  return
22
 
 
24
  print(message.content)
25
  # await message.channel.send(model_pipe.predict([message.content]))
26
  await message.channel.send('Hello from hugging face')
27
+ # await bot.process_commands(message)
28
 
29
  bot.env = "prod" # type: ignore
30
  bot.name = "testAniPin" # type: ignore