Massive ping users #8115
-
Hello, I want to make the function I tried according to the documentation to use commands.Greedy, but nothing worked for me
Please help me! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
@eternalyoshino you guessed right! You just need to remove @commands.command()
@commands.has_permissions(administrator=True)
async def award(self, ctx, amount: int = None, member: commands.Greedy[discord.Member]):
for members in member:
open_account(user=members)
add_bal(members, amount)
await ctx.send (f"{members.mention}, you have been credited {amount} bits\nAccrued: {ctx.author.mention}") When running the command like |
Beta Was this translation helpful? Give feedback.
-
Yeah greedy is meant to be used with other arguments after it.
If you don't need it you can just use args
|
Beta Was this translation helpful? Give feedback.
@eternalyoshino you guessed right! You just need to remove
*
from the function (award
)When running the command like
award 100 @user1 @user2
, the bot tries to convert both@user1
and@user2
as 1 single Member. Hence, there is no user ("@user1 @user2
") like it and thereforemember
is[]