Is it "channel.send" or "message.channel.send" #651
-
Part of the guide or code sample the question is about Question |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can also retrieve channels from the guild cache 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. |
Beta Was this translation helpful? Give feedback.
<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 creationclient.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.