I am trying to make a spam command that only certain roles can use, but when I run my code I get a bunch of errors
code:
@bot.command()
@commands.has_any_role('The Great Mountain Chicken', 'The Great Frogs', 'The Great Toads')
async def spam(ctx, member):
for i in range(20):
await ctx.send(f'{member} why do you do this to me. IT BURNS')
errors:
Ignoring exception in command spam:
Traceback (most recent call last):
File "C:\Users\Jude\AppData\Local\Programs\Python\Python36\lib\site-packages\discord\ext\commands\bot.py", line 903, in invoke
await ctx.command.invoke(ctx)
File "C:\Users\Jude\AppData\Local\Programs\Python\Python36\lib\site-packages\discord\ext\commands\core.py", line 851, in invoke
await self.prepare(ctx)
File "C:\Users\Jude\AppData\Local\Programs\Python\Python36\lib\site-packages\discord\ext\commands\core.py", line 786, in prepare
await self._parse_arguments(ctx)
File "C:\Users\Jude\AppData\Local\Programs\Python\Python36\lib\site-packages\discord\ext\commands\core.py", line 697, in _parse_arguments
transformed = await self.transform(ctx, param)
File "C:\Users\Jude\AppData\Local\Programs\Python\Python36\lib\site-packages\discord\ext\commands\core.py", line 542, in transform
raise MissingRequiredArgument(param)
discord.ext.commands.errors.MissingRequiredArgument: member is a required argument that is missing.