govisi commited on
Commit
e6f6ea0
1 Parent(s): d5a5e2a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -7,7 +7,7 @@ from threading import Thread
7
 
8
 
9
  load_dotenv()
10
- bot = commands.Bot("", intents=discord.Intents(messages=True, guilds=True))
11
 
12
  # model_pipe = pickle.load(open('pipe.pkl', 'rb'))
13
 
@@ -20,7 +20,7 @@ async def on_message_event(message):
20
  if message.author == bot.user:
21
  return
22
 
23
- if message.content.startswith('$hello'):
24
  print(message.content)
25
  # await message.channel.send(model_pipe.predict([message.content]))
26
  await message.channel.send('Hello from hugging face')
 
7
 
8
 
9
  load_dotenv()
10
+ bot = commands.Bot(command_prefix=commands.when_mentioned_or('$'), intents=discord.Intents.all())
11
 
12
  # model_pipe = pickle.load(open('pipe.pkl', 'rb'))
13
 
 
20
  if message.author == bot.user:
21
  return
22
 
23
+ if message.content:
24
  print(message.content)
25
  # await message.channel.send(model_pipe.predict([message.content]))
26
  await message.channel.send('Hello from hugging face')