Skip to content

Is it "channel.send" or "message.channel.send" #651

Answered by almostSouji
Nagol12344 asked this question in Q&A
Discussion options

You must be logged in to vote

<Message>.channel is just one way to gain access to a channel (the channel the source message was posted in).

You can also retrieve channels from the guild cache <Guild>.channels.cache or the client cache <Client>.channel.guild or in the context of a reaction event <MessageReaction>.message.channel, on channel creation client.on("channel", channel => ...), to name some examples.

Explaining any and all means by which you can get a channel would take way too much place, and the focus of this guide section is how to compose and send an embed, not how to get the channel from to send it in.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by almostSouji
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #650 on April 18, 2021 18:47.