I am trying to make a discord bot for my advertising server, and I am still sort of new to coding with discord.py (I have been doing it for about 2 months). I would like to know if someone can type something in chat and then post the author's message in another channel
Example:
User: $ad
and then the bot posts the author's ad in a certain channel (like a channel for advertisements)
Further Example:
User: $ad join my discord server!
Bot: User said: join my discord server!
I know I haven't really explained it much, but I hope someone can help me, thanks!
If you get the author's message's ID, you should be able to work off of that if I'm not wrong...
If you get the author's message's ID, you should be able to work off of that if I'm not wrong...
yeah, that would work thanks
Yes, this is possible.
You can simply use Message.content or, if you're using the commands extension, a keyword-only argument parameter to get the content of the message.
You can get the Channel by ID using Client.get_channel or Server.get_channel (Guild.get_channel on the rewrite branch) or you can filter for the Channel by using Server.channels (Guild.text_channels on the rewrite branch) and utils.find/utils.get.
If you're using the commands extension on the rewrite branch, you can accept the TextChannel as a parameter using TextChannelConverter. On the async branch, to accept it as Channel parameter with the commands extension, you can use ChannelConverter:
https://github.com/Rapptz/discord.py/blob/1863a1c6636f53592519320a173ec9573c090c0b/discord/ext/commands/converter.py#L106
For further help, you should join either the official discord.py server or the Discord API server, as the README recommends.
Was that email really necessary