I need to get a message in a conversation with a user that already exists, but I ran into the problem that I can’t get the conversation as an object by id, although the id is correct
Error: ‘NoneType’ object has no attribute ‘fetch_message’
async def updatePost(userId, channelId, messageId):
print("Проверка")
user = await bot.fetch_user(userId)
print(channelId)
channel = bot.get_channel(int(channelId))
print(channel)
print(messageId)
message = await channel.fetch_message(messageId)
I have already tried to enter id as a constant, but the error is still the same: ‘NoneType’ object has no attribute ‘fetch_message’
New contributor
Kaito Hitsugaya is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.