I'm building a reminder bot for Discord.
The server owner or moderator should subscribe to the server via a message.
I'm having trouble finding the way to send the message to the specific server and channel.
Any idea if there is a way?
If you have the channel ID all you need to do is find the channel and send a message to it:
let channel = client.channels.get('THECHANNELID');
if(channel) {
channel.send("My Message");
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.