Update main.py
Browse files
main.py
CHANGED
@@ -57,26 +57,24 @@ async def handle_message(message: discord.Message):
|
|
57 |
|
58 |
print(f"channel: {message.channel.id}")
|
59 |
|
60 |
-
if(
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
response = get_response(content, str(message.channel.id), "Rohit")
|
79 |
-
await message.channel.send(response)
|
80 |
|
81 |
|
82 |
@bot.event
|
|
|
57 |
|
58 |
print(f"channel: {message.channel.id}")
|
59 |
|
60 |
+
if (message.channel.id in allowed_channels) or ("1368647373110382702" in content):
|
61 |
+
if "start" in content and str(user) == "adityasharmalive" and status is False:
|
62 |
+
await message.channel.send("<@325866452089307146> I am on")
|
63 |
+
status = True
|
64 |
+
return
|
65 |
+
|
66 |
+
if "stop" in content and str(user) == "adityasharmalive":
|
67 |
+
await message.channel.send("<@325866452089307146> bye")
|
68 |
+
status = False
|
69 |
+
return
|
70 |
+
|
71 |
+
if status is False:
|
72 |
+
await message.channel.send("Please ask <@1186231758191071313> sr to start me.")
|
73 |
+
return
|
74 |
+
|
75 |
+
async with message.channel.typing():
|
76 |
+
response = get_response(content, str(message.channel.id), "Rohit")
|
77 |
+
await message.channel.send(response)
|
|
|
|
|
78 |
|
79 |
|
80 |
@bot.event
|