diff --git a/docs/cog_guides/trivia.rst b/docs/cog_guides/trivia.rst index 3996e29f0e4..1421b43cb8f 100644 --- a/docs/cog_guides/trivia.rst +++ b/docs/cog_guides/trivia.rst @@ -334,6 +334,26 @@ will use all of the specified lists to select questions from. - ```` The category to play. Can be multiple. +.. _trivia-command-trivia-info: + +^^^^^^^^^^^ +trivia info +^^^^^^^^^^^ + +**Syntax** + +.. code-block:: none + + [p]trivia info + +**Description** + +Get information about a trivia category. + +**Arguments** + +* ````: The category to get the information for. + .. _trivia-command-trivia-leaderboard: ^^^^^^^^^^^^^^^^^^ diff --git a/docs/guide_trivia_list_creation.rst b/docs/guide_trivia_list_creation.rst index 7eba84f9a48..3521b1aed8c 100644 --- a/docs/guide_trivia_list_creation.rst +++ b/docs/guide_trivia_list_creation.rst @@ -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 ``. 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 diff --git a/redbot/cogs/trivia/data/lists/2015.yaml b/redbot/cogs/trivia/data/lists/2015.yaml index bb802e7d7ef..55a1b75c424 100644 --- a/redbot/cogs/trivia/data/lists/2015.yaml +++ b/redbot/cogs/trivia/data/lists/2015.yaml @@ -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?": diff --git a/redbot/cogs/trivia/data/lists/2016.yaml b/redbot/cogs/trivia/data/lists/2016.yaml index ac24b2484ec..75c6979c35e 100644 --- a/redbot/cogs/trivia/data/lists/2016.yaml +++ b/redbot/cogs/trivia/data/lists/2016.yaml @@ -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?: diff --git a/redbot/cogs/trivia/data/lists/anime.yaml b/redbot/cogs/trivia/data/lists/anime.yaml index 39c098aadfe..e5535e8d5cf 100644 --- a/redbot/cogs/trivia/data/lists/anime.yaml +++ b/redbot/cogs/trivia/data/lists/anime.yaml @@ -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 diff --git a/redbot/cogs/trivia/data/lists/artandliterature.yaml b/redbot/cogs/trivia/data/lists/artandliterature.yaml index f979fed77cd..4a1e8a1e00e 100644 --- a/redbot/cogs/trivia/data/lists/artandliterature.yaml +++ b/redbot/cogs/trivia/data/lists/artandliterature.yaml @@ -1,4 +1,5 @@ AUTHOR: JennJenn +DESCRIPTION: A trivia about art and literature. "\"Our Town\" is a play by whom?": - Thornton Wilder - Wilder diff --git a/redbot/cogs/trivia/data/lists/boombeach.yaml b/redbot/cogs/trivia/data/lists/boombeach.yaml index 857445edd32..bcafb9bd4c0 100644 --- a/redbot/cogs/trivia/data/lists/boombeach.yaml +++ b/redbot/cogs/trivia/data/lists/boombeach.yaml @@ -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?: diff --git a/redbot/cogs/trivia/data/lists/cars.yaml b/redbot/cogs/trivia/data/lists/cars.yaml index 651f5ec04c0..795d710196b 100644 --- a/redbot/cogs/trivia/data/lists/cars.yaml +++ b/redbot/cogs/trivia/data/lists/cars.yaml @@ -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 diff --git a/redbot/cogs/trivia/data/lists/clashroyale.yaml b/redbot/cogs/trivia/data/lists/clashroyale.yaml index 76942d120bf..fd39a20113e 100644 --- a/redbot/cogs/trivia/data/lists/clashroyale.yaml +++ b/redbot/cogs/trivia/data/lists/clashroyale.yaml @@ -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 diff --git a/redbot/cogs/trivia/data/lists/computers.yaml b/redbot/cogs/trivia/data/lists/computers.yaml index 0249bd491d2..8c2570aaccf 100644 --- a/redbot/cogs/trivia/data/lists/computers.yaml +++ b/redbot/cogs/trivia/data/lists/computers.yaml @@ -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 diff --git a/redbot/cogs/trivia/data/lists/disney.yaml b/redbot/cogs/trivia/data/lists/disney.yaml index a0548d75e7f..b7254c306a5 100644 --- a/redbot/cogs/trivia/data/lists/disney.yaml +++ b/redbot/cogs/trivia/data/lists/disney.yaml @@ -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?": diff --git a/redbot/cogs/trivia/data/lists/doom.yaml b/redbot/cogs/trivia/data/lists/doom.yaml index 3fcca91e287..4ffc7bd9157 100644 --- a/redbot/cogs/trivia/data/lists/doom.yaml +++ b/redbot/cogs/trivia/data/lists/doom.yaml @@ -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.": diff --git a/redbot/cogs/trivia/data/lists/dota2abilities.yaml b/redbot/cogs/trivia/data/lists/dota2abilities.yaml index 82b03d080c4..6449daab96e 100644 --- a/redbot/cogs/trivia/data/lists/dota2abilities.yaml +++ b/redbot/cogs/trivia/data/lists/dota2abilities.yaml @@ -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: diff --git a/redbot/cogs/trivia/data/lists/dota2items.yaml b/redbot/cogs/trivia/data/lists/dota2items.yaml index 6d9fc81198e..ff35e523596 100644 --- a/redbot/cogs/trivia/data/lists/dota2items.yaml +++ b/redbot/cogs/trivia/data/lists/dota2items.yaml @@ -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 diff --git a/redbot/cogs/trivia/data/lists/elements.yaml b/redbot/cogs/trivia/data/lists/elements.yaml index 8c622f34922..ba68e87254b 100644 --- a/redbot/cogs/trivia/data/lists/elements.yaml +++ b/redbot/cogs/trivia/data/lists/elements.yaml @@ -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"?: diff --git a/redbot/cogs/trivia/data/lists/entertainment.yaml b/redbot/cogs/trivia/data/lists/entertainment.yaml index 7c041f69d1c..e60d9938679 100644 --- a/redbot/cogs/trivia/data/lists/entertainment.yaml +++ b/redbot/cogs/trivia/data/lists/entertainment.yaml @@ -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?": diff --git a/redbot/cogs/trivia/data/lists/finalfantasy.yaml b/redbot/cogs/trivia/data/lists/finalfantasy.yaml index a1c5d587143..785a5ddfe34 100644 --- a/redbot/cogs/trivia/data/lists/finalfantasy.yaml +++ b/redbot/cogs/trivia/data/lists/finalfantasy.yaml @@ -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): diff --git a/redbot/cogs/trivia/data/lists/gameofthrones.yaml b/redbot/cogs/trivia/data/lists/gameofthrones.yaml index b1830e44eff..50894f50281 100644 --- a/redbot/cogs/trivia/data/lists/gameofthrones.yaml +++ b/redbot/cogs/trivia/data/lists/gameofthrones.yaml @@ -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?: diff --git a/redbot/cogs/trivia/data/lists/games.yaml b/redbot/cogs/trivia/data/lists/games.yaml index 63e4335a829..c9cdd159d8d 100644 --- a/redbot/cogs/trivia/data/lists/games.yaml +++ b/redbot/cogs/trivia/data/lists/games.yaml @@ -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 diff --git a/redbot/cogs/trivia/data/lists/general.yaml b/redbot/cogs/trivia/data/lists/general.yaml index 69f92e4a32d..3a330939ae9 100644 --- a/redbot/cogs/trivia/data/lists/general.yaml +++ b/redbot/cogs/trivia/data/lists/general.yaml @@ -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?": diff --git a/redbot/cogs/trivia/data/lists/geography.yaml b/redbot/cogs/trivia/data/lists/geography.yaml index 6c52a59598c..0f0c3a68c1a 100644 --- a/redbot/cogs/trivia/data/lists/geography.yaml +++ b/redbot/cogs/trivia/data/lists/geography.yaml @@ -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?: diff --git a/redbot/cogs/trivia/data/lists/greekmyth.yaml b/redbot/cogs/trivia/data/lists/greekmyth.yaml index bc84af50f9a..1ad35cb9cc0 100644 --- a/redbot/cogs/trivia/data/lists/greekmyth.yaml +++ b/redbot/cogs/trivia/data/lists/greekmyth.yaml @@ -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?: diff --git a/redbot/cogs/trivia/data/lists/harrypotter.yaml b/redbot/cogs/trivia/data/lists/harrypotter.yaml index c51450f0b9d..de377e32d3f 100644 --- a/redbot/cogs/trivia/data/lists/harrypotter.yaml +++ b/redbot/cogs/trivia/data/lists/harrypotter.yaml @@ -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?: diff --git a/redbot/cogs/trivia/data/lists/hockey.yaml b/redbot/cogs/trivia/data/lists/hockey.yaml index 5a8c7d35c15..dc6408b0232 100644 --- a/redbot/cogs/trivia/data/lists/hockey.yaml +++ b/redbot/cogs/trivia/data/lists/hockey.yaml @@ -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 diff --git a/redbot/cogs/trivia/data/lists/leagueoflegends.yaml b/redbot/cogs/trivia/data/lists/leagueoflegends.yaml index d80e822cada..0c55c662bca 100644 --- a/redbot/cogs/trivia/data/lists/leagueoflegends.yaml +++ b/redbot/cogs/trivia/data/lists/leagueoflegends.yaml @@ -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?: diff --git a/redbot/cogs/trivia/data/lists/leagueults.yaml b/redbot/cogs/trivia/data/lists/leagueults.yaml index cd3c9525155..353ef00abd3 100644 --- a/redbot/cogs/trivia/data/lists/leagueults.yaml +++ b/redbot/cogs/trivia/data/lists/leagueults.yaml @@ -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?": diff --git a/redbot/cogs/trivia/data/lists/lotr.yaml b/redbot/cogs/trivia/data/lists/lotr.yaml index 954a2cabdef..03a88d3144f 100644 --- a/redbot/cogs/trivia/data/lists/lotr.yaml +++ b/redbot/cogs/trivia/data/lists/lotr.yaml @@ -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?": diff --git a/redbot/cogs/trivia/data/lists/michaeljackson.yaml b/redbot/cogs/trivia/data/lists/michaeljackson.yaml index 864990aedc5..709b4ad1955 100644 --- a/redbot/cogs/trivia/data/lists/michaeljackson.yaml +++ b/redbot/cogs/trivia/data/lists/michaeljackson.yaml @@ -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: diff --git a/redbot/cogs/trivia/data/lists/mlb.yaml b/redbot/cogs/trivia/data/lists/mlb.yaml index f7be298b28e..0ed6e5b12b9 100644 --- a/redbot/cogs/trivia/data/lists/mlb.yaml +++ b/redbot/cogs/trivia/data/lists/mlb.yaml @@ -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 diff --git a/redbot/cogs/trivia/data/lists/music.yaml b/redbot/cogs/trivia/data/lists/music.yaml index 0c2b4b23e99..827ba3b9120 100644 --- a/redbot/cogs/trivia/data/lists/music.yaml +++ b/redbot/cogs/trivia/data/lists/music.yaml @@ -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?: diff --git a/redbot/cogs/trivia/data/lists/nba.yaml b/redbot/cogs/trivia/data/lists/nba.yaml index cd58cbd9443..d1506b6bf09 100644 --- a/redbot/cogs/trivia/data/lists/nba.yaml +++ b/redbot/cogs/trivia/data/lists/nba.yaml @@ -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 _______?: diff --git a/redbot/cogs/trivia/data/lists/overwatch.yaml b/redbot/cogs/trivia/data/lists/overwatch.yaml index 152b4404abd..d448f45002b 100644 --- a/redbot/cogs/trivia/data/lists/overwatch.yaml +++ b/redbot/cogs/trivia/data/lists/overwatch.yaml @@ -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"?: diff --git a/redbot/cogs/trivia/data/lists/pokemon.yaml b/redbot/cogs/trivia/data/lists/pokemon.yaml index b62cd21646d..80376266a52 100644 --- a/redbot/cogs/trivia/data/lists/pokemon.yaml +++ b/redbot/cogs/trivia/data/lists/pokemon.yaml @@ -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 diff --git a/redbot/cogs/trivia/data/lists/prince.yaml b/redbot/cogs/trivia/data/lists/prince.yaml index ce78b5a0790..916027c13a7 100644 --- a/redbot/cogs/trivia/data/lists/prince.yaml +++ b/redbot/cogs/trivia/data/lists/prince.yaml @@ -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: diff --git a/redbot/cogs/trivia/data/lists/r6siege.yaml b/redbot/cogs/trivia/data/lists/r6siege.yaml index 9424476dc05..168419ee1d2 100644 --- a/redbot/cogs/trivia/data/lists/r6siege.yaml +++ b/redbot/cogs/trivia/data/lists/r6siege.yaml @@ -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?": diff --git a/redbot/cogs/trivia/data/lists/slogans.yaml b/redbot/cogs/trivia/data/lists/slogans.yaml index ebb73bdd86d..7f023f5aad8 100644 --- a/redbot/cogs/trivia/data/lists/slogans.yaml +++ b/redbot/cogs/trivia/data/lists/slogans.yaml @@ -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.: diff --git a/redbot/cogs/trivia/data/lists/sports.yaml b/redbot/cogs/trivia/data/lists/sports.yaml index bc64103e43b..38d405a0743 100644 --- a/redbot/cogs/trivia/data/lists/sports.yaml +++ b/redbot/cogs/trivia/data/lists/sports.yaml @@ -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?: diff --git a/redbot/cogs/trivia/data/lists/startrek.yaml b/redbot/cogs/trivia/data/lists/startrek.yaml index 5f351313456..b29849a6f26 100644 --- a/redbot/cogs/trivia/data/lists/startrek.yaml +++ b/redbot/cogs/trivia/data/lists/startrek.yaml @@ -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?: diff --git a/redbot/cogs/trivia/data/lists/starwars.yaml b/redbot/cogs/trivia/data/lists/starwars.yaml index 4221d51044c..2628984e7a0 100644 --- a/redbot/cogs/trivia/data/lists/starwars.yaml +++ b/redbot/cogs/trivia/data/lists/starwars.yaml @@ -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 diff --git a/redbot/cogs/trivia/data/lists/uscapitals.yaml b/redbot/cogs/trivia/data/lists/uscapitals.yaml index 3ff2db45960..c50f5568a51 100644 --- a/redbot/cogs/trivia/data/lists/uscapitals.yaml +++ b/redbot/cogs/trivia/data/lists/uscapitals.yaml @@ -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?: diff --git a/redbot/cogs/trivia/data/lists/usflags.yaml b/redbot/cogs/trivia/data/lists/usflags.yaml index 62d2e3bb949..3f8d1a7eec4 100644 --- a/redbot/cogs/trivia/data/lists/usflags.yaml +++ b/redbot/cogs/trivia/data/lists/usflags.yaml @@ -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: diff --git a/redbot/cogs/trivia/data/lists/usmap.yaml b/redbot/cogs/trivia/data/lists/usmap.yaml index 0384f3008e5..d06f29e7dc8 100644 --- a/redbot/cogs/trivia/data/lists/usmap.yaml +++ b/redbot/cogs/trivia/data/lists/usmap.yaml @@ -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: diff --git a/redbot/cogs/trivia/data/lists/usstateabbreviations.yaml b/redbot/cogs/trivia/data/lists/usstateabbreviations.yaml index 1607fb6b973..0ddd541bddf 100644 --- a/redbot/cogs/trivia/data/lists/usstateabbreviations.yaml +++ b/redbot/cogs/trivia/data/lists/usstateabbreviations.yaml @@ -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?: diff --git a/redbot/cogs/trivia/data/lists/warcraft.yaml b/redbot/cogs/trivia/data/lists/warcraft.yaml index 043b8ce67ea..2abc29f95fa 100644 --- a/redbot/cogs/trivia/data/lists/warcraft.yaml +++ b/redbot/cogs/trivia/data/lists/warcraft.yaml @@ -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?": diff --git a/redbot/cogs/trivia/data/lists/whosthatpokemon.yaml b/redbot/cogs/trivia/data/lists/whosthatpokemon.yaml index 942f212c032..ceb480f329e 100644 --- a/redbot/cogs/trivia/data/lists/whosthatpokemon.yaml +++ b/redbot/cogs/trivia/data/lists/whosthatpokemon.yaml @@ -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: diff --git a/redbot/cogs/trivia/data/lists/whosthatpokemon2.yaml b/redbot/cogs/trivia/data/lists/whosthatpokemon2.yaml index 147cb4ac1a0..87de635ebd3 100644 --- a/redbot/cogs/trivia/data/lists/whosthatpokemon2.yaml +++ b/redbot/cogs/trivia/data/lists/whosthatpokemon2.yaml @@ -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: diff --git a/redbot/cogs/trivia/data/lists/whosthatpokemon3.yaml b/redbot/cogs/trivia/data/lists/whosthatpokemon3.yaml index a9cfe98a7fe..7244692fd6e 100644 --- a/redbot/cogs/trivia/data/lists/whosthatpokemon3.yaml +++ b/redbot/cogs/trivia/data/lists/whosthatpokemon3.yaml @@ -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": diff --git a/redbot/cogs/trivia/data/lists/whosthatpokemon4.yaml b/redbot/cogs/trivia/data/lists/whosthatpokemon4.yaml index cfc89dcf263..b9e3580b757 100644 --- a/redbot/cogs/trivia/data/lists/whosthatpokemon4.yaml +++ b/redbot/cogs/trivia/data/lists/whosthatpokemon4.yaml @@ -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": diff --git a/redbot/cogs/trivia/data/lists/whosthatpokemon5.yaml b/redbot/cogs/trivia/data/lists/whosthatpokemon5.yaml index 16414c8c8fb..be9be87a973 100644 --- a/redbot/cogs/trivia/data/lists/whosthatpokemon5.yaml +++ b/redbot/cogs/trivia/data/lists/whosthatpokemon5.yaml @@ -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": diff --git a/redbot/cogs/trivia/data/lists/whosthatpokemon6.yaml b/redbot/cogs/trivia/data/lists/whosthatpokemon6.yaml index 272bc1986fe..5441f729a2a 100644 --- a/redbot/cogs/trivia/data/lists/whosthatpokemon6.yaml +++ b/redbot/cogs/trivia/data/lists/whosthatpokemon6.yaml @@ -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": diff --git a/redbot/cogs/trivia/data/lists/whosthatpokemon7.yaml b/redbot/cogs/trivia/data/lists/whosthatpokemon7.yaml index 7f42effb73b..94354b9e332 100644 --- a/redbot/cogs/trivia/data/lists/whosthatpokemon7.yaml +++ b/redbot/cogs/trivia/data/lists/whosthatpokemon7.yaml @@ -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": diff --git a/redbot/cogs/trivia/data/lists/whosthatpokemon8.yaml b/redbot/cogs/trivia/data/lists/whosthatpokemon8.yaml index ef49ed14dc6..3b4ff3fd360 100644 --- a/redbot/cogs/trivia/data/lists/whosthatpokemon8.yaml +++ b/redbot/cogs/trivia/data/lists/whosthatpokemon8.yaml @@ -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": diff --git a/redbot/cogs/trivia/data/lists/worldcapitals.yaml b/redbot/cogs/trivia/data/lists/worldcapitals.yaml index dc68a2f3e81..10dd64fc815 100644 --- a/redbot/cogs/trivia/data/lists/worldcapitals.yaml +++ b/redbot/cogs/trivia/data/lists/worldcapitals.yaml @@ -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 diff --git a/redbot/cogs/trivia/data/lists/worldcup.yaml b/redbot/cogs/trivia/data/lists/worldcup.yaml index 53af82337f2..24f7e345056 100644 --- a/redbot/cogs/trivia/data/lists/worldcup.yaml +++ b/redbot/cogs/trivia/data/lists/worldcup.yaml @@ -1,4 +1,5 @@ AUTHOR: Kreusada +DESCRIPTION: A trivia about the FIFA World Cup. # Notices diff --git a/redbot/cogs/trivia/data/lists/worldflags.yaml b/redbot/cogs/trivia/data/lists/worldflags.yaml index 160927dc8c0..94c2d30816c 100644 --- a/redbot/cogs/trivia/data/lists/worldflags.yaml +++ b/redbot/cogs/trivia/data/lists/worldflags.yaml @@ -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 diff --git a/redbot/cogs/trivia/data/lists/worldmap.yaml b/redbot/cogs/trivia/data/lists/worldmap.yaml index e1b2ab43c7b..402cd847342 100644 --- a/redbot/cogs/trivia/data/lists/worldmap.yaml +++ b/redbot/cogs/trivia/data/lists/worldmap.yaml @@ -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: diff --git a/redbot/cogs/trivia/schema.py b/redbot/cogs/trivia/schema.py index 19511a21c24..6206a37d014 100644 --- a/redbot/cogs/trivia/schema.py +++ b/redbot/cogs/trivia/schema.py @@ -37,7 +37,16 @@ def not_str(value: Any) -> float: 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( diff --git a/redbot/cogs/trivia/trivia.py b/redbot/cogs/trivia/trivia.py index de3611ab770..1775dc7a9ac 100644 --- a/redbot/cogs/trivia/trivia.py +++ b/redbot/cogs/trivia/trivia.py @@ -15,7 +15,7 @@ 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 @@ async def triviaset(self, ctx: commands.Context): @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 @@ async def trivia(self, ctx: commands.Context, *categories: str): 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 @@ async def trivia_list(self, ctx: commands.Context): 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 ) diff --git a/schema/trivia.schema.json b/schema/trivia.schema.json index e83bf2ec75e..a102dcd3c6f 100644 --- a/schema/trivia.schema.json +++ b/schema/trivia.schema.json @@ -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.",