govisi commited on
Commit
311f1d1
·
1 Parent(s): 8bc1849

add discord code

Browse files
Files changed (1) hide show
  1. app.py +19 -19
app.py CHANGED
@@ -1,26 +1,26 @@
1
- import os
2
- # import pickle
3
- import discord
4
 
5
- intents = discord.Intents.default()
6
- intents.message_content = True
7
 
8
- client = discord.Client(intents=intents)
9
 
10
- # model_pipe = pickle.load(open('pipe.pkl', 'rb'))
11
 
12
- @client.event
13
- async def on_ready():
14
- print(f'We have logged in as {client.user}')
15
 
16
- @client.event
17
- async def on_message(message):
18
- if message.author == client.user:
19
- return
20
 
21
- if message.content.startswith('$hello'):
22
- print(message.content)
23
- # await message.channel.send(model_pipe.predict([message.content]))
24
- await message.channel.send('Hello from hugging face')
25
 
26
- client.run("MTA3NjU3MDc3MDYzMDc5MTIxOA.GvxRm6.Lm7ZDPwrkmz0AqrUxkxTRXKcObCzswDMfNpCIc")
 
1
+ # import os
2
+ # # import pickle
3
+ # import discord
4
 
5
+ # intents = discord.Intents.default()
6
+ # intents.message_content = True
7
 
8
+ # client = discord.Client(intents=intents)
9
 
10
+ # # model_pipe = pickle.load(open('pipe.pkl', 'rb'))
11
 
12
+ # @client.event
13
+ # async def on_ready():
14
+ # print(f'We have logged in as {client.user}')
15
 
16
+ # @client.event
17
+ # async def on_message(message):
18
+ # if message.author == client.user:
19
+ # return
20
 
21
+ # if message.content.startswith('$hello'):
22
+ # print(message.content)
23
+ # # await message.channel.send(model_pipe.predict([message.content]))
24
+ # await message.channel.send('Hello from hugging face')
25
 
26
+ # client.run("MTA3NjU3MDc3MDYzMDc5MTIxOA.GvxRm6.Lm7ZDPwrkmz0AqrUxkxTRXKcObCzswDMfNpCIc")