Changed bot to respond to DMs only

This commit is contained in:
DWW 2022-02-13 21:38:04 +02:00
parent 5fe9bfed4d
commit 6013c08fd0

12
bot.py
View File

@ -11,7 +11,15 @@ async def on_message(message):
if message.author == client.user:
return
if message.content.startswith("$hello"):
await message.channel.send("Hello!")
if message.channel.id != message.author.dm_channel.id:
return
if message.content.startswith("+"):
# SUB
await message.channel.send("Subscribed to " + message.content[1:])
if message.content.startswith("-"):
#UNSUB
await message.channel.send("Unsubscribed from " + message.content[1:])
client.run("OTQyNDk2ODcwMzQ3OTk3MjQ1.YglWnA.XWmDCAuqtaLYKArJPxgyKscxB_8")