Skip to content

Why is bot.get_channel(<id>) not returning DMChannels? #10187

Answered by Rapptz
TheAyes asked this question in Q&A
Discussion options

You must be logged in to vote

DMs are only available on a LRU cache of 128 channels because Discord does not actually recommend keeping track of these long term. This is documented and warned pretty sure. You can also just use Client.get_partial_messageable to avoid an API call if you know the channel ID is valid.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@TheAyes
Comment options

@TheAyes
Comment options

@Rapptz
Comment options

Answer selected by TheAyes
@TheAyes
Comment options

@Rapptz
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants