pinano-discord / Pinano-Discord-Bot

A Discord bot for the Pinano guild
MIT License
9 stars 11 forks source link

reset doesn't happen anymore #25

Closed pianiststickman closed 5 years ago

pianiststickman commented 5 years ago

... because client.submitWeek calls into getWeeklyLeaderboard with a null message, and the callee then tries to get the guild ID out of the message.

In production I just patched this by commenting out the call to client.submitWeek because as far as I can tell, the data doesn't end up getting submitted anywhere anyway.

sit commented 5 years ago

Oh, so we broke it in #7 when we started trying to looking message.guild.id.

We may have to introduce somehow a notion of practice time per guild into the bot.

pianiststickman commented 5 years ago

Yep.

I'm not sure we necessarily need practice time per guild. The problem is that some things (e.g. live LB updates) key off the guild's message - i.e. it only checks current praccers in the guild where the message was sent - and some things operate across guilds, e.g. the list of permitted channels is agnostic to guild. If we're consistent about this I think it's fine to amass practice time globally.

Juliacare commented 5 years ago

Did it reset automatically last Sunday? If so, it appears to be fixed? @pianiststickman

pianiststickman commented 5 years ago

It's fixed by patching out a call to submitWeek. That's not a complete fix. We need to figure out what the proper fix is.

pianiststickman commented 5 years ago

Fixed somewhere in #70