diff options
author | 2021-12-28 00:28:33 -0500 | |
---|---|---|
committer | 2022-02-09 18:13:37 -0500 | |
commit | b6685b2acffc7958c0f960b3ab04ada731500d24 (patch) | |
tree | 5af9ce8d979a663f6f8cb296857913b519876d64 /bot/exts/events/trivianight/_questions.py | |
parent | full refactor complete (diff) |
remove UserScore
Diffstat (limited to 'bot/exts/events/trivianight/_questions.py')
-rw-r--r-- | bot/exts/events/trivianight/_questions.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bot/exts/events/trivianight/_questions.py b/bot/exts/events/trivianight/_questions.py index 7fb6dedf..0835d762 100644 --- a/bot/exts/events/trivianight/_questions.py +++ b/bot/exts/events/trivianight/_questions.py @@ -7,7 +7,6 @@ from discord.ui import Button, View from bot.constants import Colours, NEGATIVE_REPLIES -from . import UserScore from ._game import AlreadyUpdated, Question, QuestionClosed from ._scoreboard import Scoreboard @@ -154,18 +153,18 @@ class QuestionView(View): for user_id, answer in guesses.items(): if dict(self.question.answers)[answer[0]] == self.question.correct: scoreboard.assign_points( - UserScore(int(user_id)), + int(user_id), points=(1 - (answer[-1] / self.question.time) / 2) * self.question.max_points, speed=answer[-1] ) elif answer[-1] <= 2: scoreboard.assign_points( - UserScore(int(user_id)), + int(user_id), points=-(1 - (answer[-1] / self.question.time) / 2) * self.question.max_points ) else: scoreboard.assign_points( - UserScore(int(user_id)), + int(user_id), points=0 ) |