Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug report #2

Open
Lonnycool3000 opened this issue Nov 30, 2024 · 5 comments
Open

Bug report #2

Lonnycool3000 opened this issue Nov 30, 2024 · 5 comments

Comments

@Lonnycool3000
Copy link

So, to help you a bit, idk if the m,istake is on my side or not but here is a quick copy paste of my bot who gets an error with the crafty commands like "list, start, stop"

2024-11-30 20:09:07 INFO discord.client logging in using static token
2024-11-30 20:09:08 INFO discord.gateway Shard ID None has connected to Gateway (Session ID: ec91a0e9ca8b79d541cf0c172f0a24eb).
Bot is ready. Renny_Bot#2168
Crafty Bot version 0.1.1
Server URL: 192.168.2.188:8443
GUILD ID: 1306542177492402247
auto stop disabled
commands
servers
2024-11-30 20:10:57 ERROR discord.client Ignoring exception in on_command_error
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
await coro(*args, **kwargs)
File "/usr/src/app/./core/main.py", line 272, in on_command_error
if isinstance(error, commands.CommandNotFound):
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'HybridCommand' object has no attribute 'CommandNotFound'
sync
servers
2024-11-30 20:11:33 ERROR discord.client Ignoring exception in on_command_error
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/discord/client.py", line 449, in _run_event
await coro(*args, **kwargs)
File "/usr/src/app/./core/main.py", line 272, in on_command_error
if isinstance(error, commands.CommandNotFound):
^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'HybridCommand' object has no attribute 'CommandNotFound'
start

@Two-Play
Copy link
Owner

There was a major problem with the API calls and error handling, but I have fixed it in v0.1.2. I tested it and found no further errors; hopefully, it stays that way. The slash commands should now have autocompletion. If you set the GUILD_ID correctly, you can use '>sync'. If this doesn’t work, try running the following commands:

>clean
>commands
>sync

After that, you should be able to use commands like /stats.

@Lonnycool3000
Copy link
Author

Hey, the bot works again like it should, I only have a few bugs with the slash commands, I think it doesnt recognise the commands but ill send a screenshot
Screenshot 2024-11-30 222309
Screenshot 2024-11-30 222427

@Lonnycool3000
Copy link
Author

But amazing work!!
Very easy because of your tutorial and is "plug n' play"

@Two-Play
Copy link
Owner

Two-Play commented Dec 1, 2024

Thank you very much!
And sorry for the mistake with the clean/clear command.
Yes, the slash commands are buggy, and I don’t really understand them either. Maybe try restarting the bot and using only >sync 2–3 times if necessary. It should sync 9 commands at this point. The clear command causes more problems than it solves.

@Lonnycool3000
Copy link
Author

OK that worked for me, thank you and nice work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants