From 111b96c5db61e77047ecadd593b530bf596f943b Mon Sep 17 00:00:00 2001 From: BFlow Date: Sun, 17 Nov 2019 19:46:00 +0100 Subject: [PATCH] choix d'user dans la fonction slap --- kabot/kabot/kabot.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kabot/kabot/kabot.py b/kabot/kabot/kabot.py index 5792b58..673a814 100644 --- a/kabot/kabot/kabot.py +++ b/kabot/kabot/kabot.py @@ -91,10 +91,9 @@ class Mybot(commands.Cog): for member in members: if str(member.status) == "online": online_members.append(member) - - await ctx.channel.send('%s' % online_members) - - #await ctx.channel.send("j'attrape %s est lui met une tarte!" % user) + member = random.choice(online_members) + user = member.mention + await ctx.channel.send("j'attrape %s est lui met une tarte!" % user) @commands.command(help="optionnal args : [livre] [character]") async def kaamelott(self, ctx, *args):