This @client.event
excludes other commands!!! Pls help me!
async def on_message(message): if client.user.mention in message.content.split(): await message.channel.send('xyz')
This is my code: (Without the @client.event it works corectly, but when I add other @client.event, rest of the code doesnt works, only client.event works. Guys help!!!
@client.event
async def on_ready():
print('xyz ~ {0.user}'.format(client))
await client.change_presence(activity=discord.Game(name="Piwo?"))
@client.command()
@has_permissions(ban_members=True)
async def ban(ctx, member : discord.Member, reason="Za darmo lamusie"):
await member.ban(reason=reason)
await ctx.channel.send(f"***xyz***")
@client.command()
@has_permissions(kick_members=True)
async def kick(ctx, member : discord.Member, reason="Za darmo lamusie"):
await member.kick(reason=reason)
await ctx.channel.send(f"***{member.mention} xyz ***")
@client.command()
async def jaka_gierka(ctx):
gierki = [xyz]
await ctx.channel.send(random.choice(gierki))
@client.command()
async def graj(ctx, game):
await client.change_presence(activity=discord.Game(name=game))
@client.command()
async def streamuj(ctx, game):
await client.change_presence(activity=discord.Streaming(name=game, url="xyz"))
@client.command()
async def sluchaj(ctx, music):
await client.change_presence(activity=discord.Activity(type=discord.ActivityType.listening, name=music))
@client.command()
async def ogladaj(ctx, film):
await client.change_presence(activity=discord.Activity(type=discord.ActivityType.watching, name=film))
@client.event
async def on_message(message):
if client.user.mention in message.content.split():
await message.channel.send('xyz')
client.run("token")```