fixe auto mutilation

This commit is contained in:
BFlow 2019-11-17 20:03:37 +01:00
parent 33d44c2395
commit 957708785f

View file

@ -85,19 +85,18 @@ class Mybot(commands.Cog):
@commands.command(help='slap this ass')
async def slap(self, ctx, user=None):
member=None
if not user:
online_members = []
members = ctx.guild.members
for member in members:
if str(member.status) == "online":
online_members.append(member)
member = random.choice(online_members)
user = member.mention
if member == self.bot.user:
user = random.choice(online_members)
#user = member.mention
if user == self.bot.user:
await ctx.channel.send("je tribuche par terre et je sais pas comment")
else:
await ctx.channel.send("j'attrape %s et lui met une tarte!" % user)
await ctx.channel.send("j'attrape %s et lui met une tarte!" % user.mention)
@commands.command(help="optionnal args : [livre] [character]")
async def kaamelott(self, ctx, *args):