mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-05 18:58:53 -05:00
Implement [p]trivia info and add DESCRIPTION to trivia schema (#5897)
Co-authored-by: Jakub Kuczys <me@jacken.men>
This commit is contained in:
parent
c3a493a500
commit
48d74712bc
@ -334,6 +334,26 @@ will use all of the specified lists to select questions from.
|
||||
|
||||
- ``<categories...>`` The category to play. Can be multiple.
|
||||
|
||||
.. _trivia-command-trivia-info:
|
||||
|
||||
^^^^^^^^^^^
|
||||
trivia info
|
||||
^^^^^^^^^^^
|
||||
|
||||
**Syntax**
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]trivia info <category>
|
||||
|
||||
**Description**
|
||||
|
||||
Get information about a trivia category.
|
||||
|
||||
**Arguments**
|
||||
|
||||
* ``<category>``: The category to get the information for.
|
||||
|
||||
.. _trivia-command-trivia-leaderboard:
|
||||
|
||||
^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@ -41,12 +41,33 @@ If there are multiple authors, we can separate them with commas.
|
||||
|
||||
AUTHOR: Red, Rojo, Rouge
|
||||
|
||||
-----------------
|
||||
Description Field
|
||||
-----------------
|
||||
|
||||
We can also add an optional ``DESCRIPTION`` to our trivia list, which
|
||||
will show from the output of ``[p]trivia info <category>``. The
|
||||
description should indicate to the user what the trivia list is
|
||||
about and what kind of questions they can expect to face.
|
||||
|
||||
For example, if you were writing a logo quiz trivia list, you could
|
||||
create a description like this:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
AUTHOR: Kreusada
|
||||
DESCRIPTION: >-
|
||||
A quiz to test your logo knowledge to the limit. This trivia
|
||||
will send image URLs and ask you to identify the company's name
|
||||
from the logo that is sent.
|
||||
|
||||
---------------------
|
||||
Questions and Answers
|
||||
---------------------
|
||||
|
||||
Writing questions and answers is simple. Once you've finished your
|
||||
``AUTHOR`` field, you can move on to your questions just below.
|
||||
``AUTHOR`` field and ``DESCRIPTION`` field, you can move on to your questions
|
||||
just below.
|
||||
|
||||
Questions should consist of at least one answer, with other
|
||||
possible answers included if necessary. You must put a colon at the end
|
||||
@ -98,6 +119,7 @@ As you've added more questions, your file should look something like this:
|
||||
.. code-block:: yaml
|
||||
|
||||
AUTHOR: Red
|
||||
DESCRIPTION: A general quiz to test your knowledge.
|
||||
How many days are there in a regular year?:
|
||||
- 365
|
||||
- three hundred and sixty five
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: JennJenn
|
||||
DESCRIPTION: A general knowledge trivia based around the year 2015.
|
||||
"\"L.A. Love (La La)\" is the title of a January 2015 Top Ten Smash hit for which singer?":
|
||||
- fergie
|
||||
"'Dismaland' was the temporary theme park/exhibition of which famous 'anonymous' artist?":
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: JennJenn
|
||||
DESCRIPTION: A general knowledge trivia based around the year 2016.
|
||||
"'Twilight' author Stephenie Meyer released an adult novel in 2016 called...?":
|
||||
- The Chemist
|
||||
A magnitude 6.2 earthquake hit which country on August 25 killing at least 247 people?:
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: JennJenn
|
||||
DESCRIPTION: A trivia about Anime.
|
||||
(Angel Sanctuary) Which angel is assigned to serve as Setsuna's guardian angel?:
|
||||
- Jibril
|
||||
- Gabriel
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: JennJenn
|
||||
DESCRIPTION: A trivia about art and literature.
|
||||
"\"Our Town\" is a play by whom?":
|
||||
- Thornton Wilder
|
||||
- Wilder
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: zmoTbb
|
||||
DESCRIPTION: A trivia about the Boom Beach online multiplayer game developed by Supercell.
|
||||
A group of islands is called a(n)___?:
|
||||
- Archipelago
|
||||
During the tutorial how many diamonds does it cost to complete the sniper tower?:
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: lumpycustard & mikel392
|
||||
DESCRIPTION: In this trivia, identify the car model from the image sent.
|
||||
What car is this? http://i.imgur.com/00lgfBA.jpg:
|
||||
- Hummer H3
|
||||
- H3
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: Tajniak96
|
||||
DESCRIPTION: "A trivia about Clash Royale: a free-to-play real-time strategy video game developed and published by Supercell."
|
||||
"\"Roses are red, ....... are blue, they can fly, and will crush you!\" Who is this about?":
|
||||
- Minions
|
||||
- minion
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: JennJenn
|
||||
DESCRIPTION: A trivia about computers and their components.
|
||||
A compact disc containing permanently stored data that cannot be altered?:
|
||||
- Compact Disc Read-Only Memory
|
||||
- CD-ROM
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: JennJenn
|
||||
DESCRIPTION: A trivia about Disney films and books.
|
||||
"\"El Libro de la Selva\" in English is translated into what Disney film?":
|
||||
- The Jungle Book
|
||||
"\"Higitus Figitus\" is the spellbinding song from what film?":
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
AUTHOR: Michaelis
|
||||
|
||||
DESCRIPTION: A trivia about the whole Doom video game franchise.
|
||||
# Classic Doom
|
||||
|
||||
"Name the company that developed Doom 1.":
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
AUTHOR: JennJenn
|
||||
DESCRIPTION: >-
|
||||
A trivia about Dota 2 abilities. In this trivia, identify the ability
|
||||
from the image sent. Dota 2 is a multiplayer online battle arena video game by Valve.
|
||||
What ability is this? (removed from game) https://i.imgur.com/0KZLUdJ.png:
|
||||
- Sadist
|
||||
What ability is this? (removed from game) https://i.imgur.com/GaGZzRK.png:
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
AUTHOR: JennJenn
|
||||
DESCRIPTION: >-
|
||||
A trivia about Dota 2 items. In this trivia, identify the item
|
||||
from the image sent. Dota 2 is a multiplayer online battle arena video game by Valve.
|
||||
What item is this? (removed from game) https://i.imgur.com/hze6GhN.png:
|
||||
- Poor Man's Shield
|
||||
- PMS
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: Mamalus
|
||||
DESCRIPTION: Can you identify the symbol of a chemical element from its name?
|
||||
What is the element symbol of "Actinium"?:
|
||||
- Ac
|
||||
What is the element symbol of "Aluminum"?:
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: JennJenn
|
||||
DESCRIPTION: A trivia about entertainment.
|
||||
"\"He's So Fine\", \"One Fine Day\" and \"A Love So Fine\" where hits for what fine group?":
|
||||
- The Chiffons
|
||||
"\"Joy to the World\" was a hit in 1971 for what band with three lead vocalists?":
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: KrisDLuna, Iris, Slackeffect, Falzar
|
||||
DESCRIPTION: A trivia about the Final Fantasy series.
|
||||
"'Final Fantasy VII: Avenged Children' is a movie. True/False?":
|
||||
- "False"
|
||||
(BRAVE EXVIUS) The Veritas originally comprised of how many members? (Answer without numerics):
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
DESCRIPTION: A trivia about the Game of Thrones TV series.
|
||||
What are the official words of House Arryn?:
|
||||
- As High as Honor
|
||||
What are the official words of House Baratheon?:
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: bobloy
|
||||
DESCRIPTION: A trivia about all kinds of games - computer games, board games, card games, and more.
|
||||
"\"Call of Duty: Ghosts\" is what number primary installment in the COD series?":
|
||||
- Ten
|
||||
- 10
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: JennJenn
|
||||
DESCRIPTION: A general knowledge trivia.
|
||||
"\"15, 30, 40, game\" is used for the scoring system of what sport?":
|
||||
- Tennis
|
||||
"\"Bharatanatyam\" is the national dance of what country?":
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: Kreusada
|
||||
DESCRIPTION: A trivia about geography.
|
||||
What is Earth's largest continent?:
|
||||
- Asia
|
||||
What country accounts for more than half of the western coastline of South America?:
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: JennJenn
|
||||
DESCRIPTION: A trivia about Greek mythology.
|
||||
According to Hesiod's "Theogeny", who was born from Uranus' penis which had been cut off?:
|
||||
- Aphrodite
|
||||
From whom did Hermes steal cattle?:
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: JennJenn & Unknown
|
||||
DESCRIPTION: A trivia about the Harry Potter novel series.
|
||||
A bezoar is a stone taken from the stomach of a ...?:
|
||||
- goat
|
||||
A wizard who can transform himself into an animal at will is called what?:
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: -Fulcrum#2658, A Wild Ferrothorn#0598, Blue™#3621, Cana#3619, Cardinal Billy#0833, Dynazide#9318, Filmnerdasaurus#3163, Firestarrox#6915, Fuzzysqurl#7058, GabeN#2515, Gates#9008, Gecko#3416, General Dan🎖#7690, Goals4Cory#3999, LaidenCee#5555, Marvelous_Chaos#7350, Mat#0317, Max Brown#3790, Michael#0575, Nate999#1285, Nikea8#0012, PenguinPride87#3572, Phantasmagoria#8041, Phinocio#6969, Pikaboo#2147, QuantiumP#1157, RWang95#3383, RandomBoltsFan#8134, SamT323#0323, Scaldera93#6969, Sigma#8016, Simba#4996, Spyders#1674, TheMiniatureMan#1024, TheRussianRocket#3638, TheVargTrain#6508, The_Notorious_BEN#0475, Theseolous#4208, Tooo#0123, TrustyJAID#0001, Tsar Peter the Great#1909, Windy City Hawkey#7814, Zero Very Cool#8863, aschwan41#0699, astrocreep#7211, brownboy102#2181, goobymaster#0025, guccipotato#7117, haha#0673, icseN#8889, investinsoup#7801, kopiikat#6135, kwando#1313, rpac62#7637, rufus#1996, sandman730#7796, scipio#4358, spookybecca#2969, tommybigshot#2455, and zonk#2716
|
||||
DESCRIPTION: A trivia about hockey.
|
||||
# Start of original trivia list curated from various sources on the internet by TrustyJAID#0001
|
||||
Alex Ovechkin is climbing fast on the Russian point scorer top list. But who is the all-time regular season Russian point leader in the NHL?:
|
||||
- Sergei Fedorov
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: JennJenn
|
||||
DESCRIPTION: "A trivia about League of Legends: an online battle arena video game developed and published by Riot Games."
|
||||
"...is scared of Jinx because she always wants to hug him?":
|
||||
- Ziggs
|
||||
According to the dating service run by Blitzcrank, what is Rammus' best match?:
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
AUTHOR: JennJenn
|
||||
DESCRIPTION: >-
|
||||
In this trivia, identify the name of the LoL champion from their ultimate which is sent.
|
||||
League of Legends is an online battle arena video game developed and published by Riot Games.
|
||||
"Which champion's ultimate is named: Absolute Zero?":
|
||||
- Nunu
|
||||
"Which champion's ultimate is named: Abyssal Voyage?":
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: owo
|
||||
DESCRIPTION: A trivia about The Lord of the Rings film series.
|
||||
"In \"The Fellowship of the Ring\", what is the name of the ferry the hobbits use to escape the Black Riders?":
|
||||
- Bucklebury Ferry
|
||||
"Arwen halts her horse and turns back towards the river, raising her hands in a magical gesture. Arwen: \"You shall not pass!\" Which race of creatures were soon to regret their decision not to heed this warning?":
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: Aurorum
|
||||
DESCRIPTION: Can you identify the Michael Jackson song from the lyrics?
|
||||
(Identify the Michael Jackson song) As he came into the window was the sound of a crescendo:
|
||||
- Smooth Criminal
|
||||
(Identify the Michael Jackson song) Sounding heartbeats, intimidations:
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: KaiGucci (kidsterz)
|
||||
DESCRIPTION: A trivia about Major League Baseball.
|
||||
Who holds the record for most carer home runs hit?:
|
||||
- Barry Bonds
|
||||
- Barry bonds
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: Lemon (inthedark.org#0666)
|
||||
DESCRIPTION: A trivia about music and its history.
|
||||
Which famous group performed the first ever song on Top Of The Pops in 1964?:
|
||||
- The Rolling Stones
|
||||
Which band has released albums titled Word Gets Around, Just Enough Education To Perform and Pull The Pin?:
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: aeari & mrfizzl3
|
||||
DESCRIPTION: A trivia about the National Basketball Association in North America.
|
||||
After what player was diagnosed with HIV, many NBA players claimed he shouldn't play because there could be a risk of contamination if he had an open wound?:
|
||||
- Magic Johnson
|
||||
Atlanta _______?:
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: ThePhoenixGuy & sinsterpyro
|
||||
DESCRIPTION: A trivia about the Overwatch games, developed by Blizzard Entertainment.
|
||||
Do omnics and humans live as equals in Numbani?:
|
||||
- "Yes"
|
||||
During the ARG which company's CEO did the hero want to "take down"?:
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: grantguglielmo
|
||||
DESCRIPTION: A trivia about Pokémon.
|
||||
"\"A ball that is more effective as more turns are taken in battle.\" What kind of Pokéball is it?":
|
||||
- Timer ball
|
||||
- Timer
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: Aurorum
|
||||
DESCRIPTION: Can you identify the Prince song from the lyrics?
|
||||
(Identify the Prince song) Springtime was always my favourite time of year:
|
||||
- Sometimes It Snows in April
|
||||
(Identify the Prince song) Sometimes I wish that life was never ending:
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
AUTHOR: MHLoppy
|
||||
DESCRIPTION: >-
|
||||
A trivia about Tom Clancy's Rainbow Six Siege: an online tactical shooter video
|
||||
game developed by Ubisoft Montreal.
|
||||
"\"Calm in crises. Alex harbors a joyous, if acerbic outlook.\" Who is this describing?":
|
||||
- Tachanka
|
||||
"\"Doc thinks he lacks the empathy necessary to help in medical crises\" - who is this describing?":
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: JennJenn
|
||||
DESCRIPTION: A trivia where you have to identify the author/creator of the famous slogan.
|
||||
100% juice for 100% kids.:
|
||||
- Juicy Juice
|
||||
15 minutes could save you 15% or more on car insurance.:
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: hatred
|
||||
DESCRIPTION: A trivia about a range of sports.
|
||||
A shuttlecock is used in what sport?:
|
||||
- Badminton
|
||||
At the 2000 Summer Paralympics, how many members of the gold medal-winning Spanish basketball team were later found to have no disability?:
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: scarecr0w12, Sashasonic, aikaterna
|
||||
DESCRIPTION: A trivia about the Star Wars franchise.
|
||||
In what year did the Vulcans make official first contact with Zefram Cochrane?:
|
||||
- 2063
|
||||
In what state is Carbon Creek located?:
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: Mahlss & Fjall
|
||||
DESCRIPTION: A trivia about the Star Trek franchise.
|
||||
According to C-3PO, Why wouldn't Han recognize him in TFA?:
|
||||
- Red Arm
|
||||
- The Red Arm
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: JennJenn
|
||||
DESCRIPTION: In this trivia, identify the USA state/territory capitals of the provided state/territory.
|
||||
What is the USA state capital of Alabama?:
|
||||
- Montgomery
|
||||
What is the USA state capital of Alaska?:
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: Volhosis
|
||||
DESCRIPTION: A trivia where you have to identify the USA state/territory from their flag.
|
||||
What USA state or territory is represented by this flag? https://i.imgur.com/0xDmqqw.png:
|
||||
- Alaska
|
||||
What USA state or territory is represented by this flag? https://i.imgur.com/1RJrCG9.png:
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: Volhosis
|
||||
DESCRIPTION: A trivia where you have to identify the USA state/territory from the map sent.
|
||||
What USA state or territory is highlighted on this map? https://i.imgur.com/1vtdaEL.png:
|
||||
- Maryland
|
||||
What USA state or territory is highlighted on this map? https://i.imgur.com/23MMmJ4.png:
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: Pqrallel & JennJenn
|
||||
DESCRIPTION: In this trivia, identify the abbreviation from the US state, and identify the US state from the abbreviation.
|
||||
What is the abbreviation for Alabama?:
|
||||
- AL
|
||||
What is the abbreviation for Alaska?:
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: Sikksens
|
||||
DESCRIPTION: A trivia about Warcraft.
|
||||
"\"I serve a new master now, mortals!\" is yelled by which Firelands boss?":
|
||||
- Alysrazor
|
||||
"\"I think I made an angry poo poo. It gonna blow!\" is a classic line from which Icecrown Citadel boss?":
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
AUTHOR: aikaterna
|
||||
DESCRIPTION: >-
|
||||
Can you identify the pokémon from their image?
|
||||
The pokémons included are from the first generation.
|
||||
Who's that Pokémon? https://cdn.discord.red/i/JhaHtAM.png:
|
||||
- Bulbasaur
|
||||
Who's that Pokémon? https://cdn.discord.red/i/J42krSc.png:
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
AUTHOR: aikaterna, owo
|
||||
DESCRIPTION: >-
|
||||
Can you identify the pokémon from their image?
|
||||
The pokémons included are from the second generation.
|
||||
Who's that Pokémon? https://cdn.discord.red/i/161fDs6.png:
|
||||
- Chikorita
|
||||
Who's that Pokémon? https://cdn.discord.red/i/9mBd4k5.png:
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
AUTHOR: aikaterna, owo
|
||||
DESCRIPTION: >-
|
||||
Can you identify the pokémon from their image?
|
||||
The pokémons included are from the third generation.
|
||||
"Who's that Pokémon? https://cdn.discord.red/i/xvnKvtR.png":
|
||||
- Treecko
|
||||
"Who's that Pokémon? https://cdn.discord.red/i/B3RI772.png":
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
AUTHOR: aikaterna, thisisjvgrace
|
||||
DESCRIPTION: >-
|
||||
Can you identify the pokémon from their image?
|
||||
The pokémons included are from the fourth generation.
|
||||
"Who's that Pokémon? https://cdn.discord.red/i/YJQn59B.png":
|
||||
- Turtwig
|
||||
"Who's that Pokémon? https://cdn.discord.red/i/N7Pxrgx.png":
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
AUTHOR: aikaterna, siu3334
|
||||
DESCRIPTION: >-
|
||||
Can you identify the pokémon from their image?
|
||||
The pokémons included are from the fifth generation.
|
||||
"Who's that Pokémon? https://cdn.discord.red/i/TNIMTaU.png":
|
||||
- Victini
|
||||
"Who's that Pokémon? https://cdn.discord.red/i/VFBHT77.png":
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
AUTHOR: aikaterna, siu3334
|
||||
DESCRIPTION: >-
|
||||
Can you identify the pokémon from their image?
|
||||
The pokémons included are from the sixth generation.
|
||||
"Who's that Pokémon? https://cdn.discord.red/i/zIOV6uc.png":
|
||||
- Chespin
|
||||
"Who's that Pokémon? https://cdn.discord.red/i/ndUHOeX.png":
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
AUTHOR: SnappyDragon64
|
||||
DESCRIPTION: >-
|
||||
Can you identify the pokémon from their image?
|
||||
The pokémons included are from the seventh generation.
|
||||
"Who's that Pokémon? https://cdn.discord.red/i/XjTkoRQ.png":
|
||||
- Rowlet
|
||||
"Who's that Pokémon? https://cdn.discord.red/i/geEs30F.png":
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
AUTHOR: SnappyDragon64
|
||||
DESCRIPTION: >-
|
||||
Can you identify the pokémon from their image?
|
||||
The pokémons included are from the eighth generation.
|
||||
"Who's that Pokémon? https://cdn.discord.red/i/aNwtQ3V.png":
|
||||
- Grookey
|
||||
"Who's that Pokémon? https://cdn.discord.red/i/n8H4sB6.png":
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: JennJenn
|
||||
DESCRIPTION: In this trivia, identify the capital city of the country.
|
||||
Name one of the capitals of South Africa?:
|
||||
- Pretoria
|
||||
- Cape Town
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: Kreusada
|
||||
DESCRIPTION: A trivia about the FIFA World Cup.
|
||||
|
||||
# Notices
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: Volhosis
|
||||
DESCRIPTION: In this trivia, identify the country from their flag.
|
||||
What country is represented by this flag? https://i.imgur.com/00SGRuz.png:
|
||||
- Myanmar
|
||||
- Burma
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
AUTHOR: Volhosis
|
||||
DESCRIPTION: In this trivia, identify the country from their position on the map.
|
||||
What country is highlighted on this map? https://i.imgur.com/09dDNah.png:
|
||||
- Egypt
|
||||
What country is highlighted on this map? https://i.imgur.com/0iRnWAj.png:
|
||||
|
||||
@ -37,7 +37,16 @@ MATCH_ALL_BUT_STR = Optional(Use(not_str))
|
||||
TRIVIA_LIST_SCHEMA = Schema(
|
||||
{
|
||||
Optional("$schema"): And(str, error=_("{key} key must be a text value.")),
|
||||
Optional("AUTHOR"): And(str, error=_("{key} key must be a text value.")),
|
||||
Optional("AUTHOR"): And(
|
||||
str,
|
||||
lambda text: 1 <= len(text) <= 1000,
|
||||
error=_("{key} key must be a text value not longer than 1000 characters."),
|
||||
),
|
||||
Optional("DESCRIPTION"): And(
|
||||
str,
|
||||
lambda text: 1 <= len(text) <= 200,
|
||||
error=_("{key} key must be a text value not longer than 200 characters."),
|
||||
),
|
||||
Optional("CONFIG"): And(
|
||||
{
|
||||
Optional("max_score"): And(
|
||||
|
||||
@ -15,7 +15,7 @@ from redbot.core.bot import Red
|
||||
from redbot.core.data_manager import cog_data_path
|
||||
from redbot.core.i18n import Translator, cog_i18n
|
||||
from redbot.core.utils import AsyncIter, can_user_react_in
|
||||
from redbot.core.utils.chat_formatting import box, pagify, bold
|
||||
from redbot.core.utils.chat_formatting import box, pagify, bold, inline, italics, humanize_number
|
||||
from redbot.core.utils.menus import start_adding_reactions
|
||||
from redbot.core.utils.predicates import MessagePredicate, ReactionPredicate
|
||||
|
||||
@ -37,6 +37,38 @@ class InvalidListError(Exception):
|
||||
pass
|
||||
|
||||
|
||||
def _format_setting_value(key: str, value: Union[float, bool]) -> str:
|
||||
# handle bools
|
||||
if value is True:
|
||||
return _("Yes")
|
||||
if value is False:
|
||||
return _("No")
|
||||
# handle numbers
|
||||
value = humanize_number(value)
|
||||
if key in ("delay", "timeout"):
|
||||
return _("{seconds} seconds").format(seconds=value)
|
||||
return str(value)
|
||||
|
||||
|
||||
def format_settings(settings: Dict[str, Union[float, bool]]) -> str:
|
||||
setting_names = {
|
||||
"bot_plays": _("Bot gains points"),
|
||||
"delay": _("Answer time limit"),
|
||||
"timeout": _("Lack of response timeout"),
|
||||
"max_score": _("Points to win"),
|
||||
"reveal_answer": _("Answers are revealed on timeout"),
|
||||
"payout_multiplier": _("Payout multiplier"),
|
||||
"allow_override": _("Lists are allowed to override settings"),
|
||||
"use_spoilers": _("Answers use spoilers"),
|
||||
}
|
||||
|
||||
return "\n".join(
|
||||
f"{setting_name}: {_format_setting_value(key, settings[key])}"
|
||||
for key, setting_name in setting_names.items()
|
||||
if key in settings
|
||||
)
|
||||
|
||||
|
||||
@cog_i18n(_)
|
||||
class Trivia(commands.Cog):
|
||||
"""Play trivia with friends!"""
|
||||
@ -84,22 +116,8 @@ class Trivia(commands.Cog):
|
||||
@triviaset.command(name="showsettings")
|
||||
async def triviaset_showsettings(self, ctx: commands.Context):
|
||||
"""Show the current trivia settings."""
|
||||
settings = self.config.guild(ctx.guild)
|
||||
settings_dict = await settings.all()
|
||||
msg = box(
|
||||
_(
|
||||
"Current settings\n"
|
||||
"Bot gains points: {bot_plays}\n"
|
||||
"Answer time limit: {delay} seconds\n"
|
||||
"Lack of response timeout: {timeout} seconds\n"
|
||||
"Points to win: {max_score}\n"
|
||||
"Reveal answer on timeout: {reveal_answer}\n"
|
||||
"Payout multiplier: {payout_multiplier}\n"
|
||||
"Allow lists to override settings: {allow_override}\n"
|
||||
"Use Spoilers in answers: {use_spoilers}"
|
||||
).format(**settings_dict),
|
||||
lang="py",
|
||||
)
|
||||
settings = await self.config.guild(ctx.guild).all()
|
||||
msg = box(_("Current settings:\n\n") + format_settings(settings))
|
||||
await ctx.send(msg)
|
||||
|
||||
@triviaset.command(name="maxscore")
|
||||
@ -340,6 +358,7 @@ class Trivia(commands.Cog):
|
||||
else:
|
||||
trivia_dict.update(dict_)
|
||||
authors.append(trivia_dict.pop("AUTHOR", None))
|
||||
trivia_dict.pop("DESCRIPTION", None)
|
||||
continue
|
||||
return
|
||||
if not trivia_dict:
|
||||
@ -387,6 +406,59 @@ class Trivia(commands.Cog):
|
||||
else:
|
||||
await ctx.send(msg)
|
||||
|
||||
@trivia.command(name="info")
|
||||
async def trivia_info(self, ctx: commands.Context, category: str.lower):
|
||||
"""Get information about a trivia category."""
|
||||
try:
|
||||
data = self.get_trivia_list(category)
|
||||
except FileNotFoundError:
|
||||
return await ctx.send(
|
||||
_(
|
||||
"Category {name} does not exist."
|
||||
" See {command} for the list of available trivia categories."
|
||||
).format(name=inline(category), command=inline(f"{ctx.clean_prefix}trivia list"))
|
||||
)
|
||||
except InvalidListError:
|
||||
return await ctx.send(
|
||||
_(
|
||||
"There was an error parsing the trivia list for the {name} category."
|
||||
" It may be formatted incorrectly."
|
||||
).format(name=inline(category))
|
||||
)
|
||||
|
||||
config_overrides = data.pop("CONFIG", None)
|
||||
|
||||
embed = discord.Embed(
|
||||
title=_('"{category}" Category Details').format(category=category),
|
||||
color=await ctx.embed_colour(),
|
||||
)
|
||||
embed.add_field(
|
||||
name=_("Authors"), value=data.pop("AUTHOR", "").strip() or italics(_("Not provided."))
|
||||
)
|
||||
embed.add_field(name=_("Question count"), value=len(data))
|
||||
embed.add_field(
|
||||
name=_("Custom"),
|
||||
value=_format_setting_value(
|
||||
"", any(category == p.resolve().stem for p in cog_data_path(self).glob("*.yaml"))
|
||||
),
|
||||
)
|
||||
embed.add_field(
|
||||
name=_("Description"),
|
||||
value=(
|
||||
data.pop("DESCRIPTION", "").strip()
|
||||
or italics(_("No description provided for this category."))
|
||||
),
|
||||
inline=False,
|
||||
)
|
||||
|
||||
if config_overrides:
|
||||
embed.add_field(
|
||||
name=_("Config"),
|
||||
value=box(format_settings(config_overrides)),
|
||||
inline=False,
|
||||
)
|
||||
await ctx.send(embed=embed)
|
||||
|
||||
@trivia.group(
|
||||
name="leaderboard", aliases=["lboard"], autohelp=False, invoke_without_command=True
|
||||
)
|
||||
|
||||
@ -12,6 +12,10 @@
|
||||
"type": "string",
|
||||
"description": "Author of the Trivia list."
|
||||
},
|
||||
"DESCRIPTION": {
|
||||
"type": "string",
|
||||
"description": "Brief description of the Trivia list."
|
||||
},
|
||||
"CONFIG": {
|
||||
"type": "object",
|
||||
"description": "The configuration for a trivia session.",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user