dont react on messages from bots
This commit is contained in:
11
main.py
11
main.py
@@ -18,7 +18,6 @@
|
|||||||
import discord
|
import discord
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from discord import user
|
|
||||||
from lib.keep_alive import keep_alive
|
from lib.keep_alive import keep_alive
|
||||||
from lib.help import *
|
from lib.help import *
|
||||||
|
|
||||||
@@ -37,7 +36,10 @@ async def on_ready():
|
|||||||
|
|
||||||
@client.event
|
@client.event
|
||||||
async def on_message(message):
|
async def on_message(message):
|
||||||
if message.author == client.user:
|
#if message.author == client.user:
|
||||||
|
# return
|
||||||
|
|
||||||
|
if message.author.bot:
|
||||||
return
|
return
|
||||||
|
|
||||||
if message.content.startswith(BOTDATA['prefix'] + 'help'):
|
if message.content.startswith(BOTDATA['prefix'] + 'help'):
|
||||||
@@ -47,5 +49,8 @@ async def on_message(message):
|
|||||||
if message.content.startswith(BOTDATA['prefix'] + 'hello'):
|
if message.content.startswith(BOTDATA['prefix'] + 'hello'):
|
||||||
await message.channel.send("Hello, {}!".format(message.author))
|
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'])
|
client.run(BOTDATA['token'])
|
||||||
|
|||||||
Reference in New Issue
Block a user