[3.4] Add use_spoilers property to TRIVIA_LIST_SCHEMA schema (#5566) (#5757)

* Add `use_spoilers` to schema

* Update session.py

(cherry picked from commit cc3c1a6a95)

Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>

Co-authored-by: Kreusada <67752638+Kreusada@users.noreply.github.com>
Co-authored-by: Jakub Kuczys <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
Red-GitHubBot
2022-06-05 17:09:47 +02:00
committed by GitHub
parent be8df25ecf
commit c7ba118e7c
2 changed files with 2 additions and 0 deletions

View File

@@ -61,6 +61,7 @@ class TriviaSession:
- ``bot_plays`` (`bool`) - ``bot_plays`` (`bool`)
- ``allow_override`` (`bool`) - ``allow_override`` (`bool`)
- ``payout_multiplier`` (`float`) - ``payout_multiplier`` (`float`)
- ``use_spoilers`` (`bool`)
scores : `collections.Counter` scores : `collections.Counter`
A counter with the players as keys, and their scores as values. The A counter with the players as keys, and their scores as values. The
players are of type `discord.Member`. players are of type `discord.Member`.

View File

@@ -37,6 +37,7 @@ TRIVIA_LIST_SCHEMA = Schema(
Optional("bot_plays"): bool, Optional("bot_plays"): bool,
Optional("reveal_answer"): bool, Optional("reveal_answer"): bool,
Optional("payout_multiplier"): Or(int, float), Optional("payout_multiplier"): Or(int, float),
Optional("use_spoilers"): bool,
}, },
str: [str, int, bool, float], str: [str, int, bool, float],
} }