#Help with bot command setup
17 messages · Page 1 of 1 (latest)
@cloud temple
What isn't working exactly
Traceback (most recent call last):
File "D:\PYTHON\Python Interface\lib\site-packages\discord\ext\commands\bot.py", line 1350, in invoke
await ctx.command.invoke(ctx)
File "D:\PYTHON\Python Interface\lib\site-packages\discord\ext\commands\core.py", line 1021, in invoke
await self.prepare(ctx)
File "D:\PYTHON\Python Interface\lib\site-packages\discord\ext\commands\core.py", line 938, in prepare
await self._parse_arguments(ctx)
File "D:\PYTHON\Python Interface\lib\site-packages\discord\ext\commands\core.py", line 845, in _parse_arguments
transformed = await self.transform(ctx, param, attachments)
File "D:\PYTHON\Python Interface\lib\site-packages\discord\ext\commands\core.py", line 715, in transform
return await run_converters(ctx, converter, argument, param) # type: ignore
File "D:\PYTHON\Python Interface\lib\site-packages\discord\ext\commands\converter.py", line 1355, in run_converters
return await _actual_conversion(ctx, converter, argument, param)
File "D:\PYTHON\Python Interface\lib\site-packages\discord\ext\commands\converter.py", line 1243, in _actual_conversion
raise ConversionError(converter, exc) from exc # type: ignore
discord.ext.commands.errors.ConversionError: (<class '__main__.Slapper'>, TypeError("Slapper.convert() missing 1 required positional argument: 'argument'"))
This is the error message, it's saying i am missing argument but i have given it
Where you get the code for the Slapper converter?
A tutorial
How old is the tutorial??? Was it written for discord.py?
Well it's not correct lol there's no third parameter on the convert function
yeah, so that's the change i made, in the original tut, he was using slap command on any random member but I wanna do it by tagging some specific person and that's where i messed up
If a function isn't being called by you, you can't change its parameter signature. To do what you want you'd need to change the parameters of the slap commands function since you call it using Discord.
So, I have to make changes in the function and not the class itself?
hey, so is there any need to make a Slapper class for slap fucntion?..
I did all the previous commands without making a converter for them
I don't see why you would need to. A converter is mostly just used for example to take a user id in your command but get the user in the code.