I am making a bot in python using discord.py , i was trying delete the command when it is executed it is working but giving me a error and the error is
Ignoring exception in on_message Traceback (most recent call last): File "C:\Users\Dell\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\client.py", line 312, in _run_event await coro(*args, **kwargs) File "C:/Users/Dell/Desktop/test_bot/add_role.py", line 25, in on_message msg = await message.channel.fetch_message(761275239346339871) File "C:\Users\Dell\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\abc.py", line 956, in fetch_message data = await self._state.http.get_message(channel.id, id) File "C:\Users\Dell\AppData\Local\Programs\Python\Python38\lib\site-packages\discord\http.py", line 243, in request raise NotFound(r, data) discord.errors.NotFound: 404 Not Found (error code: 10008): Unknown Message
After giving the error also it works , but i want to know what rises the error code :
msg = await message.channel.fetch_message(761275239346339871)
await msg.delete()
fetch_message(761275239346339871)
didn't found the message you're looking for – MrSpaar