Skip to content

send Message To Specific Channel error!! #8821

Closed Answered by kyranet
alsksssass asked this question in Q&A
Discussion options

You must be logged in to vote

There are many reasons for that code to fail:

  1. The ID is invalid.
  2. The channel doesn't exist in your bot's cache:
    1. Could be run before ready, before the cache is populated.
    2. Your bot is not longer in the guild the channel is from.
    3. Your bot's shard doesn't contain this one channel.
    4. You're running the wrong bot token (one that isn't in the guild).
  3. The message could not be sent due to missing permissions (ViewMessages + SendMessages).
  4. The message could not be sent because bot is timed out.
  5. You're using TypeScript and you're not casting the Channel type to the specific one that's expected from it, so send's availability becomes partial because the type is an union where some of the possible t…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by kyranet
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