GeekyDeaks / discord-destinybot

Discord Destiny Bot
MIT License
8 stars 3 forks source link

Empty responses #14

Closed IrealiTY closed 7 years ago

IrealiTY commented 7 years ago

Using the d!manifest command to check if bot is working, succeeds. Using the d!stats results in no reply.

IrealiTY commented 7 years ago

Weird restarting the bot three times solved it... but still got these errors, are they normal responses?

2016-08-21T18:56:18.731Z - debug: got message from [Saeris] in channel [test]:  d!manifest
2016-08-21T18:56:18.732Z - debug: found command 'manifest'
2016-08-21T18:56:18.732Z - debug: executing command [manifest] with args []
2016-08-21T18:56:18.910Z - debug: issuing destiny API cmd: https://www.bungie.net/Platform/Destiny/Manifest/
2016-08-21T18:56:19.307Z - debug: response code 200
2016-08-21T18:56:19.308Z - debug: ErrorCode: 1, ThrottleSeconds: 0, ErrorStatus: Success, Message: Ok
2016-08-21T18:56:19.308Z - debug: No Language Flag entered or invaild language option specifed.
2016-08-21T18:56:19.308Z - debug: Defaulting to config option: en
unisys12 commented 7 years ago

Looks normal to me. What did the d!stats response look like?

On Sun, Aug 21, 2016, 2:07 PM Aleks notifications@github.com wrote:

Weird restarting the bot three times solved it... but still got these errors, are they normal responses?

2016-08-21T18:56:18.731Z - debug: got message from [Saeris] in channel [test]: d!manifest 2016-08-21T18:56:18.732Z - debug: found command 'manifest' 2016-08-21T18:56:18.732Z - debug: executing command [manifest] with args [] 2016-08-21T18:56:18.910Z - debug: issuing destiny API cmd: https://www.bungie.net/Platform/Destiny/Manifest/ 2016-08-21T18:56:19.307Z https://www.bungie.net/Platform/Destiny/Manifest/2016-08-21T18:56:19.307Z - debug: response code 200 2016-08-21T18:56:19.308Z - debug: ErrorCode: 1, ThrottleSeconds: 0, ErrorStatus: Success, Message: Ok 2016-08-21T18:56:19.308Z - debug: No Language Flag entered or invaild language option specifed. 2016-08-21T18:56:19.308Z - debug: Defaulting to config option: en

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/GeekyDeaks/discord-destinybot/issues/14#issuecomment-241275469, or mute the thread https://github.com/notifications/unsubscribe-auth/AB_vg2WzpSmRcvecIUAgP3Pz0chn6yMdks5qiKH6gaJpZM4JpXML .

GeekyDeaks commented 7 years ago

Hi Aleks - yeah, sorry should have explained, the master branch is in a state of flux right now as we are trying to work out the best way to sync the bungie manifest DB to the bot, but the d!stats and d!summary should still be working ok. There is another branch for the current VOC bot, which is stable if you want to take a look at that, but the structure is quite a bit different, so I'd probably still recommend working on this one for new features as all the old commands should be migrated in a few days time.

GeekyDeaks commented 7 years ago

I just remembered. The master branch is using mongodb now. It might behave erratically if it's not setup. I'll check. I also don't recommend switching between branches in the same local repo as the config.js has changed significantly enough to cause headaches. I'd suggest pulling the repo twice into two separate directories and doing a git checkout voc in one of them...

GeekyDeaks commented 7 years ago

Ok, master is now very close to stable - and should remain that way in future, but it needs the README updating to explaining the new config and mongoDB dependency for the destiny lookups.

IrealiTY commented 7 years ago

Cool cool - Ive been running the version I had since 2 days ago with no further issues - looks like if it suddenly stops working restarting the bot is a way to make it work again. No weirdness in the log tho.

I'll wait for your README update to update my own instance

GeekyDeaks commented 7 years ago

Ah ok - so we have noticed that discord.js can throw an uncaught exception on certain network issues and crash the bot. Our current workaround is to install pm2 and use that to keep the bot alive.

i.e.

sudo npm install pm2 -g
pm2 start destinybot.js

I am new to node, but from what I can gather, this is the preferred approach to unexpected errors, but if you have any other ideas please let us know!

GeekyDeaks commented 7 years ago

Hi Aleks, I have pushed a new README to explain a little of the new scheme and how to install. The main thing is that you will need to review the config.js carefully as the location of certain parameters has changed like the bungie API_KEY. All persistence now relies upon mongoDB too, so you may need to install a local instance.

Let us know how you get on.

GeekyDeaks commented 7 years ago

Is it ok for me to close this one now?

IrealiTY commented 7 years ago

Yep ;) Let me do that for you