donkevlar / Bookshelf-Traveller

Fully featured self-hosted audiobookshelf discord bot.
MIT License
11 stars 0 forks source link

HTTPException: 400|Bad Request #9

Closed xlocalx closed 2 weeks ago

xlocalx commented 3 weeks ago

I am trying to setup this bot, however i am having this issue below. Any advice ?

image

PRINTING

`INFO - 2024-08-20 05:51:06,526 : executing command /play INFO - 2024-08-20 05:51:06,607 : Media Type: book, Current Time: 4288.38798 Seconds INFO - 2024-08-20 05:51:06,607 : attempting to play: http://192.168.50.48:13378/api/items/404ee2b9-b01a-4f93-8d14-c55109d13934/file/10696049116595959 INFO - 2024-08-20 05:51:06,607 : Providing Auth Token to Server INFO - 2024-08-20 05:51:07,132 : Cleaning up, authentication INFO - 2024-08-20 05:51:07,471 : Voice connection established; using xsalsa20_poly1305_lite ERROR - 2024-08-20 05:51:07,652 : POST::https://discord.com/api/v10/interactions/1275436954665750592/aW50ZXJhY3Rpb246MTI3NTQzNjk1NDY2NTc1MDU5Mjo0cUF1RUd1NURkOVJmcHg2dmNiTHpnSFdMbG8ycUJpd1NCMlZtMFlpSFlnUDg2dkZ1VHBpQkR1YUFySVNBSlNLTUtwRlBRV1ltYmxka0cyMlByblA4Y2FFSGRDWVY2djFqQzFPUVk3THFwT0tHRldGOWpzRHZGZ0d6Q051TUFWdg/callback: 400 INFO - 2024-08-20 05:51:07,677 : Session 5f904aa0-b950-4a07-b5c5-500081c4b86f closed successfully INFO - 2024-08-20 05:51:07,679 : Command Called: play with event.ctx.args = ['404ee2b9-b01a-4f93-8d14-c55109d13934'] | event.ctx.kwargs = {'book': '404ee2b9-b01a-4f93-8d14-c55109d13934'} INFO - 2024-08-20 05:51:07,787 : Disconnecting from voice channel 1032685511283851409 WARNING - 2024-08-20 05:51:12,787 : Attempted to send data while websocket is not connected! INFO - 2024-08-20 05:51:16,784 : [{'name': 'Metro 2033 | Dmitry Glukhovsky', 'value': '404ee2b9-b01a-4f93-8d14-c55109d13934'}] INFO - 2024-08-20 05:51:16,784 : Autocomplete Called: $play with event.ctx.focussed_option = SlashCommandOption() | event.ctx.kwargs = {'book': ''} INFO - 2024-08-20 05:51:19,060 : executing command /play INFO - 2024-08-20 05:51:19,144 : Media Type: book, Current Time: 4299.38766 Seconds INFO - 2024-08-20 05:51:19,144 : attempting to play: http://192.168.50.48:13378/api/items/404ee2b9-b01a-4f93-8d14-c55109d13934/file/10696049116595959 INFO - 2024-08-20 05:51:19,144 : Providing Auth Token to Server INFO - 2024-08-20 05:51:19,673 : Cleaning up, authentication INFO - 2024-08-20 05:51:20,041 : Voice connection established; using xsalsa20_poly1305_lite ERROR - 2024-08-20 05:51:21,666 : POST::https://discord.com/api/v10/interactions/1275437007216185397/aW50ZXJhY3Rpb246MTI3NTQzNzAwNzIxNjE4NTM5NzpIUUoyYlVRbnRmWWdybjRock1JVDFiaFVvdllNVmZCZTVWRWpaT1JzZlVuN2FhTUVUVW9pS1JXUHViOTEzS3FKVlRRUXNBTmVPSk12aVIzUllseFV5Y0ZKdFA4dlp1WVRFS2F1aVZpSjZ1czRycm44cXNvV0dCV3NGUjJxUXViMw/callback: 400 INFO - 2024-08-20 05:51:21,693 : Session 5ac568fb-8a4d-44f6-a38a-2d2af42940c9 closed successfully INFO - 2024-08-20 05:51:21,693 : Command Called: play with event.ctx.args = ['404ee2b9-b01a-4f93-8d14-c55109d13934'] | event.ctx.kwargs = {'book': '404ee2b9-b01a-4f93-8d14-c55109d13934'} INFO - 2024-08-20 05:51:21,807 : Disconnecting from voice channel 1275421210301431839 INFO - 2024-08-20 05:52:42,800 : xlocalx, you are the owner and ownership is enabled! ERROR - 2024-08-20 05:52:43,032 : POST::https://discord.com/api/v10/interactions/1275437358350602315/aW50ZXJhY3Rpb246MTI3NTQzNzM1ODM1MDYwMjMxNTpGTVY2eUhxdDZQaTZNUHRpd1ZGNjVrU3k0TW50Vno2aFVZWWFia1VaT212ZXJ3NEVwc01mUm9BQTRvRnRTZFpLamdoMWlrYXpxUnlWWHpWb1hJSnZKakd1aFhTS2FCTDBZSW9HSVZkR3R5d3J3V1JvdGRLWllLQWY4bTBERkR3dw/callback: 400 ERROR - 2024-08-20 05:52:43,200 : POST::https://discord.com/api/v10/interactions/1275437358350602315/aW50ZXJhY3Rpb246MTI3NTQzNzM1ODM1MDYwMjMxNTpGTVY2eUhxdDZQaTZNUHRpd1ZGNjVrU3k0TW50Vno2aFVZWWFia1VaT212ZXJ3NEVwc01mUm9BQTRvRnRTZFpLamdoMWlrYXpxUnlWWHpWb1hJSnZKakd1aFhTS2FCTDBZSW9HSVZkR3R5d3J3V1JvdGRLWllLQWY4bTBERkR3dw/callback: 400 INFO - 2024-08-20 05:52:43,202 : Command Called: all-libraries with event.ctx.args = [] | event.ctx.kwargs = {} ERROR - 2024-08-20 05:52:43,204 : Ignoring exception in cmd/all-libraries: HTTPException: 400|Bad Request || Interaction has already been acknowledged. ERROR - 2024-08-20 05:52:43,335 : POST::https://discord.com/api/v10/interactions/1275437358350602315/aW50ZXJhY3Rpb246MTI3NTQzNzM1ODM1MDYwMjMxNTpGTVY2eUhxdDZQaTZNUHRpd1ZGNjVrU3k0TW50Vno2aFVZWWFia1VaT212ZXJ3NEVwc01mUm9BQTRvRnRTZFpLamdoMWlrYXpxUnlWWHpWb1hJSnZKakd1aFhTS2FCTDBZSW9HSVZkR3R5d3J3V1JvdGRLWllLQWY4bTBERkR3dw/callback: 400 `

