pinano-discord / Pinano-Discord-Bot

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

BUG: new users don't get PRC rights or time-tracking #43

Closed pianiststickman closed 5 years ago

pianiststickman commented 5 years ago

Repro: join server with user the bot has never seen before, join channel. Chat permissions will not be enabled properly. Issue is due to a misplaced else clause:

if (we've never seen this user before) {
  create new user
} else {
  update PR permissions
  start time tracking
}

We should update PR permissions and start time tracking in conjunction with, not in alternative to, creating a new user.

Simple workaround is to just move them into a different channel. Once the user is created this bug no longer hits anymore.

pianiststickman commented 5 years ago

Fixed in #72