Relative Content

Tag Archive for pythondiscorddiscord.py

Discord slash commands with python and failing

I am setting up a discord.py file for a discord bot I have. Everything is going smooth so far, I got messages sending working, but not commands, I started setting it up, but now having issues. I have gone to several other posts, but to no avail.

Discord.py Bot regularly being rate limited

I’m very new to coding and, as my first “big” project, attempted to create a music bot in discord. I’m currently running into the issue that the bot regularly gets rate limited despite not being used by a lot of users (300 servers). I’m not sure what parts of my code I can change/optimize to make fewer API calls and still have all my functionalities remain the same. I’m hoping someone more experienced can give me a header here. Thanks!

How do I get my main discord python file to run other py files?

I am currently running a python API that runs my main.py discord bot file as a subprocess and I don’t really want to create another subprocess for each subsequent files that I add to my project. I am currently working on an Analytics.py file that I am running on the side with a test bot while my main bot continues to run, and I want to know how I can run my Analytics.py file in my main.py without creating another subprocess in my API.py.

How to remove duplicate slash commands (discord.py)

I’m relatively new to Discord.py, and I have a bot that seems to be experiencing a peculiar problem. Not too long after being started as a service on my remote Ubuntu server, the bot will begin duplicating certain commands (if not all of them), as seen in Discord’s slash command interface.

Discord.py, after 30 minutes have passed since sending a message, I’m unable to edit it

After sending a message using interaction in discord.py, I’m attempting to use buttons to edit it. Editing is possible roughly up to 30 minutes after sending the message, but after that, I encounter the error ‘discord.errors.HTTPException: 401 Unauthorized (error code: 50027): Invalid Webhook Token’ and cannot edit the message. How can I continue to edit the message after this point?