D
D
DmitrNy ---2019-10-08 15:47:42
Python
DmitrNy ---, 2019-10-08 15:47:42

Discord.py How to output a message to a channel with a specific ID?

The bottom line is this: There is a message (Included in a variable), and there is an ID of the Discord channel where you want to send this message. How it is possible to output the given message to the channel with this ID?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sergeo1, 2019-10-08
@KBA3

Bot = commands.Bot(command_prefix= '!')
...
...
@Bot.event
async def <тип события>():
   channel = Bot.get_channel(id)
   await channel.send(переменная с вашим сообщением)

If it is not clear which of these is what and why, then I ask here: https://discordpy.readthedocs.io/en/latest/api.htm...
Discord.py version - rewrite

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question