govisi commited on
Commit
f80d9e5
1 Parent(s): 9abc4e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -2,10 +2,11 @@ import os, asyncio
2
  # import pickle
3
  import discord
4
  from discord.ext import commands
5
-
6
  from threading import Thread
7
 
8
 
 
9
  bot = commands.Bot("", intents=discord.Intents(messages=True, guilds=True))
10
 
11
 
@@ -30,5 +31,5 @@ async def on_message(message: discord.Message):
30
  # await message.channel.send(model_pipe.predict([message.content]))
31
  await message.channel.send('Hello from hugging face')
32
 
33
- t = Thread(target=bot.run, daemon=True, args=(os.getenv("discord_token"), ))
34
  t.start()
 
2
  # import pickle
3
  import discord
4
  from discord.ext import commands
5
+ from dotenv import load_dotenv
6
  from threading import Thread
7
 
8
 
9
+ load_dotenv()
10
  bot = commands.Bot("", intents=discord.Intents(messages=True, guilds=True))
11
 
12
 
 
31
  # await message.channel.send(model_pipe.predict([message.content]))
32
  await message.channel.send('Hello from hugging face')
33
 
34
+ t = Thread(target=bot.run, daemon=True, args=(os.getenv("discord_token")))
35
  t.start()