-
Notifications
You must be signed in to change notification settings - Fork 34
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
Feature request: allow changing of command #5
Comments
Ah yeah, this is a good idea, and I don’t believe you can do that in Discord’s UI. Simple enough to add another command line flag. |
Just pushed up something to master that adds the |
Works fantastic! For future reference, it gives a null pointer if you:
Easily worked around by removing the bot from your server and re-adding with the new command. Not a big deal at all, just wanted to let you know. I'm a QA by trade, so I can't help it, haha. |
Actually, just realized it will also break the second time you launch with the flag. So you have to re-add the bot every time you launch, if you use the flag. EDIT: aaaand it didn't do it the third time. I have no idea what's happening here. I'll keep looking at it. |
Hmmm, interesting. I tried launching my dev version of the bot with Like you mentioned, removing the bot and adding it back to the server again cleared out the old commands that were not working after the flag change. I then proceeded to test again after relaunching, and it all seems to work. I think the thing with the flag is that you need to run the bot with the flag every single time, or it won't be listening to the overridden version of the command name? |
I'm curious about the null pointer you mentioned though. Was that a panic that you saw? Curious if there is a way to replicate it. |
So after some more testing, it seems you can reproduce the error by putting capital letters in your custom command. The idea that it was being caused by existing commands was a false positive on my part. |
Oh nice, thanks for spotting this. Just pushed a fix. |
It was an error coming back from Discord about the command name being invalid. Now, trying to use capital letters correctly logs the error coming back from their API: Error creating 'dev_Test' command: HTTP 400 Bad Request, {"code": 50035, "errors": {"name": {"_errors": [{"code": "APPLICATION_COMMAND_INVALID_NAME", "message": "Command name is invalid"}]}}, "message": "Invalid Form Body"} |
Also added a You can use this flag to run the bot with the normal imagine command, exit the bot (it will then delete the normal imagine commands), and then rerun with the |
That's fantastic. I'll give the remove flag a try, everything else is working great. |
Want to be able to use this on the same server as the midjourney bot, and they both use the same discord command (/imagine). Not a big deal as you can choose which one you want to use with a click, but annoying to users. I can do a PR for it myself if that's what you want, just wanted to make sure you didn't have plans. Maybe make it a command line option?
If there's another way to make this happen directly in discord, I'm just not aware of it.
The text was updated successfully, but these errors were encountered: