Synse / dclone-discord

Discord bot for reporting Diablo 2 Resurrected DClone status changes
GNU General Public License v3.0
5 stars 6 forks source link

Please Set Token Error #7

Closed Martuck closed 2 years ago

Martuck commented 2 years ago

Receiving "Please set DCLONE_DISCORD_TOKEN" even after setting it in .py.

Ubuntu 20.04.04

Synse commented 2 years ago

Hey @Martuck if you're setting the token directly in the .py file it should look like:

DCLONE_DISCORD_TOKEN = 'your.token.here'

or

DCLONE_DISCORD_TOKEN = environ.get('DCLONE_DISCORD_TOKEN', 'your.token.here')

However I'd strongly recommend using the environment variables. Two common ways to do this are:

export DCLONE_DISCORD_TOKEN='your.token.here'
python3 ./dclone_discord.py

or

DCLONE_DISCORD_TOKEN='your.token.here' python3 ./dclone_discord.py

Hopefully this helps!

Martuck commented 2 years ago

Ah, I was leaving out the comma... User error 100%. Up and running now.

No messages sent to channel when the bot starts running, does it only message when the count changes?

Synse commented 2 years ago

Ah, I was leaving out the comma... User error 100%. Up and running now.

:tada: Glad you were able to get it working.

No messages sent to channel when the bot starts running, does it only message when the count changes?

Correct. When the bot loads it gets the current progress and sets that as the current state. This is so you can restart the bot without sending a duplicate status update. When you start the bot you should see messages like this in your console:

Progress for Americas Ladder Softcore starting at 3/6 (reporter_id: 81734)
Progress for Americas Non-Ladder Softcore starting at 2/6 (reporter_id: 81734)

If you want to post the current status when the bot starts you could comment out this line.