test filtre online

This commit is contained in:
BFlow 2019-11-17 19:04:02 +01:00
parent f016e6b5bd
commit e654378e7a

View file

@ -86,9 +86,13 @@ class Mybot(commands.Cog):
@commands.command(help='slap this ass') @commands.command(help='slap this ass')
async def slap(self, ctx, user=None): async def slap(self, ctx, user=None):
if not user: if not user:
online_members = []
members = ctx.guild.members members = ctx.guild.members
for member in members: for member in members:
await ctx.channel.send('%s : %s' % (member.display_name,member.status)) if 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) #await ctx.channel.send("j'attrape %s est lui met une tarte!" % user)