cameroncros / OctoPrint-DiscordRemote

Discord plugin for OctoPrint
MIT License
68 stars 32 forks source link

"Permission denied" response to all commands I send through Discord #204

Closed twistedpixel closed 2 years ago

twistedpixel commented 2 years ago

Describe the bug "Permission denied" response to all commands I send in Discord. This seems to only happen if using my user ID (the long string of numbers obtained by clicking the ... button on my profile settings page) in the User field of the "Access settings" section of OctoPrint's DiscordRemote settings. When I use "*" it works fine. I know the ID is correct as I've triple checked it and also it worked fine before the 3.0 update. Is it looking for a different ID now in 3.0? I read your instructions and they still seem to indicate that is the correct ID to use.

Octoprint is on the latest version (1.7)

Any idea what's going on?

Logs # This is all there seems to be in the Discord plugin log 2021-10-19 13:19:58,327 ERROR Failed with: list assignment index out of range 2021-10-19 13:19:58,535 ERROR Failed with: list assignment index out of range 2021-10-19 13:19:58,758 ERROR Failed with: list assignment index out of range 2021-10-19 13:24:04,956 INFO Settings have saved. Send a test message... 2021-10-19 13:24:04,967 INFO Received event: test 2021-10-19 13:24:08,629 INFO Sending msgs 2021-10-19 13:24:27,151 INFO Settings have saved. Send a test message... 2021-10-19 13:24:27,158 INFO Received event: test 2021-10-19 13:24:30,792 INFO Sending msgs

Screenshots In case it isn't clear, here's what I'm inputting. Also I only actually use rule 1 - I only filled rule 2 for this screenshot to show you the difference of what I'm inputting to rule 1's Users and Commands box.

Screen Shot 2021-10-19 at 13 29 01
twistedpixel commented 2 years ago
Screen Shot 2021-10-19 at 13 44 49

Also here's the "permission denied" messages I'm getting.

cameroncros commented 2 years ago

Yup, confirmed bug, fixed by v3.1.0. Discordlib passes the user id as an int, the old version passed it as a string. Fixed.

McStebb commented 1 year ago

Hello. Sorry for the necro. I am now having this precise issue with version v5.6.0. I am able to receive messages from the server but cannot send commands.

Adding / works, just as @twistedpixel did above. Using the channel ID doesn't work.

image

cameroncros commented 1 year ago

Do you mean user ID doesn't work? Make sure you are getting the correct user ID, which comes from right clicking your name and clicking copy-id (I am on mobile so not 100% sure how to do this on desktop). Should be something like: 371XXXXXXXXXXXX520. I'll test on my server anyway

McStebb commented 1 year ago

You're right, sorry. I misspoke. I did mean user ID. I can put in the 4XXX... user id of the public bot but it won't let me issue commands, however giving all commands to all users works.

cameroncros commented 1 year ago

No, sorry for the confusion, it should be the user id of the user you want to be able to send commands, so you own user ID.

On Sun, 30 July 2023, 11:45 am McStebb, @.***> wrote:

You're right, sorry. I misspoke. I did mean user ID. I can put in the 4XXX... user id of the public bot but it won't let me issue commands, however giving all commands to all users works.

— Reply to this email directly, view it on GitHub https://github.com/cameroncros/OctoPrint-DiscordRemote/issues/204#issuecomment-1656992293, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAK7FL7B5I66B2NI4V5SWS3XSW4D7ANCNFSM5GJCBDGA . You are receiving this because you modified the open/close state.Message ID: @.***>

McStebb commented 1 year ago

OMG...... That makes sense. I can't believe I missed that. Thank you. It's working now.