Rapptz / discord.py

An API wrapper for Discord written in Python.
http://discordpy.rtfd.org/en/latest
MIT License
14.88k stars 3.76k forks source link

Buttons suddenly stops working, no commands work, no errors or exceptions raised. Bot becomes totally unresponsive. #7393

Closed steeljardas closed 3 years ago

steeljardas commented 3 years ago

Summary

Buttons suddenly stops working, no commands work, no errors or exceptions raised.

Reproduction Steps

I just play around with the buttons for 30s to 2 minutes and it happens randomly on the same buttons that were working just a couple seconds ago.

Minimal Reproducible Code

https://pastebin.com/WT3A14iW

Expected Results

Bot to keep working

Actual Results

Bot became completely unresponsive. Won't execute anymore commands !profile !bank anything. No errors or exceptions raised.

Intents

intents = discord.Intents.all()

System Information

Checklist

Additional Context

So, to begin with, the bot is played through DMs with the bot, so I don't know if that could potentially be the issue.

The bot works just fine, all buttons work fine, they do what's intended, however after 30 seconds to 2 minutes of use, when I randomly click a button nothing happens and if I suddenly try to use any commands on it the bot stops executing them entirely.

No errors or exceptions are raised, bot is still running but everything is just frozen. I can see that tasks still run in the background or at least some do.

Example of the buttons code: https://pastebin.com/WT3A14iW

Since I couldn't figure out whats wrong due to no errors I enabled logging and it all happens once the callback returns a 204 error and after that nothing else works, it clearly detects me calling !profile but it wont execute it.

2021-08-14 06:07:56,332:DEBUG:discord.webhook.async_: Webhook ID 875968965980090428 with POST https://discord.com/api/v8/interactions/875968965980090428/aW50ZXJhY3Rpb246ODc1OTY4OTY1OTgwMDkwNDI4OkxlRVZDY3NRT3VBTndOdlBGQ2dwYmNMREJxbzZFNjRhRnlnV29KUDRyOTNFWWVrVTNQbFROTGw2UTE2VURmSmJBa0t0SHE2b0RWYUNRVFFqTXltQkNoZU9wMkNMTzV3T1RRNlJWblpiVnlTV2h3NFpYMXpBd3NIUTY2bzhaNG5h/callback has returned status code 204

2021-08-14 06:08:07,387:DEBUG:discord.client: Dispatching event socket_raw_receive
2021-08-14 06:08:07,387:DEBUG:discord.gateway: For Shard ID None: WebSocket Event: {'t': 'MESSAGE_CREATE', 's': 16, 'op': 0, 'd': {'type': 0, 'tts': False, 'timestamp': '2021-08-14T05:08:07.438000+00:00', 'referenced_message': None, 'pinned': False, 'nonce': '875969012142440448', 'mentions': [], 'mention_roles': [], 'mention_everyone': False, 'id': '875969013090484284', 'flags': 0, 'embeds': [], 'edited_timestamp': None, 'content': '!profile', 'components': [], 'channel_id': '870374632350441513', 'author': {'username': '', 'public_flags': 0, 'id': '638795441550524416', 'discriminator': '9420', 'avatar': None}, 'attachments': []}}
2021-08-14 06:08:07,387:DEBUG:discord.client: Dispatching event socket_response
2021-08-14 06:08:07,387:DEBUG:discord.client: Dispatching event message
2021-08-14 06:08:07,387:DEBUG:discord.client: Dispatching event command
steeljardas commented 3 years ago

An update on this: It seems like the issue is that it doesn't send any embeds anymore but commands that simply write to the user (ctx.author.send("hello")) all keep working flawlessly.

I have a command !start bot1 that sends a few lines for the user then should send an embed, it sends the lines but not the embed and all the other not working commands are just embeds which leads me to believe the embeds are the issue.

steeljardas commented 3 years ago

Confirmed, all commands with buttons don't work but the others work just fine

ElReyZero commented 2 years ago

@steeljardas Did u find the cause of the error? I'm having the same issue and I haven't been able to find anything useful or that worked