dont react on messages from bots

This commit is contained in:
2021-11-20 19:54:28 +01:00
parent 24e35a2b91
commit 77767a9fb4

11
main.py
View File

@@ -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'])