N
N
NeoLight32020-09-15 15:29:24
Python
NeoLight3, 2020-09-15 15:29:24

How to send a message from a discord bot to a specific server channel?

I have my bot on a Discord server written in Python.
The bot has a net-socket, and after receiving a packet on the socket, I need to send it to a specific channel in the discord.
How can I send a message FROM the bot to the discord channel?
For example my channel name is "general".

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2020-09-15
@NeoLight3

Is it really so hard to google after all?

channel = client.get_channel(айди)
await channel.send('сообщение')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question