Relative Content

Tag Archive for pythondiscord.py

Discord.py forum threads invalid form body

I’m trying to link my google spreadsheet to a discord forum threads and I have been getting into these errors saying that its an invalid form body for exceeding the character limit of 2000 or 4000 and if I change that, it’ll say that it cannot send an empty message. I’ve gotten it to send out the first message but I’m running into the issue of when it gets to the second message if it needs to.

discord.py get subcommand

I am trying to get the subcommand that the user has called in Bot.process_commands
this was my code

Duplicate Commands for discord.py

I created a discord bot in python, and at first i had it set so that it would sync the commands to a specific guild, but i recently changed it so that it is synced globally, and now there is this bizarre bug which duplicates every command so it appears twice. These are a few of the commands that are duplicated.

dynamic select from list for discord bot

I send a modal to the user and expect a response from the user, after receiving it, it is processed and receives a list (there are no more than 20 elements in the list), and also sends a select to the user with a choice from this list. When starting I get the error:

Discord.py cog gets duplicated

I am trying to set up a daily report with discord.py. You can find my (minimised) code below. The idea is to retain the reports through bot restarts by using a database to reinitialise them during on_ready. The problem is that sometimes two identical cogs seem to get added and the DO SOMETHING part runs twice (or more). This gets fixed by manually removing the cog (via name) from both active_cogs and the database and readding it. But I cannot understand why and how it gets duplicated – I thought two cogs cannot have the same cog_name, hence why I am identifying the cog with the id and time of the report.