Answer the question
In order to leave comments, you need to log in
What is the reason why TextChannel suddenly ceases to exist when fetched by ID?
There is a bot with a user and a private support channel. Each user has their own channel.
When a user writes to the bot, their message is sent to the private channel associated with that user. When the support agent writes to the private channel associated with that user, his message is proxied into the conversation between the user and the bot.
Simply put, the user communicates with support only through the bot. Support communicates with the user only through a private text channel.
When a user sends a message from a bot, the channel_id of the user's conversation with the bot is sent along with the message. The channel_id itself does not change.
The problem is that if the support agent writes to a private channel after a certain period of time, then it is not possible to get the TextChannel using the get_channel method by the channel_id that the user passes.
But, if the user writes through the bot, and the agent immediately answers him through the text channel, then get_channel returns the channel with the bot (by the same channel_id), although a minute ago, until the user upped the correspondence, he did not find it.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question