I have created this command
@bot.command()
async def say(self):
"""Makes me say something :eyes:"""
await bot.say(content)
Any help?
all I get is blank and no reply from bot if I do
!say hi
Is that in a class? If so you need to use @commands.command
and you passed self wich is for when you use a class.
The parameters do not seem to be correct...
Heres an example:
```
@bot.command()
async def say(content):
"""Makes me say something 馃憖"""
await bot.say(content)
@commands.command()
async def say(self, content):
"""Makes me say something 馃憖"""
await self.bot.say(content)
Thanks, Do you know how to setup permissions for commands?
You can view an example at
https://github.com/Rapptz/RoboDanny/blob/master/cogs/utils/checks.py
You'd need to import that module and use the functions as a decorator
bellow (or etc) the @commands.command as @checks.is_owner() or other
checks. The bot also has some inbuilt checks in the commands extension.
On Feb 16, 2017 7:21 AM, "Jake Stanley" notifications@github.com wrote:
Thanks, Do you know how to setup permissions for commands?
Ignoring the other replies, the main issue is your content variable doesn't exist. Plus, it doesn't look like you're in a class, so you don't need self
Change this:
async def say(self):
To this:
async def say(*, content):
Most helpful comment
Is that in a class? If so you need to use @commands.command
and you passed self wich is for when you use a class.
The parameters do not seem to be correct...
Heres an example:
```
main script:
@bot.command()
async def say(content):
"""Makes me say something 馃憖"""
await bot.say(content)
In a class:
@commands.command()
async def say(self, content):
"""Makes me say something 馃憖"""
await self.bot.say(content)