rssnyder / discord-stock-ticker

Add live stock & crypto prices to your discord sidebar.
https://rssnyder.github.io/discord-stock-ticker/
MIT License
293 stars 113 forks source link

Can't DELETE crypto ticker after having just started it #155

Closed go140point6 closed 2 years ago

go140point6 commented 2 years ago

Describe the bug issuing a curl DELETE command fails to stop the bot monitoring that crypto/ticker. Issue reproduced on v3.9.7 and v3.10.0-beta.14. Issue NOT present in v3.4.0 (used to validate the yt video).

To Reproduce Steps to reproduce the behavior:

  1. Command I used for Plugin crypto (ticker PLI): curl -X POST -H "Content-type: application/json" --data '{"name": "plugin","crypto": true,"ticker": "PLI","color": true,"decimals": 6,"nickname": true,"frequency": 10,"discord_bot_token": "MySuperSecretDiscordToken"}' localhost:8888/ticker

Logs (note the odd newline appended to the ticker):

level=info msg="Added ticker: PLI\n" level=info msg="Using usd" level=info msg="Watching crypto price for plugin"

  1. Command I used to stop monitoring the ticker: curl -X DELETE -H "Content-type: application/json" localhost:8888/ticker/plugin

Logs: level=error msg="No ticker found: plugin"

Attempted plugin, PLI, pli, PLUGIN and various ways to try and call PLI with the newline escaped just seeing if I could get it to delete, with no luck.

Expected behaviour I expect it to work like v3.4.0 and stop monitoring

level=debug msg="Got an API request to delete a ticker" level=info msg="Deleted ticker PLUGIN" level=info msg="Shutting down price watching for plugin"

Python (please complete the following information):

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.