Reputation: 125
so I'm trying to build a command where you say like;say #channel hi and it sends the channel the message.
@commands.command()
@commands.has_permissions(manage_channels=True)
async def say(self,):
Upvotes: 2
Views: 564
Reputation: 329
You can do something like this:
@commands.command()
@commands.has_permissions(manage_channels=True)
async def say(self, channel: discord.TextChannel = None, *, message):
await channel.send(message)
Where the channel is your server's text channel you want to send the message to.Also as you can see I use a *
in the command.This means that you can write more than one word as a message :)
Upvotes: 2