donkevlar commented 3 weeks ago

Try reloading discord. That response 'command not found' is a discord response not from the bot. Do ctrl + R while focused on discord. Also, make sure you aren't using another bot with the same discord token. I see some messages in your logs that may indicate another server with the same token is responding, that error can also be directly from discord if it didn't recognize the command since it loaded commands to the cache and you have an outdated client. 3rd option is to try it on mobile or another platform like a chrome browser and see if it gives the same response. You are getting the ABS side and that's working correctly, since you can see it opening sessions fine.

donkevlar commented 3 weeks ago

I am trying to setup this bot, however i am having this issue below. Any advice ?

image

PRINTING

`INFO - 2024-08-20 05:51:06,526 : executing command /play INFO - 2024-08-20 05:51:06,607 : Media Type: book, Current Time: 4288.38798 Seconds INFO - 2024-08-20 05:51:06,607 : attempting to play: http://192.168.50.48:13378/api/items/404ee2b9-b01a-4f93-8d14-c55109d13934/file/10696049116595959 INFO - 2024-08-20 05:51:06,607 : Providing Auth Token to Server INFO - 2024-08-20 05:51:07,132 : Cleaning up, authentication INFO - 2024-08-20 05:51:07,471 : Voice connection established; using xsalsa20_poly1305_lite ERROR - 2024-08-20 05:51:07,652 : POST::https://discord.com/api/v10/interactions/1275436954665750592/aW50ZXJhY3Rpb246MTI3NTQzNjk1NDY2NTc1MDU5Mjo0cUF1RUd1NURkOVJmcHg2dmNiTHpnSFdMbG8ycUJpd1NCMlZtMFlpSFlnUDg2dkZ1VHBpQkR1YUFySVNBSlNLTUtwRlBRV1ltYmxka0cyMlByblA4Y2FFSGRDWVY2djFqQzFPUVk3THFwT0tHRldGOWpzRHZGZ0d6Q051TUFWdg/callback: 400 INFO - 2024-08-20 05:51:07,677 : Session 5f904aa0-b950-4a07-b5c5-500081c4b86f closed successfully INFO - 2024-08-20 05:51:07,679 : Command Called: play with event.ctx.args = ['404ee2b9-b01a-4f93-8d14-c55109d13934'] | event.ctx.kwargs = {'book': '404ee2b9-b01a-4f93-8d14-c55109d13934'} INFO - 2024-08-20 05:51:07,787 : Disconnecting from voice channel 1032685511283851409 WARNING - 2024-08-20 05:51:12,787 : Attempted to send data while websocket is not connected! INFO - 2024-08-20 05:51:16,784 : [{'name': 'Metro 2033 | Dmitry Glukhovsky', 'value': '404ee2b9-b01a-4f93-8d14-c55109d13934'}] INFO - 2024-08-20 05:51:16,784 : Autocomplete Called: $play with event.ctx.focussed_option = SlashCommandOption() | event.ctx.kwargs = {'book': ''} INFO - 2024-08-20 05:51:19,060 : executing command /play INFO - 2024-08-20 05:51:19,144 : Media Type: book, Current Time: 4299.38766 Seconds INFO - 2024-08-20 05:51:19,144 : attempting to play: http://192.168.50.48:13378/api/items/404ee2b9-b01a-4f93-8d14-c55109d13934/file/10696049116595959 INFO - 2024-08-20 05:51:19,144 : Providing Auth Token to Server INFO - 2024-08-20 05:51:19,673 : Cleaning up, authentication INFO - 2024-08-20 05:51:20,041 : Voice connection established; using xsalsa20_poly1305_lite ERROR - 2024-08-20 05:51:21,666 : POST::https://discord.com/api/v10/interactions/1275437007216185397/aW50ZXJhY3Rpb246MTI3NTQzNzAwNzIxNjE4NTM5NzpIUUoyYlVRbnRmWWdybjRock1JVDFiaFVvdllNVmZCZTVWRWpaT1JzZlVuN2FhTUVUVW9pS1JXUHViOTEzS3FKVlRRUXNBTmVPSk12aVIzUllseFV5Y0ZKdFA4dlp1WVRFS2F1aVZpSjZ1czRycm44cXNvV0dCV3NGUjJxUXViMw/callback: 400 INFO - 2024-08-20 05:51:21,693 : Session 5ac568fb-8a4d-44f6-a38a-2d2af42940c9 closed successfully INFO - 2024-08-20 05:51:21,693 : Command Called: play with event.ctx.args = ['404ee2b9-b01a-4f93-8d14-c55109d13934'] | event.ctx.kwargs = {'book': '404ee2b9-b01a-4f93-8d14-c55109d13934'} INFO - 2024-08-20 05:51:21,807 : Disconnecting from voice channel 1275421210301431839 INFO - 2024-08-20 05:52:42,800 : xlocalx, you are the owner and ownership is enabled! ERROR - 2024-08-20 05:52:43,032 : POST::https://discord.com/api/v10/interactions/1275437358350602315/aW50ZXJhY3Rpb246MTI3NTQzNzM1ODM1MDYwMjMxNTpGTVY2eUhxdDZQaTZNUHRpd1ZGNjVrU3k0TW50Vno2aFVZWWFia1VaT212ZXJ3NEVwc01mUm9BQTRvRnRTZFpLamdoMWlrYXpxUnlWWHpWb1hJSnZKakd1aFhTS2FCTDBZSW9HSVZkR3R5d3J3V1JvdGRLWllLQWY4bTBERkR3dw/callback: 400 ERROR - 2024-08-20 05:52:43,200 : POST::https://discord.com/api/v10/interactions/1275437358350602315/aW50ZXJhY3Rpb246MTI3NTQzNzM1ODM1MDYwMjMxNTpGTVY2eUhxdDZQaTZNUHRpd1ZGNjVrU3k0TW50Vno2aFVZWWFia1VaT212ZXJ3NEVwc01mUm9BQTRvRnRTZFpLamdoMWlrYXpxUnlWWHpWb1hJSnZKakd1aFhTS2FCTDBZSW9HSVZkR3R5d3J3V1JvdGRLWllLQWY4bTBERkR3dw/callback: 400 INFO - 2024-08-20 05:52:43,202 : Command Called: all-libraries with event.ctx.args = [] | event.ctx.kwargs = {} ERROR - 2024-08-20 05:52:43,204 : Ignoring exception in cmd/all-libraries: HTTPException: 400|Bad Request || Interaction has already been acknowledged. ERROR - 2024-08-20 05:52:43,335 : POST::https://discord.com/api/v10/interactions/1275437358350602315/aW50ZXJhY3Rpb246MTI3NTQzNzM1ODM1MDYwMjMxNTpGTVY2eUhxdDZQaTZNUHRpd1ZGNjVrU3k0TW50Vno2aFVZWWFia1VaT212ZXJ3NEVwc01mUm9BQTRvRnRTZFpLamdoMWlrYXpxUnlWWHpWb1hJSnZKakd1aFhTS2FCTDBZSW9HSVZkR3R5d3J3V1JvdGRLWllLQWY4bTBERkR3dw/callback: 400 `

Also, if the refresh of discord doesn't work, please turn on debug mode, by adding 'DEBUG_MODE' to True in your environmental variables. This will give you a verbose output in your log.

donkevlar commented 2 weeks ago

Closing due to inactivity.