From 6013c08fd05121d28cb59aeb866b357f15a0f5c3 Mon Sep 17 00:00:00 2001 From: DWW Date: Sun, 13 Feb 2022 21:38:04 +0200 Subject: [PATCH] Changed bot to respond to DMs only --- bot.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/bot.py b/bot.py index 776e06b..9e5ecda 100644 --- a/bot.py +++ b/bot.py @@ -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")