From 77767a9fb47a83762618f06084b9ae18aa6c709c Mon Sep 17 00:00:00 2001
From: anima
Date: Sat, 20 Nov 2021 19:54:28 +0100
Subject: [PATCH] dont react on messages from bots
---
main.py | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/main.py b/main.py
index 65b0445..f0db70b 100644
--- a/main.py
+++ b/main.py
@@ -18,7 +18,6 @@
import discord
import json
-from discord import user
from lib.keep_alive import keep_alive
from lib.help import *
@@ -37,7 +36,10 @@ async def on_ready():
@client.event
async def on_message(message):
- if message.author == client.user:
+ #if message.author == client.user:
+ # return
+
+ if message.author.bot:
return
if message.content.startswith(BOTDATA['prefix'] + 'help'):
@@ -47,5 +49,8 @@ async def on_message(message):
if message.content.startswith(BOTDATA['prefix'] + 'hello'):
await message.channel.send("Hello, {}!".format(message.author))
-keep_alive()
+ if 'happy birthday' in message.content.lower():
+ await message.channel.send('Happy Birthday! 🎈🎉')
+
+#keep_alive()
client.run(BOTDATA['token'])