Skip to content

Commands Fail To Show In Slash Command List Upon Bot Restart #927

Open
@ghost

Description

Summary

When I write some code for a command, and turn the bot on, my command is there, shows, and works, but when I turn the bot off, make a few edits to my code and restart the bot to test the command, it's not there. It takes several, several restarts to get the command to show back up. Is there a cooldown timer I'm not aware of or something? In the slash command decorator, I insert my guild id so that it's registered automatically, unless I'm understanding that wrong as well?

Reproduction Steps

I didn't do anything to make the issue occur that I'm aware of.

Minimal Reproducible Code

I don't have any code for this bug. It's a loading error when restarting the bot.

Expected Results

Start bot via terminal
Test Command, get results
Make edits to code if necessary
restart bot via terminal
command displays appropriately to continue testing

Actual Results

start bot via terminal
test command, get results
make edits to code if necessary
restart bot via terminal
50/50 chance command shows up in command list to allow continued testing, or have to start/stop bot numerous time to get command to show up again.

Intents

intents = disnake.Intents.all() during development only.

System Information

- Python v3.10.9-final
- disnake v2.6.1-final
    - disnake pkg_resources: v2.6.1
- aiohttp v3.8.3
- system info: Linux 6.1.8-zen1-1-zen #1 ZEN SMP PREEMPT_DYNAMIC Tue, 24 Jan 2023 21:07:06 +0000

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

Additional Context

I self-host my bot via my terminal inside of VSCode. I create a virtual environment to run the bot in, and install any needed packages inside of the venv. I'm not sure if I'm just restarting the bot too many times per x amount of minutes, or not, but I'm pretty sure I'm not causing this. It's just a bug I've dealt with for a while. Sometimes I start and stop the bot almost immediately especially when making a single change to correct a mispelling or something and then start the bot back up. If there is a cooldown timer, or I'm not passing my guild id correctly to allow immediate changes to update, then please let me know. To pass my guild id, I just simply do

@commands.slash_command(name="Some Name",description="Some Description",guild_ids=[1234567890,])

Metadata

Metadata

Assignees

No one assigned

    Labels

    unconfirmed bugSomething might not be working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions