From 7ba7149c688ba35d60934fdc68b92b82862065c7 Mon Sep 17 00:00:00 2001 From: MrKomodoDragon Date: Tue, 16 Feb 2021 09:10:57 -0800 Subject: Add .pyfacts command --- bot/resources/evergreen/python_facts.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 bot/resources/evergreen/python_facts.txt (limited to 'bot/resources') diff --git a/bot/resources/evergreen/python_facts.txt b/bot/resources/evergreen/python_facts.txt new file mode 100644 index 00000000..d9e63a11 --- /dev/null +++ b/bot/resources/evergreen/python_facts.txt @@ -0,0 +1,3 @@ +Python was named after Monty Python, which Guido van Rossum likes. +If you type `import this` in the Python REPL, you'll get a poem about the philosophies about Python. (check it out by doing !zen in <#267659945086812160>) +If you type `import antigravity` in the Python REPL, you'll be directed to an [xkcd comic](https://xkcd.com/353/) about how easy Python is. -- cgit v1.2.3 From 5164ba4e367efbfe78f8dd2b08646fe6605a8b42 Mon Sep 17 00:00:00 2001 From: MrKomodoDragon Date: Tue, 16 Feb 2021 18:21:12 -0800 Subject: Add colors and move embed out of send statement; add more info about Monty Python for Fact 1 --- bot/exts/evergreen/pythonfacts.py | 7 +++++-- bot/resources/evergreen/python_facts.txt | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'bot/resources') diff --git a/bot/exts/evergreen/pythonfacts.py b/bot/exts/evergreen/pythonfacts.py index c0cdf111..734782b8 100644 --- a/bot/exts/evergreen/pythonfacts.py +++ b/bot/exts/evergreen/pythonfacts.py @@ -7,9 +7,11 @@ from discord.ext import commands with open('bot/resources/evergreen/python_facts.txt') as file: FACTS = list(file) +COLORS = [0x4B8BBE, 0xFFD43B, ] + class PythonFacts(commands.Cog): - """Gives a random fun fact about Python.""" + """Sends a random fun fact about Python.""" def __init__(self, bot: commands.Bot) -> None: self.bot = bot @@ -17,7 +19,8 @@ class PythonFacts(commands.Cog): @commands.command(name='pythonfact', aliases=['pyfact']) async def get_python_fact(self, ctx: commands.Context) -> None: """Sends a Random fun fact about Python.""" - await ctx.send(embed=discord.Embed(title='Python Facts', description=random.choice(FACTS))) + embed = discord.Embed(title='Python Facts', description=random.choice(FACTS), colour=random.choice(COLORS)) + await ctx.send(embed=embed) def setup(bot: commands.Bot) -> None: diff --git a/bot/resources/evergreen/python_facts.txt b/bot/resources/evergreen/python_facts.txt index d9e63a11..0abd971b 100644 --- a/bot/resources/evergreen/python_facts.txt +++ b/bot/resources/evergreen/python_facts.txt @@ -1,3 +1,3 @@ -Python was named after Monty Python, which Guido van Rossum likes. +Python was named after Monty Python, a British Comedy Troupe, which Guido van Rossum likes. If you type `import this` in the Python REPL, you'll get a poem about the philosophies about Python. (check it out by doing !zen in <#267659945086812160>) If you type `import antigravity` in the Python REPL, you'll be directed to an [xkcd comic](https://xkcd.com/353/) about how easy Python is. -- cgit v1.2.3 From f63af81bb9f1613ca2b4e00c3f12978a02a86983 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 18 Feb 2021 19:23:04 +0000 Subject: Move gender options to a resource file --- bot/resources/pride/gender_options.json | 41 +++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 bot/resources/pride/gender_options.json (limited to 'bot/resources') diff --git a/bot/resources/pride/gender_options.json b/bot/resources/pride/gender_options.json new file mode 100644 index 00000000..062742fb --- /dev/null +++ b/bot/resources/pride/gender_options.json @@ -0,0 +1,41 @@ +{ + "agender": "agender", + "androgyne": "androgyne", + "androgynous": "androgyne", + "aromantic": "aromantic", + "aro": "aromantic", + "ace": "asexual", + "asexual": "asexual", + "bigender": "bigender", + "bisexual": "bisexual", + "bi": "bisexual", + "demiboy": "demiboy", + "demigirl": "demigirl", + "demi": "demisexual", + "demisexual": "demisexual", + "gay": "gay", + "lgbt": "gay", + "queer": "gay", + "homosexual": "gay", + "fluid": "genderfluid", + "genderfluid": "genderfluid", + "genderqueer": "genderqueer", + "intersex": "intersex", + "lesbian": "lesbian", + "non-binary": "nonbinary", + "enby": "nonbinary", + "nb": "nonbinary", + "nonbinary": "nonbinary", + "omnisexual": "omnisexual", + "omni": "omnisexual", + "pansexual": "pansexual", + "pan": "pansexual", + "pangender": "pangender", + "poly": "polysexual", + "polysexual": "polysexual", + "polyamory": "polyamory", + "polyamorous": "polyamory", + "transgender": "transgender", + "trans": "transgender", + "trigender": "trigender" +} -- cgit v1.2.3 From 7bc0ea474ed39dbddca3958bb90fc072f0d7aa1d Mon Sep 17 00:00:00 2001 From: Arez1337 <> Date: Sat, 20 Feb 2021 20:43:59 +0100 Subject: Removed the Question about the Nile and changed the IDs to matc the order again --- bot/resources/evergreen/trivia_quiz.json | 57 ++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 24 deletions(-) (limited to 'bot/resources') diff --git a/bot/resources/evergreen/trivia_quiz.json b/bot/resources/evergreen/trivia_quiz.json index faa3bc3b..a4225eb1 100644 --- a/bot/resources/evergreen/trivia_quiz.json +++ b/bot/resources/evergreen/trivia_quiz.json @@ -2,36 +2,51 @@ "retro": [ { "id": 1, - "hints": ["It is not a mainline Mario Game, although the plumber is present.", "It is not a mainline Zelda Game, although Link is present."], + "hints": [ + "It is not a mainline Mario Game, although the plumber is present.", + "It is not a mainline Zelda Game, although Link is present." + ], "question": "What is the best selling game on the Nintendo GameCube?", "answer": "Super Smash Bros" }, { "id": 2, - "hints": ["It was released before the 90's.", "It was released after 1980."], + "hints": [ + "It was released before the 90's.", + "It was released after 1980." + ], "question": "What year was Tetris released?", "answer": "1984" }, { "id": 3, - "hints": ["The occupation was in construction", "He appeared as this kind of worker in 1981's Donkey Kong"], + "hints": [ + "The occupation was in construction", + "He appeared as this kind of worker in 1981's Donkey Kong" + ], "question": "What was Mario's original occupation?", "answer": "Carpenter" }, { "id": 4, - "hints": ["It was revealed in the Nintendo Character Guide in 1993.", "His last name has to do with eating Mario's enemies."], + "hints": [ + "It was revealed in the Nintendo Character Guide in 1993.", + "His last name has to do with eating Mario's enemies." + ], "question": "What is Yoshi's (from Mario Bros.) full name?", "answer": "Yoshisaur Munchakoopas" }, { "id": 5, - "hints": ["The game was released in 1990.", "It was released on the SNES."], + "hints": [ + "The game was released in 1990.", + "It was released on the SNES." + ], "question": "What was the first game Yoshi appeared in?", "answer": "Super Mario World" } ], - "general":[ + "general": [ { "id": 100, "question": "Name \"the land of a thousand lakes\"", @@ -114,7 +129,7 @@ "id": 113, "question": "What's the name of the tallest waterfall in the world.", "answer": "Angel Falls", - "info": "Angel Falls (Salto Ángel) in Venezuela is the highest waterfall in the world. The falls are 3230 feet in height, with an uninterrupted drop of 2647 feet. Angel Falls is located on a tributary of the Rio Caroni." + "info": "Angel Falls (Salto \u00c1ngel) in Venezuela is the highest waterfall in the world. The falls are 3230 feet in height, with an uninterrupted drop of 2647 feet. Angel Falls is located on a tributary of the Rio Caroni." }, { "id": 114, @@ -180,7 +195,7 @@ "id": 124, "question": "When did the Second World War end?", "answer": "1945", - "info": "World War 2 ended with the unconditional surrender of the Axis powers. On 8 May 1945, the Allies accepted Germany's surrender, about a week after Adolf Hitler had committed suicide. VE Day – Victory in Europe celebrates the end of the Second World War on 8 May 1945." + "info": "World War 2 ended with the unconditional surrender of the Axis powers. On 8 May 1945, the Allies accepted Germany's surrender, about a week after Adolf Hitler had committed suicide. VE Day \u2013 Victory in Europe celebrates the end of the Second World War on 8 May 1945." }, { "id": 125, @@ -190,72 +205,66 @@ }, { "id": 126, - "question": "What's the name of the largest river in the world?", - "answer": "Nile", - "info": "The Nile, which is about 6,650 km (4,130 mi) long, is an \"international\" river as its drainage basin covers eleven countries, namely, Tanzania, Uganda, Rwanda, Burundi, the Democratic Republic of the Congo, Kenya, Ethiopia, Eritrea, South Sudan, Republic of the Sudan and Egypt." - }, - { - "id": 127, "question": "Which is the smallest planet in the Solar System?", "answer": "Mercury", "info": "Mercury is the smallest planet in our solar system. It's just a little bigger than Earth's moon. It is the closest planet to the sun, but it's actually not the hottest. Venus is hotter." }, { - "id": 128, + "id": 127, "question": "What is the smallest country?", "answer": "Vatican City", "info": "With an area of 0.17 square miles (0.44 km2) and a population right around 1,000, Vatican City is the smallest country in the world, both in terms of size and population." }, { - "id": 129, + "id": 128, "question": "What's the name of the largest bird?", "answer": "Ostrich", "info": "The largest living bird, a member of the Struthioniformes, is the ostrich (Struthio camelus), from the plains of Africa and Arabia. A large male ostrich can reach a height of 2.8 metres (9.2 feet) and weigh over 156 kilograms (344 pounds)." }, { - "id": 130, + "id": 129, "question": "What does the acronym GPRS stand for?", "answer": "General Packet Radio Service", "info": "General Packet Radio Service (GPRS) is a packet-based mobile data service on the global system for mobile communications (GSM) of 3G and 2G cellular communication systems. It is a non-voice, high-speed and useful packet-switching technology intended for GSM networks." }, { - "id": 131, + "id": 130, "question": "In what country is the Ebro river located?", "answer": "Spain", "info": "The Ebro river is located in Spain. It is 930 kilometers long and it's the second longest river that ends on the Mediterranean Sea." }, { - "id": 132, + "id": 131, "question": "What year was the IBM PC model 5150 introduced into the market?", "answer": "1981", "info": "The IBM PC was introduced into the market in 1981. It used the Intel 8088, with a clock speed of 4.77 MHz, along with the MDA and CGA as a video card." }, { - "id": 133, + "id": 132, "question": "What's the world's largest urban area?", "answer": "Tokyo", "info": "Tokyo is the most populated city in the world, with a population of 37 million people. It is located in Japan." }, { - "id": 134, + "id": 133, "question": "How many planets are there in the Solar system?", "answer": "8", "info": "In the Solar system, there are 8 planets: Mercury, Venus, Earth, Mars, Jupiter, Saturn, Uranus and Neptune. Pluto isn't considered a planet in the Solar System anymore." }, { - "id": 135, + "id": 134, "question": "What is the capital of Iraq?", "answer": "Baghdad", "info": "Baghdad is the capital of Iraq. It has a population of 7 million people." }, { - "id": 136, + "id": 135, "question": "The United Nations headquarters is located at which city?", "answer": "New York", "info": "The United Nations is headquartered in New York City in a complex designed by a board of architects led by Wallace Harrison and built by the architectural firm Harrison & Abramovitz. The complex has served as the official headquarters of the United Nations since its completion in 1951." }, { - "id": 137, + "id": 136, "question": "At what year did Christopher Columbus discover America?", "answer": "1492", "info": "The explorer Christopher Columbus made four trips across the Atlantic Ocean from Spain: in 1492, 1493, 1498 and 1502. He was determined to find a direct water route west from Europe to Asia, but he never did. Instead, he stumbled upon the Americas" -- cgit v1.2.3 From 5f7abe98e81b8184ea0813eaccffbe92ad5b43dc Mon Sep 17 00:00:00 2001 From: Shivansh-007 Date: Mon, 8 Mar 2021 12:59:39 +0530 Subject: Add pride leader cog and resources. --- bot/exts/pride/pride_leader.py | 104 +++++++++++++++++++++++++++++++++++ bot/resources/pride/prideleader.json | 100 +++++++++++++++++++++++++++++++++ 2 files changed, 204 insertions(+) create mode 100644 bot/exts/pride/pride_leader.py create mode 100644 bot/resources/pride/prideleader.json (limited to 'bot/resources') diff --git a/bot/exts/pride/pride_leader.py b/bot/exts/pride/pride_leader.py new file mode 100644 index 00000000..631fca4b --- /dev/null +++ b/bot/exts/pride/pride_leader.py @@ -0,0 +1,104 @@ +import json +import logging +import random +from pathlib import Path +from typing import Optional + +import discord +from discord.ext import commands +from fuzzywuzzy import fuzz + +from bot.constants import Colours + +log = logging.getLogger(__name__) + +PRIDE_LEADERS_RESOURCE = Path("bot/resources/pride/prideleader.json") +MINIMUM_FUZZ_RATIO = 40 + + +class PrideLeader(commands.Cog): + """Gives information about Pride Leaders.""" + + def __init__(self, bot: commands.Bot): + self.bot = bot + + with PRIDE_LEADERS_RESOURCE.open(encoding="utf8") as data: + self.pride = json.load(data) + + def name_verifier(self, leader_name: str) -> Optional[str]: + """Verify leader name whether it is present in resources or not.""" + leader_name = leader_name.title() + if leader_name in self.pride: + return leader_name + log.trace(f"Got a Invalid pride leader: {leader_name}") + + def invalid_embed_generate(self, pride_leader: str) -> discord.Embed: + """Generates Invalid Embed.""" + embed = discord.Embed( + color=Colours.soft_red + ) + valid_names = [] + pride_leader = pride_leader.title() + for name in self.pride: + if fuzz.ratio(pride_leader, name) >= MINIMUM_FUZZ_RATIO: + valid_names.append(name) + + if not valid_names: + valid_names = ", ".join(self.pride) + error_msg = "Sorry your input didn't match any stored name, here is a list of available names:" + else: + valid_names = "\n".join(valid_names) + error_msg = "Did you mean?" + + embed.description = f"{error_msg}\n```{valid_names}```" + return embed + + def embed_builder(self, leader_name: str) -> discord.Embed: + """Generate an Embed with information about a pride leader.""" + embed = discord.Embed( + title=leader_name, + description=self.pride[leader_name]["About"], + color=Colours.blue + ) + embed.add_field( + name="Known for", + value=self.pride[leader_name]["Known for"], + inline=False + ) + embed.add_field( + name="D.O.B and Birth place", + value=self.pride[leader_name]["Born"], + inline=False + ) + embed.add_field( + name="Awards and honors", + value=self.pride[leader_name]["Awards"], + inline=False + ) + embed.set_thumbnail(url=self.pride[leader_name]["url"]) + return embed + + @commands.command(aliases=("pl", "prideleader")) + async def pride_leader(self, ctx: commands.Context, *, pride_leader_name: Optional[str]) -> None: + """ + Information about a Pride Leader. + + Returns information about the specified pride leader + and if there is no pride leader given, return a random pride leader. + """ + if not pride_leader_name: + leader = random.choice([name for name in self.pride]) + else: + leader = self.name_verifier(pride_leader_name) + if not leader: + embed = self.invalid_embed_generate(pride_leader_name) + await ctx.send(embed=embed) + return + + embed = self.embed_builder(leader) + await ctx.send(embed=embed) + + +def setup(bot: commands.Bot) -> None: + """Loads Pride leader cog.""" + bot.add_cog(PrideLeader(bot)) diff --git a/bot/resources/pride/prideleader.json b/bot/resources/pride/prideleader.json new file mode 100644 index 00000000..30e84bdc --- /dev/null +++ b/bot/resources/pride/prideleader.json @@ -0,0 +1,100 @@ +{ + "Tim Cook": { + "Known for": "CEO of Apple", + "About": "**Timothy Donald Cook** popularly known as Tim Cook. Despite being a notably private person, Tim Cook became the first CEO of a 500 fortune company, coming out as gay in 2014. He revealed his sexual orientation through an open letter published in Bloomberg BusinessWeek. He strongly believes that business leaders need to do their part to make the world a better place. An excerpt from his open letter is as follows: “Part of social progress is understanding that a person is not defined only by one's sexuality, race, or gender.", + "url": "https://image.cnbcfm.com/api/v1/image/105608434-1543945658496rts28qzc.jpg?v=1554921416&w=1400&h=950", + "Born": "In November 1, 1960 at Mobile, Alabama, U.S.", + "Awards": "• Financial Times Person of the Year (2014)\n• Ripple of Change Award (2015)\n• Fortune Magazine's: World's Greatest Leader. (2015)\n• Alabama Academy of Honor: Inductee. (2015)\n• Human Rights Campaign's Visibility Award (2015)\n• Honorary Doctor of Science from University of Glasgow in Glasgow, Scotland (2017)\n• Courage Against Hate award from Anti-Defamation League (2018)" + }, + "Alan Joyce": { + "Known for": "CEO of Qantas Airlines", + "About": "**Alan Joseph Joyce, AC** popularly known as Alan Joyce. Alan Joyce has been named as one of the world’s most influential business executives. He has always been very open about his orientation and has been in a committed gay relationship for over 20 years now. He supports same-sex marriage and believes that it is critical to make people recognize that they know LGBT people\n\nAlan likes to frequently talk about equality at the workplace and said, “It has become more important for leaders who are LGBT to be open about their sexuality. I am passionate about it. There should be more people like Apple’s Tim Cook and Paul Zahra, the former CEO of Australia’s David Jones [store chain].”", + "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/8/83/Alan_Joyce_%28cropped%29.jpg/220px-Alan_Joyce_%28cropped%29.jpg", + "Born": "On 30 June, 1966 at Tallaght, Dublin, Republic of Ireland", + "Awards": "• The Australian named Joyce the most influential business leader in 2011\n• Joyce is an Ambassador of the Australian Indigenous Education Foundation\n• Joyce named a Companion of the Order of Australia, Australia's highest civil honour, in the 2017 Queen's birthday honours list" + }, + "Peter Thiel": { + "Known for": "Co-Founder and Former CEO of paypal", + "About": "**Peter Andreas Thiel** popularly known as Peter Thiel. Peter Thiel served as the CEO of PayPal from its inception to its sale to eBay in October 2002. Thiel’s sexuality came out in 2007 when Gawker Media outed him in a blog post. He became the first openly gay speaker at Republican National Convention and delivered a speech on sexuality.\n\n“Of course every American has a unique identity,” he said. “I am proud to be gay. I am proud to be a Republican. But most of all I am proud to be an American.”", + "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Peter_Thiel_2014_by_Heisenberg_Media.jpg/220px-Peter_Thiel_2014_by_Heisenberg_Media.jpg", + "Born": "On 11 October, 1967 at Frankfurt, West Germany", + "Awards": "• Thiel received a co-producer credit for Thank You for Smoking, a 2005 feature film based on Christopher Buckley's 1994 novel of the same name\n• In 2006, Thiel won the Herman Lay Award for Entrepreneurship\n• In 2007, he was honored as a Young Global leader by the World Economic Forum as one of the 250 most distinguished leaders age 40 and under\n• On 7 November 2009, Thiel was awarded an honorary degree from Universidad Francisco Marroquin\n• In 2012, Students For Liberty, an organization dedicated to spreading libertarian ideals on college campuses, awarded Thiel its “Alumnus of the Year” award\n• In February 2013, Thiel received a TechCrunch Crunchie Award for Venture Capitalist of the Year.\n• Insurance Executive of the Year: St Joseph’s University’s Academy of Risk Management and Insurance in Philadelphia" + }, + "Martine Rothblatt": { + "Known for": "CEO of United Therapeutics", + "About": "**Martine Aliana Rothblatt** popularly known as Martine Rothblatt. Martine co-founded Sirius XM Satellite Radio in 1990 and 1996 founded United Therapeutics, making her the highest-earning CEO in the biopharmaceutical industry. She came out as a transgender in 1994 and has been vocal about the trans community ever since.\n\nIn 2014 in an interview, Martine said, “I took a journey from male to female, so if I hide that, I’m, like just replicating the closet of my past with another closet of the future. That made no sense and that is why I am open.” She has authored a book called “The apartheid of Sex”.", + "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/b/bd/Martine-Rothblatt2-5773.jpg/220px-Martine-Rothblatt2-5773.jpg", + "Born": "On October 10, 1954 at Chicago, Illinois, U.S.", + "Awards": "• In January 2018 Rothblatt was presented the UCLA Medal, the university's highest award, in recognition of her creation of Sirius XM satellite radio, advancing organ transplant technology, and having “expanded the way we understand fundamental concepts ranging from communication to gender to the nature of consciousness and mortality.”" + }, + "Peter Arvai": { + "Known for": "Co-Founder and CEO of Prezi", + "About": "Peter Arvai is the 11th most influential LGBT leader in the world. His goal has always been to create an open environment that fosters diversity. He has co-founded an NGO with Google and espell called ‘We Are Open’ to promote openness at the workplace. Peter regularly talks about his gay background in every on-boarding session at his company.\n\nWhen Prezi was featured on the cover of Forbes, Peter used the opportunity by coming out and sharing his story to start a conversation on this topic that most people seem to avoid. If you want to create a more inclusive workplace, you need to be willing to be vulnerable yourself, he says. “To spark honest discussions about inclusivity and openness, your personal experience of inclusion is a key resource and you need to create a safe environment so people find the courage to have uncomfortable conversations.”", + "url": "https://cached.imagescaler.hbpl.co.uk/resize/scaleWidth/880/cached.offlinehbpl.hbpl.co.uk/news/OTM/Peterarvai-20191218101617863.jpg", + "Born": "On October 26, 1979 at Karlskoga, Sweden", + "Awards": "• 2014: European Tech Startups Award for Best Startup Co-Founders.\n• 2014: European Web Entrepreneur of the Year.\n• 2015: Executive of the Year – Business Services: Bronze Stevie Winner.\n• 2016: Number 11 on the 2016 OUTstanding & Financial Times Leading LGBT Executives List of 100" + }, + "Inga Beale": { + "Known for": "CEO of Lloyd's of London", + "About": "Inga became the first female CEO of Lloyd’s of London in 2013 and in 2017 was named a Dame Commander of the Order of the British Empire for her contribution towards the British economy.\n\nShe came out first as a bisexual, in an interview in 2008 and since then has made efforts to bring diversity and inclusion at the forefront in her company. “It’s not about me. It’s about what you do for other people. For me, it’s so important because you need these role models.”\n\nSpeaking between meetings at the World Economic Forum in Davos, she says her position at the top of the LGBT table is important for its impact on others: “It’s about giving people confidence,” she says.", + "url": "https://cdn-res.keymedia.com/cms/images/us/018/0248_637072371134927741.jpeg", + "Born": "On May 15, 1963 at Great Britain", + "Awards": "• Trailblazer of the Year: The Insurance Industry Charitable Foundation (IICF)(2019)\n• Free Enterprise Award: Insurance Federation of New York (IFNY)(2018)\n• Market People - Outstanding Contribution Award: The London Market Forums(2018)\n• Outstanding Achievement Award: Insurance Day | Informa(2018)\n• Barclay's Lifetime Achievement Award: Variety Children's Charity - Catherine Awards(2017)\n• Insurance Woman of the Year Award: Association of Professional Insurance Women (APIW)(2017)\n• Dame Commander of the Order of the British Empire - DBE: HM The Queen(2017)\n• Insurance Personality of the Year: British Insurance Awards\n• Insurance Executive of the Year: St Joseph’s University’s Academy of Risk Management and Insurance in Philadelphia(2015)" + }, + "David Geffen": { + "Known for": "Founder of Dreamworks", + "About": "**David Lawrence Geffen** popularly known as David Geffen. Founder of film studio Dream Works as well as record labels Asylum Records, Geffen Records and DGC Records, David Geffen came out in 1992 at a fund raiser announcing, “As a Gay man, I have come a long way to be here tonight.” He was already among the strongest pillars of the gay rights movement by then.\n\n“If I am going to be a role model, I want to be one that I can be proud of,” Geffen said in an interview back in 1992.”\n\nGeffen contributed significantly towards society through the David Geffen Foundation that worked relentlessly towards healthcare, people affected by HIV/AIDS, civil liberties, issues of concern to the Jewish community, and arts. Interestingly, the song ‘Free man in Paris’ by Joni Mitchell is based on Geffen’s time in Paris during a trip they took together along with Canadian musician Robbie Robertson and his wife.", + "url": "https://i.insider.com/5b733a2be199f31d138b4bec?width=1100&format=jpeg&auto=webp", + "Born": "On February 21, 1943 at New York City, U.S.", + "Awards": "• Tony Award for Best Musical(1983)\n• Tony Award for Best Play(1988)\n• Daytime Emmy Award for Outstanding Children's Animated Program(1990)" + }, + "Joel Simkhai": { + "Known for": "Founder and former CEO of Grindr and Blendr", + "About": "Joel Simkhai founded Grindr, a dating app for men in the LGBTQ+ community in 2009. He says he launched the app with a “selfish desire’ to meet more gay men. Today, Grindr has over 4 million users and has become the world's largest social networking platform for men from the LGBTQ+ community to interact.\n\nIn an interview Joel shared, “ As a kid I was teased, teased for being feminine, I guess for being gay. So a lot of my early life was just in denial about it with myself and others. But by 16 and as I started getting older, I realized that I like guys”. “My story is the story of every gay man. We are seen as a minority in some ways and the services out there weren’t that great. I am an introvert so I don’t really do well at being who I am right away but online seemed like my comfort zone”. It all begins with meeting someone, he adds.", + "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/44/Joel_Simkhai_2012_%28cropped%29.jpg/220px-Joel_Simkhai_2012_%28cropped%29.jpg", + "Born": "On 1976 at Tel Aviv, Israel", + "Awards": "• Simkhai’s company has been mentioned in pop culture icons like The Office, Saturday Night Live, Judge Judy and Top Gear and won a number of industry awards including “Best Mobile Dating App” in 2011 and 2012 and “Best New Technology” in 2012 from the iDate Awards and “Best Location Application” at the TechCrunch Awards in 2011." + }, + "Megan Smith": { + "Known for": "Former CTO of United States", + "About": "Megan Smith the former CTO of the United States has always been vocal about the need to push inclusion. Most central to her message, however, is the key insight that is most often lost: not only is inclusivity a part of technology’s future, it was also a seminal part of its past. Ada Lovelace, for example, an English woman born in 1812, was the first computer programmer; Katherine G. Johnson, an African-American woman featured in the Oscar-nominated film Hidden Figures, helped put NASA astronauts on the moon.\n\nIn 2003, in an interview Megan said, “When you are gay, you come out everyday because everyone assumes you are straight. But you have to be yourself.” Smith also hopes to open up the tech industry to more women and encourage girls to pursue a career in it.", + "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f0/Megan_Smith_official_portrait.jpg/220px-Megan_Smith_official_portrait.jpg", + "Born": "On October 21, 1964 at Buffalo, New York, and Fort Erie, Ontario.", + "Awards": "• World Economic Forum Technology Pioneer 2001, 2002\n• Listed by Out magazine in 2012 and 2013, as one of the 50 most powerful LGBT people in the United States\n• Reuters Digital Vision Program Fellow at Stanford, 2003-2004\n• Top 25 Women on the Web, 2000\n• Upside Magazine 100 Digital Elite, 1999 and 2000\n• Advertising Age i.20, 1999\n• GLAAD Interactive Media Award for Internet Leadership, 1999\n• Charging Buffalo Award, 2015\n• Business Insider 23 Most Powerful LGBTQ+ People in Tech, 2019" + }, + "David Bohnett": { + "Known for": "Founder of Geocities", + "About": "**David C. Bohnett** popularly known as David Bohnett. A tech entrepreneur, with his LA-based venture firm Baroda Ventures, founded in 1998, David Bohnett is also the Founder of Geocities, which remains the first largest internet venture built on user-generated content, founded in 1998 and acquired by Yahoo in 1999. Geocities was cited #2 by TechRadar in its list of ‘20 websites that changed the world’ back in 2008.\n\nBohnett came out to his family post his graduation and worked extensively towards equal rights for gays and lesbians, and towards legalizing same-sex marriage. He founded the David Bohnett Foundation, dedicated to community-building and social activism addressing concerns across a broad spectrum of arts, educational, and civic programs. The first openly bisexual US congressperson Krysten Sinema and the first openly gay mayor of a major US city (Houston), Annise Parker, are both alumnis of the LGBT Leadership Fellows run by his foundation that trains LGBT leaders for local and state governments.", + "url": "https://upload.wikimedia.org/wikipedia/commons/c/cb/David_Bohnett.jpg", + "Born": "On April 2, 1956 at Chicago, Illinois", + "Awards": "• Number 16 on Time's Top 50 Cyber Elite (1998)\n• Upside magazine's Elite 100 (1998)\n• Newsweek's “100 People to Watch in the Next Millennium”\n• Ernst & Young Entrepreneur of the Year Award for Southern California (1999)\n• Los Angeles Gay and Lesbian Center's Rand Schrader Award (1999)\n• Los Angeles Business Journal's Technology Leader of the Year (2000)\n• ACLU Citizen Advocate Award (2002)\n• amfAR Award of Courage (2006)\n• Los Angeles City of Angels Award (2008)\n• GLSEN's Lifetime Achievement Award (2009)\n• Honorary doctorate of Humane Letters from Whittier College (2012)\n• American Jewish Committee Los Angeles' Ira E. Yellin Community Leadership Award (2014)\n• Brady Bear Award from the Brady Center to Prevent Gun Violence (2016)\n• Los Angeles Business Journal's LA 500: The Most Influential People in Los Angeles (2017)" + }, + "Jennifer Pritzker": { + "Known for": "Founder and CEO of Tawani Enterprises", + "About": "**Jennifer Natalya Pritzker** popularly known as Jennifer Pritzker. A retired Lieutenant Colonel of the US Army, and Founder and CEO of private wealth management firm Tawani Enterprises, Jennifer Natalya Pritzker, is an American investor, philanthropist, member of the Pritzker family, and the world’s first transgender billionaire. Having retired from the US Army in 2001, Jennifer was promoted to the honorary rank of Colonel in the Illinois Army National Guard.\n\nFormerly known as James Nicholas Pritzker, she legally changed her official name to Jennifer Natalya Pritzker in 2013, identifying herself as a woman for all business and personal undertakings, as per an announcement shared with employees of the Pritzker Military Library and Tawani Enterprises.\n\nPritzker in 1995 founded the Tawani Foundation aiming “to enhance the awareness and understanding of the importance of the Citizen Soldier; to preserve unique sites of significance to American and military history; to foster health and wellness projects for improved quality of life; and to honor the service of military personnel, past, present and future.”", + "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/6/62/Jennifer_Pritzker.jpg/220px-Jennifer_Pritzker.jpg", + "Born": "On August 13, 1950 at Chicago, Illinois.", + "Awards": "• First transgender billionaire\n• Founder of Tawani Foundation and Pritzker Military Library" + }, + "Claudia Brind-Woody": { + "Known for": "VP and managing director of intellectual property IBM", + "About": "**Claudia Lavergne Brind-Woody** popularly known as Claudia Brind-Woody. Global Co-Chair for the LGBT Executive Task-force at IBM, Claudia Brind-Woody is a force of nature to reckon with. In 2019, she was named among the most powerful LGBTQ+ people in tech, in addition to being in Financial Times Top 50 Outstanding list in 2013, 2014 and 2015, The Guardian’s 100 most influential LGBT people of the year in 2012, and winning the Out & Equal Trailblazer award in 2011, among other accolades.\n\nShe came out as a lesbian in the early years of her career and strives to work towards equality at the workplace. In an interview back in 2016 she shared, “What the LGBT+ community wants is to just want it to be ordinary [to be LGBT+] so that you are just seen to be valued on merit and what you bring to the business without someone thinking twice about you being LGBT+....When our employees don't have to think twice about struggling for the same benefits, recognition, or are afraid of being safe, then productivity goes up.”", + "url": "https://image.insider.com/580e9350dd089551098b47ff?width=750&format=jpeg&auto=webp", + "Born": "On January 30, 1955 at Virginia, U.S.", + "Awards": "• Out & Equal Trailblazer Award (2011)\n• GO Magazine's 100 Women We Love (2011)\n• The Guardian's World Pride Power List Top 100 (2012)\n• The Financial Times' Top 50 Outstanding list (2013, 2014, 2015)\n• The Daily Telegraph's Top 50 list of LGBT executives (2015)\n• The Financial Times' Hall of Fame (2016)\n• Diva power list (2016)\n• Business Insider The 23 Most Influential LGBTQ+ People in Tech" + }, + "Laxmi Narayan Tripathi": { + "Known for": "Humans rights activist and founder, Astitva trust", + "About": "The first transgender individual to represent APAC in the UN task meeting in 2008, representative of APAC yet again at the 20th International AIDS Conference in Melbourne and recipient of the ‘Indian of the Year’ award in 2017, Lakshmi Narayan Tripathi is a transgender activist, and part of the team that led the charge to getting transgender recognized as a third gender in India by the Supreme Court in 2014.\n\nLakshmi was appointed as the President of the NGO DAI Welfare Society in 2002, the first registered and working organization for eunuchs in South Asia. By 2007 she founded her own organization, Astitiva that works towards the welfare, support and development of sexual minorities.\n\nWith the background of an abusive childhood and being bullied for being feminine, she stated in an interview, “I chose not to remember the prejudice,” adding, “Rather I think (about) the good things that have happened to me, and be a flamboyant rainbow.”", + "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/b/bd/Laxmi_Narayan_Tripathi_at_JLF_Melbourne_presented_by_Melbourne_Writers_Festival%2C_Federation_Square%2C_Melbourne_2017.jpg/220px-Laxmi_Narayan_Tripathi_at_JLF_Melbourne_presented_by_Melbourne_Writers_Festival%2C_Federation_Square%2C_Melbourne_2017.jpg", + "Born": "On 13th Dec 1978 at Thane", + "Awards": "• Awarded 'Indian of the Year 2017" + }, + "Tim Gill": { + "Known for": "Founder of Quark", + "About": "Tim Gill founded Quark Inc in 1981 and sold his stakes in Quark in 1999 in order to focus more on his interests in LGBT+ activism and philanthropy. He founded the pro-LGBT Gill Foundation in 1994, and since its inception it has invested more than $357 Mn in programs and non-profits around the country, substantially contributing towards many victories for LGBT community.\n\nGill married Scott Miller in 2009 and continues to be the largest donor for LGBT initiatives in America.\n\n“The LGBTQ movement has no Martin Luther King. We never have. And we probably never will,” Gill said. “So it’s not going to be grandiose gestures and big speeches and things like that that secure us equal opportunity. It will be the hard work of thousands and thousands of people over many, many years.”", + "url": "https://gillfoundation.org/wp-content/uploads/2014/09/tim-gill-20151.jpg", + "Born": "On October 18, 1953 at Hobart, Indiana", + "Awards": "• Gill was awarded the NOGLSTP GLBT Engineer of the Year Award in 2007." + } +} -- cgit v1.2.3 From 87219f3a0c299d62a95341a90237715f1cff64d8 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Sat, 13 Mar 2021 20:13:12 +0000 Subject: master => main --- .github/workflows/build.yaml | 2 +- .github/workflows/lint.yaml | 2 +- .github/workflows/sentry_release.yaml | 4 ++-- CONTRIBUTING.md | 8 ++++---- README.md | 10 +++++----- bot/exts/christmas/advent_of_code/_helpers.py | 2 +- bot/exts/evergreen/source.py | 2 +- bot/resources/halloween/spooky_rating.json | 18 +++++++++--------- bot/utils/time.py | 2 +- 9 files changed, 25 insertions(+), 25 deletions(-) (limited to 'bot/resources') diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9d12cd10..08721dfd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -4,7 +4,7 @@ on: workflow_run: workflows: ["Lint"] branches: - - master + - main types: - completed diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index a5f45255..7f157da3 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -3,7 +3,7 @@ name: Lint on: push: branches: - - master + - main pull_request: diff --git a/.github/workflows/sentry_release.yaml b/.github/workflows/sentry_release.yaml index 0e02dd0c..3d15e01e 100644 --- a/.github/workflows/sentry_release.yaml +++ b/.github/workflows/sentry_release.yaml @@ -3,14 +3,14 @@ name: Create Sentry release on: push: branches: - - master + - main jobs: create_sentry_release: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@master + uses: actions/checkout@main - name: Create a Sentry.io release uses: tclindner/sentry-releases-action@v1.2.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7cf83db5..3a1803e2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ Sir Lancebot is a community project for the Python Discord community over at https://discord.gg/python. We will be providing support for those of you who are new to Git, and this project is to be considered educational. -Our projects are open-source and are automatically deployed whenever commits are pushed to the `master` branch on each repository, so we've created a set of guidelines in order to keep everything clean and in working order. +Our projects are open-source and are automatically deployed whenever commits are pushed to the `main` branch on each repository, so we've created a set of guidelines in order to keep everything clean and in working order. Note that contributions may be rejected on the basis of a contributor failing to follow these guidelines. @@ -12,7 +12,7 @@ Note that contributions may be rejected on the basis of a contributor failing to 2. Your pull request must solve an issue created or approved by a staff member. These will be labeled with the `approved` label. Feel free to suggest issues of your own, which staff can review for approval. 3. **No force-pushes** or modifying the Git history in any way. 4. If you have direct access to the repository, **create a branch for your changes** and create a pull request for that branch. If not, create a branch on a fork of the repository and create a pull request from there. - * It's common practice for a repository to reject direct pushes to `master`, so make branching a habit! + * It's common practice for a repository to reject direct pushes to `main`, so make branching a habit! * If PRing from your own fork, **ensure that "Allow edits from maintainers" is checked**. This gives permission for maintainers to commit changes directly to your fork, speeding up the review process. 5. **Adhere to the prevailing code style**, which we enforce using [`flake8`](http://flake8.pycqa.org/en/latest/index.html) and [`pre-commit`](https://pre-commit.com/). * Run `flake8` and `pre-commit` against your code [**before** you push it](https://soundcloud.com/lemonsaurusrex/lint-before-you-push). Your commit will be rejected by the build server if it fails to lint. @@ -22,7 +22,7 @@ Note that contributions may be rejected on the basis of a contributor failing to * Avoid making minor commits for fixing typos or linting errors. Since you've already set up a `pre-commit` hook to run the linting pipeline before a commit, you shouldn't be committing linting issues anyway. * A more in-depth guide to writing great commit messages can be found in Chris Beam's [*How to Write a Git Commit Message*](https://chris.beams.io/posts/git-commit/) 7. **Avoid frequent pushes to the main repository**. This goes for PRs opened against your fork as well. Our test build pipelines are triggered every time a push to the repository (or PR) is made. Try to batch your commits until you've finished working for that session, or you've reached a point where collaborators need your commits to continue their own work. This also provides you the opportunity to amend commits for minor changes rather than having to commit them on their own because you've already pushed. - * This includes merging master into your branch. Try to leave merging from master for after your PR passes review; a maintainer will bring your PR up to date before merging. Exceptions to this include: resolving merge conflicts, needing something that was pushed to master for your branch, or something was pushed to master that could potentionally affect the functionality of what you're writing. + * This includes merging main into your branch. Try to leave merging from main for after your PR passes review; a maintainer will bring your PR up to date before merging. Exceptions to this include: resolving merge conflicts, needing something that was pushed to main for your branch, or something was pushed to main that could potentionally affect the functionality of what you're writing. 8. **Don't fight the framework**. Every framework has its flaws, but the frameworks we've picked out have been carefully chosen for their particular merits. If you can avoid it, please resist reimplementing swathes of framework logic - the work has already been done for you! 9. If someone is working on an issue or pull request, **do not open your own pull request for the same task**. Instead, collaborate with the author(s) of the existing pull request. Duplicate PRs opened without communicating with the other author(s) and/or PyDis staff will be closed. Communication is key, and there's no point in two separate implementations of the same thing. * One option is to fork the other contributor's repository and submit your changes to their branch with your own pull request. We suggest following these guidelines when interacting with their repository as well. @@ -39,7 +39,7 @@ All projects evolve over time, and this contribution guide is no different. This ## Supplemental Information ### Developer Environment -Sir Lancebot utilizes [Pipenv](https://pipenv.readthedocs.io/en/latest/) for installation and dependency management. For users unfamiliar with the Pipenv workflow, Pipenv's documentation provides a [Basic Usage](https://pipenv.readthedocs.io/en/latest/basics/) tutorial, along with some of the more advanced workflows. A project-specific installation guide can be found in [Sir Lancebot's README](https://github.com/python-discord/sir-lancebot/blob/master/README.md). +Sir Lancebot utilizes [Pipenv](https://pipenv.readthedocs.io/en/latest/) for installation and dependency management. For users unfamiliar with the Pipenv workflow, Pipenv's documentation provides a [Basic Usage](https://pipenv.readthedocs.io/en/latest/basics/) tutorial, along with some of the more advanced workflows. A project-specific installation guide can be found in [Sir Lancebot's README](https://github.com/python-discord/sir-lancebot/blob/main/README.md). When pulling down changes from GitHub, remember to sync your environment using `pipenv sync --dev` to ensure you're using the most up-to-date versions the project's dependencies. diff --git a/README.md b/README.md index 6b453879..11b46aac 100755 --- a/README.md +++ b/README.md @@ -22,9 +22,9 @@ Before you start, please take some time to read through our [contributing guidel See [Sir Lancebot's Wiki](https://pythondiscord.com/pages/contributing/sir-lancebot/) for in-depth guides on getting started with the project! -[1]:https://github.com/python-discord/sir-lancebot/workflows/Lint/badge.svg?branch=master -[2]:https://github.com/python-discord/sir-lancebot/actions?query=workflow%3ALint+branch%3Amaster -[3]:https://github.com/python-discord/sir-lancebot/workflows/Build/badge.svg?branch=master -[4]:https://github.com/python-discord/sir-lancebot/actions?query=workflow%3ABuild+branch%3Amaster -[5]: https://raw.githubusercontent.com/python-discord/branding/master/logos/badge/badge_github.svg +[1]:https://github.com/python-discord/sir-lancebot/workflows/Lint/badge.svg?branch=main +[2]:https://github.com/python-discord/sir-lancebot/actions?query=workflow%3ALint+branch%3Amain +[3]:https://github.com/python-discord/sir-lancebot/workflows/Build/badge.svg?branch=main +[4]:https://github.com/python-discord/sir-lancebot/actions?query=workflow%3ABuild+branch%3Amain +[5]: https://raw.githubusercontent.com/python-discord/branding/main/logos/badge/badge_github.svg [6]: https://discord.gg/python diff --git a/bot/exts/christmas/advent_of_code/_helpers.py b/bot/exts/christmas/advent_of_code/_helpers.py index b7adc895..a16a4871 100644 --- a/bot/exts/christmas/advent_of_code/_helpers.py +++ b/bot/exts/christmas/advent_of_code/_helpers.py @@ -44,7 +44,7 @@ REQUIRED_CACHE_KEYS = ( AOC_EMBED_THUMBNAIL = ( "https://raw.githubusercontent.com/python-discord" - "/branding/master/seasonal/christmas/server_icons/festive_256.gif" + "/branding/main/seasonal/christmas/server_icons/festive_256.gif" ) # Create an easy constant for the EST timezone diff --git a/bot/exts/evergreen/source.py b/bot/exts/evergreen/source.py index cdfe54ec..45752bf9 100644 --- a/bot/exts/evergreen/source.py +++ b/bot/exts/evergreen/source.py @@ -76,7 +76,7 @@ class BotSource(commands.Cog): file_location = Path(filename).relative_to(Path.cwd()).as_posix() - url = f"{Source.github}/blob/master/{file_location}{lines_extension}" + url = f"{Source.github}/blob/main/{file_location}{lines_extension}" return url, file_location, first_line_no or None diff --git a/bot/resources/halloween/spooky_rating.json b/bot/resources/halloween/spooky_rating.json index 533e7107..8e3e66bb 100644 --- a/bot/resources/halloween/spooky_rating.json +++ b/bot/resources/halloween/spooky_rating.json @@ -2,46 +2,46 @@ "-1": { "title": "\uD83D\uDD6F You're not scarin' anyone \uD83D\uDD6F", "text": "No matter what you say or do, nobody even flinches when you try to scare them. Was your costume this year only a white sheet with holes for eyes? Or did you even bother with a costume at all? Either way, don't expect too many treats when going from door-to-door.", - "image": "https://raw.githubusercontent.com/python-discord/sir-lancebot/master/bot/resources/halloween/spookyrating/candle.jpeg" + "image": "https://raw.githubusercontent.com/python-discord/sir-lancebot/main/bot/resources/halloween/spookyrating/candle.jpeg" }, "5": { "title": "\uD83D\uDC76 Like taking candy from a baby \uD83D\uDC76", "text": "Your scaring will probably make a baby cry... but that's the limit on your frightening powers. Be careful not to get to the point where everyone's running away from you because they don't like you, not because they're scared of you.", - "image": "https://raw.githubusercontent.com/python-discord/sir-lancebot/master/bot/resources/halloween/spookyrating/baby.jpeg" + "image": "https://raw.githubusercontent.com/python-discord/sir-lancebot/main/bot/resources/halloween/spookyrating/baby.jpeg" }, "20": { "title": "\uD83C\uDFDA You're skills are forming... \uD83C\uDFDA", "text": "As you become the Devil's apprentice, you begin to make people jump every time you sneak up on them. A good start, but you have to learn not to wear the same costume every year until it doesn't fit you. People will notice you and your prowess will decrease.", - "image": "https://raw.githubusercontent.com/python-discord/sir-lancebot/master/bot/resources/halloween/spookyrating/tiger.jpeg" + "image": "https://raw.githubusercontent.com/python-discord/sir-lancebot/main/bot/resources/halloween/spookyrating/tiger.jpeg" }, "30": { "title": "\uD83D\uDC80 Picture Perfect... \uD83D\uDC80", "text": "You've nailed the costume this year! You look suuuper scary! Now make sure to play the part and act out your costume and you'll be sure to give a few people a massive fright!", - "image": "https://raw.githubusercontent.com/python-discord/sir-lancebot/master/bot/resources/halloween/spookyrating/costume.jpeg" + "image": "https://raw.githubusercontent.com/python-discord/sir-lancebot/main/bot/resources/halloween/spookyrating/costume.jpeg" }, "50": { "title": "\uD83D\uDC7B Uhm... are you human \uD83D\uDC7B", "text": "Uhm... you're too good to be human and now you're beginning to sound like a ghost. You're almost invisible when haunting and nobody truly knows where you are at any given time. But they will always scream at the sound of a ghost...", - "image": "https://raw.githubusercontent.com/python-discord/sir-lancebot/master/bot/resources/halloween/spookyrating/ghost.jpeg" + "image": "https://raw.githubusercontent.com/python-discord/sir-lancebot/main/bot/resources/halloween/spookyrating/ghost.jpeg" }, "65": { "title": "\uD83C\uDF83 That potion can't be real \uD83C\uDF83", "text": "You're carrying... some... unknown liquids and no one knows who they are but yourself. Be careful on who you use these powerful spells on, because no Mage has the power to do any irreversible enchantments because even you won't know what will happen to these mortals.", - "image": "https://raw.githubusercontent.com/python-discord/sir-lancebot/master/bot/resources/halloween/spookyrating/necromancer.jepg" + "image": "https://raw.githubusercontent.com/python-discord/sir-lancebot/main/bot/resources/halloween/spookyrating/necromancer.jepg" }, "80": { "title": "\uD83E\uDD21 The most sinister face \uD83E\uDD21", "text": "Who knew something intended to be playful could be so menacing... Especially other people seeing you in their nightmares, continuing to haunt them day by day, stuck in their head throughout the entire year. Make sure to pull a face they will never forget.", - "image": "https://raw.githubusercontent.com/python-discord/sir-lancebot/master/bot/resources/halloween/spookyrating/clown.jpeg" + "image": "https://raw.githubusercontent.com/python-discord/sir-lancebot/main/bot/resources/halloween/spookyrating/clown.jpeg" }, "95": { "title": "\uD83D\uDE08 The Devil's Accomplice \uD83D\uDE08", "text": "Imagine being allies with the most evil character with an aim to scare people to death. Force people to suffer as they proceed straight to hell to meet your boss and best friend. Not even you know the power He has...", - "image": "https://raw.githubusercontent.com/python-discord/sir-lancebot/master/bot/resources/halloween/spookyrating/jackolantern.jpg" + "image": "https://raw.githubusercontent.com/python-discord/sir-lancebot/main/bot/resources/halloween/spookyrating/jackolantern.jpg" }, "100": { "title":"\uD83D\uDC7F The Devil Himself \uD83D\uDC7F", "text": "You are the evillest creature in existence to scare anyone and everyone humanly possible. The reason your underlings are called mortals is that they die. With your help, they die a lot quicker. With all the evil power in the universe, you know what to do.", - "image": "https://raw.githubusercontent.com/python-discord/sir-lancebot/master/bot/resources/halloween/spookyrating/devil.jpeg" + "image": "https://raw.githubusercontent.com/python-discord/sir-lancebot/main/bot/resources/halloween/spookyrating/devil.jpeg" } } diff --git a/bot/utils/time.py b/bot/utils/time.py index 3c57e126..fbf2fd21 100644 --- a/bot/utils/time.py +++ b/bot/utils/time.py @@ -3,7 +3,7 @@ import datetime from dateutil.relativedelta import relativedelta -# All these functions are from https://github.com/python-discord/bot/blob/master/bot/utils/time.py +# All these functions are from https://github.com/python-discord/bot/blob/main/bot/utils/time.py def _stringify_time_unit(value: int, unit: str) -> str: """ Returns a string to represent a value and time unit, ensuring that it uses the right plural form of the unit. -- cgit v1.2.3 From faccb5d2828d046d5e3a1e21c63f392529be4691 Mon Sep 17 00:00:00 2001 From: Matteo Bertucci Date: Wed, 24 Mar 2021 09:24:32 +0100 Subject: Remove broken link from the April fool collection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Its’a braken --- bot/resources/easter/april_fools_vids.json | 4 ---- 1 file changed, 4 deletions(-) (limited to 'bot/resources') diff --git a/bot/resources/easter/april_fools_vids.json b/bot/resources/easter/april_fools_vids.json index 5f0ba06e..d8c1efa1 100644 --- a/bot/resources/easter/april_fools_vids.json +++ b/bot/resources/easter/april_fools_vids.json @@ -16,10 +16,6 @@ "title": "Haptic Helpers: bringing you to your senses", "link": "https://youtu.be/3MA6_21nka8" }, - { - "title": "Introducing Google Gnome", - "link": "https://youtu.be/vNOllWX-2aE" - }, { "title": "Introducing Google Wind", "link": "https://youtu.be/QAwL0O5nXe0" -- cgit v1.2.3 From f6a28d5833160dccb6d308fd8e27c6afb9729643 Mon Sep 17 00:00:00 2001 From: Neil Shah <78612612+NeilShah2026@users.noreply.github.com> Date: Fri, 26 Mar 2021 09:50:03 -0400 Subject: Added 3 More Elements To The Json --- bot/resources/easter/april_fools_vids.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'bot/resources') diff --git a/bot/resources/easter/april_fools_vids.json b/bot/resources/easter/april_fools_vids.json index d8c1efa1..d029ff86 100644 --- a/bot/resources/easter/april_fools_vids.json +++ b/bot/resources/easter/april_fools_vids.json @@ -116,6 +116,18 @@ "title": "Introducing Gmail Motion", "link": "https://youtu.be/Bu927_ul_X0" } + { + "title": "Introducing GeForce GTX G-Assist", + "link": "https://youtu.be/smM-Wdk2RLQ" + } + { + "title": "The Hovering Mouse - Project McFly | Razer", + "link": "https://youtu.be/IlCx5gjAmqI" + } + { + "title": "Be the Machine | Project Venom v2", + "link": "https://youtu.be/j8UJE7DoyJ8" + } ] } -- cgit v1.2.3 From 73970e6ba6909bf7ab5023377585ee12cdc77b97 Mon Sep 17 00:00:00 2001 From: Xithrius Date: Sun, 28 Mar 2021 14:45:12 -0700 Subject: Added more topics. --- bot/resources/evergreen/py_topics.yaml | 2 +- bot/resources/evergreen/starter.yaml | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'bot/resources') diff --git a/bot/resources/evergreen/py_topics.yaml b/bot/resources/evergreen/py_topics.yaml index f3b2eaa3..7d5f7cb0 100644 --- a/bot/resources/evergreen/py_topics.yaml +++ b/bot/resources/evergreen/py_topics.yaml @@ -69,7 +69,7 @@ # game-development 660625198390837248: - - + - What is your favorite game mechanic? # microcontrollers 545603026732318730: diff --git a/bot/resources/evergreen/starter.yaml b/bot/resources/evergreen/starter.yaml index 949220f9..4fec6a10 100644 --- a/bot/resources/evergreen/starter.yaml +++ b/bot/resources/evergreen/starter.yaml @@ -31,3 +31,22 @@ - What is your favorite TV show? - What is your favorite media genre? - How many years have you spent coding? +- What book do you highly recommend everyone to read? +- What websites do you use daily to keep yourself up to date with the industry? +- What made you want to join this Discord server? +- How are you? +- What is the best advice you have ever gotten in regards to programming/software? +- What is the most satisfying thing you've done in your life? +- Who is your favorite music composer/producer/singer? +- What is your favorite song? +- What is your favorite video game? +- What are your hobbies other than programming? +- Who is your favorite Writer? +- What is your favorite movie? +- What is your favorite sport? +- What is your favorite fruit? +- What is your favorite juice? +- What is the best scenery you've ever seen? +- What artistic talents do you have? +- What is the tallest building you've entered? +- What is the oldest computer you've ever used? -- cgit v1.2.3 From ab126639380b337493606bc6c90acb5046e9f76e Mon Sep 17 00:00:00 2001 From: Boris Muratov <8bee278@gmail.com> Date: Mon, 29 Mar 2021 01:00:05 +0300 Subject: Add more game dev topics --- bot/resources/evergreen/py_topics.yaml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bot/resources') diff --git a/bot/resources/evergreen/py_topics.yaml b/bot/resources/evergreen/py_topics.yaml index 7d5f7cb0..6b7e0206 100644 --- a/bot/resources/evergreen/py_topics.yaml +++ b/bot/resources/evergreen/py_topics.yaml @@ -70,6 +70,10 @@ # game-development 660625198390837248: - What is your favorite game mechanic? + - What is your favorite framework and why? + - What games do you know that were written in Python? + - What books or tutorials would you recommend for game-development beginners? + - What made you start developing games? # microcontrollers 545603026732318730: -- cgit v1.2.3 From 4bf63f11929a22ffbb9d8859b76ed5437b0a4f13 Mon Sep 17 00:00:00 2001 From: Matteo Bertucci Date: Tue, 30 Mar 2021 16:51:29 +0200 Subject: Add missing commas to april_fools_vids.json #639 left the json file in a broken state, not letting the bot start. --- bot/resources/easter/april_fools_vids.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bot/resources') diff --git a/bot/resources/easter/april_fools_vids.json b/bot/resources/easter/april_fools_vids.json index d029ff86..b2cbd07b 100644 --- a/bot/resources/easter/april_fools_vids.json +++ b/bot/resources/easter/april_fools_vids.json @@ -115,15 +115,15 @@ { "title": "Introducing Gmail Motion", "link": "https://youtu.be/Bu927_ul_X0" - } + }, { "title": "Introducing GeForce GTX G-Assist", "link": "https://youtu.be/smM-Wdk2RLQ" - } + }, { "title": "The Hovering Mouse - Project McFly | Razer", "link": "https://youtu.be/IlCx5gjAmqI" - } + }, { "title": "Be the Machine | Project Venom v2", "link": "https://youtu.be/j8UJE7DoyJ8" -- cgit v1.2.3 From 22ba746b3892857d1b2050eab7c1c72cd435ef48 Mon Sep 17 00:00:00 2001 From: onerandomusername <71233171+onerandomusername@users.noreply.github.com> Date: Thu, 8 Apr 2021 13:01:36 -0400 Subject: Remove topic that doesn't make sense in discord Removed the `Name one thing you like about a person to your right.` topic as it doesn't make sense in discord --- bot/resources/evergreen/starter.yaml | 1 - 1 file changed, 1 deletion(-) (limited to 'bot/resources') diff --git a/bot/resources/evergreen/starter.yaml b/bot/resources/evergreen/starter.yaml index 4fec6a10..6b0de0ef 100644 --- a/bot/resources/evergreen/starter.yaml +++ b/bot/resources/evergreen/starter.yaml @@ -6,7 +6,6 @@ - "What is better: Milk, Dark or White chocolate?" - What is your favourite holiday? - If you could have any superpower, what would it be? -- Name one thing you like about a person to your right. - If you could be anyone else for one day, who would it be? - What Easter tradition do you enjoy most? - What is the best gift you've been given? -- cgit v1.2.3 From b8e8be4dff862997b8ba30ce48092c1c529d34c3 Mon Sep 17 00:00:00 2001 From: vcokltfre Date: Sun, 11 Apr 2021 19:02:01 +0100 Subject: fix: put april fools video links in correct channel names --- bot/resources/easter/april_fools_vids.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'bot/resources') diff --git a/bot/resources/easter/april_fools_vids.json b/bot/resources/easter/april_fools_vids.json index b2cbd07b..49a28bfa 100644 --- a/bot/resources/easter/april_fools_vids.json +++ b/bot/resources/easter/april_fools_vids.json @@ -115,11 +115,15 @@ { "title": "Introducing Gmail Motion", "link": "https://youtu.be/Bu927_ul_X0" - }, + } + ], + "nvidia": [ { "title": "Introducing GeForce GTX G-Assist", "link": "https://youtu.be/smM-Wdk2RLQ" - }, + } + ], + "razer": [ { "title": "The Hovering Mouse - Project McFly | Razer", "link": "https://youtu.be/IlCx5gjAmqI" @@ -129,5 +133,4 @@ "link": "https://youtu.be/j8UJE7DoyJ8" } ] - } -- cgit v1.2.3 From 375c247ad0098db12b40fc2c1ad36e417c95f9e9 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 12 Apr 2021 16:59:54 +0100 Subject: Remove inappropriate riddle --- bot/resources/easter/easter_riddle.json | 8 -------- 1 file changed, 8 deletions(-) (limited to 'bot/resources') diff --git a/bot/resources/easter/easter_riddle.json b/bot/resources/easter/easter_riddle.json index e93f6dad..f7eb63d8 100644 --- a/bot/resources/easter/easter_riddle.json +++ b/bot/resources/easter/easter_riddle.json @@ -63,14 +63,6 @@ ], "correct_answer": "A chocolate one" }, - { - "question": "Where does the Easter Bunny get his eggs?", - "riddles": [ - "Not a bush or tree", - "Emoji for a body part" - ], - "correct_answer": "Eggplants" - }, { "question": "Why did the Easter Bunny have to fire the duck?", "riddles": [ -- cgit v1.2.3 From 83245fa2d55e4430d2fff6a9aa6225ac1ee8de08 Mon Sep 17 00:00:00 2001 From: vcokltfre Date: Mon, 12 Apr 2021 19:47:41 +0100 Subject: feat: rewrite portion of fool command to allow all videos --- bot/exts/easter/april_fools_vids.py | 10 +- bot/resources/easter/april_fools_vids.json | 266 ++++++++++++++--------------- 2 files changed, 135 insertions(+), 141 deletions(-) (limited to 'bot/resources') diff --git a/bot/exts/easter/april_fools_vids.py b/bot/exts/easter/april_fools_vids.py index efe7e677..97cb407c 100644 --- a/bot/exts/easter/april_fools_vids.py +++ b/bot/exts/easter/april_fools_vids.py @@ -14,7 +14,6 @@ class AprilFoolVideos(commands.Cog): def __init__(self, bot: commands.Bot): self.bot = bot self.yt_vids = self.load_json() - self.youtubers = ['google'] # will add more in future @staticmethod def load_json() -> dict: @@ -27,10 +26,11 @@ class AprilFoolVideos(commands.Cog): @commands.command(name='fool') async def april_fools(self, ctx: commands.Context) -> None: """Get a random April Fools' video from Youtube.""" - random_youtuber = random.choice(self.youtubers) - category = self.yt_vids[random_youtuber] - random_vid = random.choice(category) - await ctx.send(f"Check out this April Fools' video by {random_youtuber}.\n\n{random_vid['link']}") + video = random.choice(self.yt_vids) + + channel, url = video["channel"], video["url"] + + await ctx.send(f"Check out this April Fools' video by {channel}.\n\n{url}") def setup(bot: commands.Bot) -> None: diff --git a/bot/resources/easter/april_fools_vids.json b/bot/resources/easter/april_fools_vids.json index 49a28bfa..e1e8c70a 100644 --- a/bot/resources/easter/april_fools_vids.json +++ b/bot/resources/easter/april_fools_vids.json @@ -1,136 +1,130 @@ -{ - "google": [ - { - "title": "Introducing Bad Joke Detector", - "link": "https://youtu.be/OYcv406J_J4" - }, - { - "title": "Introducing Google Cloud Hummus API - Find your Hummus!", - "link": "https://youtu.be/0_5X6N6DHyk" - }, - { - "title": "Introducing Google Play for Pets", - "link": "https://youtu.be/UmJ2NBHXTqo" - }, - { - "title": "Haptic Helpers: bringing you to your senses", - "link": "https://youtu.be/3MA6_21nka8" - }, - { - "title": "Introducing Google Wind", - "link": "https://youtu.be/QAwL0O5nXe0" - }, - { - "title": "Experience YouTube in #SnoopaVision", - "link": "https://youtu.be/DPEJB-FCItk" - }, - { - "title": "Introducing the self-driving bicycle in the Netherlands", - "link": "https://youtu.be/LSZPNwZex9s" - }, - { - "title": "Android Developer Story: The Guardian goes galactic with Android and Google Play", - "link": "https://youtu.be/dFrgNiweQDk" - }, - { - "title": "Introducing new delivery technology from Google Express", - "link": "https://youtu.be/F0F6SnbqUcE" - }, - { - "title": "Google Cardboard Plastic", - "link": "https://youtu.be/VkOuShXpoKc" - }, - { - "title": "Google Photos: Search your photos by emoji", - "link": "https://youtu.be/HQtGFBbwKEk" - }, - { - "title": "Introducing Google Actual Cloud Platform", - "link": "https://youtu.be/Cp10_PygJ4o" - }, - { - "title": "Introducing Dial-Up mode", - "link": "https://youtu.be/XTTtkisylQw" - }, - { - "title": "Smartbox by Inbox: the mailbox of tomorrow, today", - "link": "https://youtu.be/hydLZJXG3Tk" - }, - { - "title": "Introducing Coffee to the Home", - "link": "https://youtu.be/U2JBFlW--UU" - }, - { - "title": "Chrome for Android and iOS: Emojify the Web", - "link": "https://youtu.be/G3NXNnoGr3Y" - }, - { - "title": "Google Maps: Pokémon Challenge", - "link": "https://youtu.be/4YMD6xELI_k" - }, - { - "title": "Introducing Google Fiber to the Pole", - "link": "https://youtu.be/qcgWRpQP6ds" - }, - { - "title": "Introducing Gmail Blue", - "link": "https://youtu.be/Zr4JwPb99qU" - }, - { - "title": "Introducing Google Nose", - "link": "https://youtu.be/VFbYadm_mrw" - }, - { - "title": "Explore Treasure Mode with Google Maps", - "link": "https://youtu.be/_qFFHC0eIUc" - }, - { - "title": "YouTube's ready to select a winner", - "link": "https://youtu.be/H542nLTTbu0" - }, - { - "title": "A word about Gmail Tap", - "link": "https://youtu.be/Je7Xq9tdCJc" - }, - { - "title": "Introducing the Google Fiber Bar", - "link": "https://youtu.be/re0VRK6ouwI" - }, - { - "title": "Introducing Gmail Tap", - "link": "https://youtu.be/1KhZKNZO8mQ" - }, - { - "title": "Chrome Multitask Mode", - "link": "https://youtu.be/UiLSiqyDf4Y" - }, - { - "title": "Google Maps 8-bit for NES", - "link": "https://youtu.be/rznYifPHxDg" - }, - { - "title": "Being a Google Autocompleter", - "link": "https://youtu.be/blB_X38YSxQ" - }, - { - "title": "Introducing Gmail Motion", - "link": "https://youtu.be/Bu927_ul_X0" - } - ], - "nvidia": [ - { - "title": "Introducing GeForce GTX G-Assist", - "link": "https://youtu.be/smM-Wdk2RLQ" - } - ], - "razer": [ - { - "title": "The Hovering Mouse - Project McFly | Razer", - "link": "https://youtu.be/IlCx5gjAmqI" - }, - { - "title": "Be the Machine | Project Venom v2", - "link": "https://youtu.be/j8UJE7DoyJ8" - } - ] -} +[ + { + "url": "https://youtu.be/OYcv406J_J4", + "channel": "google" + }, + { + "url": "https://youtu.be/0_5X6N6DHyk", + "channel": "google" + }, + { + "url": "https://youtu.be/UmJ2NBHXTqo", + "channel": "google" + }, + { + "url": "https://youtu.be/3MA6_21nka8", + "channel": "google" + }, + { + "url": "https://youtu.be/QAwL0O5nXe0", + "channel": "google" + }, + { + "url": "https://youtu.be/DPEJB-FCItk", + "channel": "google" + }, + { + "url": "https://youtu.be/LSZPNwZex9s", + "channel": "google" + }, + { + "url": "https://youtu.be/dFrgNiweQDk", + "channel": "google" + }, + { + "url": "https://youtu.be/F0F6SnbqUcE", + "channel": "google" + }, + { + "url": "https://youtu.be/VkOuShXpoKc", + "channel": "google" + }, + { + "url": "https://youtu.be/HQtGFBbwKEk", + "channel": "google" + }, + { + "url": "https://youtu.be/Cp10_PygJ4o", + "channel": "google" + }, + { + "url": "https://youtu.be/XTTtkisylQw", + "channel": "google" + }, + { + "url": "https://youtu.be/hydLZJXG3Tk", + "channel": "google" + }, + { + "url": "https://youtu.be/U2JBFlW--UU", + "channel": "google" + }, + { + "url": "https://youtu.be/G3NXNnoGr3Y", + "channel": "google" + }, + { + "url": "https://youtu.be/4YMD6xELI_k", + "channel": "google" + }, + { + "url": "https://youtu.be/qcgWRpQP6ds", + "channel": "google" + }, + { + "url": "https://youtu.be/Zr4JwPb99qU", + "channel": "google" + }, + { + "url": "https://youtu.be/VFbYadm_mrw", + "channel": "google" + }, + { + "url": "https://youtu.be/_qFFHC0eIUc", + "channel": "google" + }, + { + "url": "https://youtu.be/H542nLTTbu0", + "channel": "google" + }, + { + "url": "https://youtu.be/Je7Xq9tdCJc", + "channel": "google" + }, + { + "url": "https://youtu.be/re0VRK6ouwI", + "channel": "google" + }, + { + "url": "https://youtu.be/1KhZKNZO8mQ", + "channel": "google" + }, + { + "url": "https://youtu.be/UiLSiqyDf4Y", + "channel": "google" + }, + { + "url": "https://youtu.be/rznYifPHxDg", + "channel": "google" + }, + { + "url": "https://youtu.be/blB_X38YSxQ", + "channel": "google" + }, + { + "url": "https://youtu.be/Bu927_ul_X0", + "channel": "google" + }, + { + "url": "https://youtu.be/smM-Wdk2RLQ", + "channel": "nvidia" + }, + { + "url": "https://youtu.be/IlCx5gjAmqI", + "channel": "razer" + }, + { + "url": "https://youtu.be/j8UJE7DoyJ8", + "channel": "razer" + } +] -- cgit v1.2.3 From e43d311ffdc8378cc0ad7095c765c76aeea145d5 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 16 Apr 2021 14:01:17 +0100 Subject: Remove un-used sound resources --- .../spookysounds/109710__tomlija__horror-gate.mp3 | Bin 118125 -> 0 bytes .../spookysounds/126113__klankbeeld__laugh.mp3 | Bin 112365 -> 0 bytes ...ugh-original-132802-nanakisan-evil-laugh-08.mp3 | Bin 137385 -> 0 bytes .../spookysounds/14570__oscillator__ghost-fx.mp3 | Bin 135405 -> 0 bytes .../spookysounds/168650__0xmusex0__doorcreak.mp3 | Bin 162421 -> 0 bytes ...71078__klankbeeld__horror-scream-woman-long.mp3 | Bin 131625 -> 0 bytes .../193812__geoneo0__four-voices-whispering-6.mp3 | Bin 163257 -> 0 bytes ...37282__devilfish101__frantic-violin-screech.mp3 | Bin 131566 -> 0 bytes .../249686__cylon8472__cthulhu-growl.mp3 | Bin 153226 -> 0 bytes .../spookysounds/35716__analogchill__scream.mp3 | Bin 114773 -> 0 bytes ...15__inspectorj__something-evil-approaches-a.mp3 | Bin 298717 -> 0 bytes .../60571__gabemiller74__breathofdeath.mp3 | Bin 177049 -> 0 bytes .../spookysounds/Female_Monster_Growls_.mp3 | Bin 148276 -> 0 bytes .../halloween/spookysounds/Male_Zombie_Roar_.mp3 | Bin 62171 -> 0 bytes .../spookysounds/Monster_Alien_Growl_Calm_.mp3 | Bin 133651 -> 0 bytes .../spookysounds/Monster_Alien_Grunt_Hiss_.mp3 | Bin 74718 -> 0 bytes bot/resources/halloween/spookysounds/sources.txt | 41 --------------------- 17 files changed, 41 deletions(-) delete mode 100644 bot/resources/halloween/spookysounds/109710__tomlija__horror-gate.mp3 delete mode 100644 bot/resources/halloween/spookysounds/126113__klankbeeld__laugh.mp3 delete mode 100644 bot/resources/halloween/spookysounds/133674__klankbeeld__horror-laugh-original-132802-nanakisan-evil-laugh-08.mp3 delete mode 100644 bot/resources/halloween/spookysounds/14570__oscillator__ghost-fx.mp3 delete mode 100644 bot/resources/halloween/spookysounds/168650__0xmusex0__doorcreak.mp3 delete mode 100644 bot/resources/halloween/spookysounds/171078__klankbeeld__horror-scream-woman-long.mp3 delete mode 100644 bot/resources/halloween/spookysounds/193812__geoneo0__four-voices-whispering-6.mp3 delete mode 100644 bot/resources/halloween/spookysounds/237282__devilfish101__frantic-violin-screech.mp3 delete mode 100644 bot/resources/halloween/spookysounds/249686__cylon8472__cthulhu-growl.mp3 delete mode 100644 bot/resources/halloween/spookysounds/35716__analogchill__scream.mp3 delete mode 100644 bot/resources/halloween/spookysounds/413315__inspectorj__something-evil-approaches-a.mp3 delete mode 100644 bot/resources/halloween/spookysounds/60571__gabemiller74__breathofdeath.mp3 delete mode 100644 bot/resources/halloween/spookysounds/Female_Monster_Growls_.mp3 delete mode 100644 bot/resources/halloween/spookysounds/Male_Zombie_Roar_.mp3 delete mode 100644 bot/resources/halloween/spookysounds/Monster_Alien_Growl_Calm_.mp3 delete mode 100644 bot/resources/halloween/spookysounds/Monster_Alien_Grunt_Hiss_.mp3 delete mode 100644 bot/resources/halloween/spookysounds/sources.txt (limited to 'bot/resources') diff --git a/bot/resources/halloween/spookysounds/109710__tomlija__horror-gate.mp3 b/bot/resources/halloween/spookysounds/109710__tomlija__horror-gate.mp3 deleted file mode 100644 index 495f2bd1..00000000 Binary files a/bot/resources/halloween/spookysounds/109710__tomlija__horror-gate.mp3 and /dev/null differ diff --git a/bot/resources/halloween/spookysounds/126113__klankbeeld__laugh.mp3 b/bot/resources/halloween/spookysounds/126113__klankbeeld__laugh.mp3 deleted file mode 100644 index 538feabc..00000000 Binary files a/bot/resources/halloween/spookysounds/126113__klankbeeld__laugh.mp3 and /dev/null differ diff --git a/bot/resources/halloween/spookysounds/133674__klankbeeld__horror-laugh-original-132802-nanakisan-evil-laugh-08.mp3 b/bot/resources/halloween/spookysounds/133674__klankbeeld__horror-laugh-original-132802-nanakisan-evil-laugh-08.mp3 deleted file mode 100644 index 17f66698..00000000 Binary files a/bot/resources/halloween/spookysounds/133674__klankbeeld__horror-laugh-original-132802-nanakisan-evil-laugh-08.mp3 and /dev/null differ diff --git a/bot/resources/halloween/spookysounds/14570__oscillator__ghost-fx.mp3 b/bot/resources/halloween/spookysounds/14570__oscillator__ghost-fx.mp3 deleted file mode 100644 index 5670657c..00000000 Binary files a/bot/resources/halloween/spookysounds/14570__oscillator__ghost-fx.mp3 and /dev/null differ diff --git a/bot/resources/halloween/spookysounds/168650__0xmusex0__doorcreak.mp3 b/bot/resources/halloween/spookysounds/168650__0xmusex0__doorcreak.mp3 deleted file mode 100644 index 42f9e9fd..00000000 Binary files a/bot/resources/halloween/spookysounds/168650__0xmusex0__doorcreak.mp3 and /dev/null differ diff --git a/bot/resources/halloween/spookysounds/171078__klankbeeld__horror-scream-woman-long.mp3 b/bot/resources/halloween/spookysounds/171078__klankbeeld__horror-scream-woman-long.mp3 deleted file mode 100644 index 1cdb0f4d..00000000 Binary files a/bot/resources/halloween/spookysounds/171078__klankbeeld__horror-scream-woman-long.mp3 and /dev/null differ diff --git a/bot/resources/halloween/spookysounds/193812__geoneo0__four-voices-whispering-6.mp3 b/bot/resources/halloween/spookysounds/193812__geoneo0__four-voices-whispering-6.mp3 deleted file mode 100644 index 89150d57..00000000 Binary files a/bot/resources/halloween/spookysounds/193812__geoneo0__four-voices-whispering-6.mp3 and /dev/null differ diff --git a/bot/resources/halloween/spookysounds/237282__devilfish101__frantic-violin-screech.mp3 b/bot/resources/halloween/spookysounds/237282__devilfish101__frantic-violin-screech.mp3 deleted file mode 100644 index b5f85f8d..00000000 Binary files a/bot/resources/halloween/spookysounds/237282__devilfish101__frantic-violin-screech.mp3 and /dev/null differ diff --git a/bot/resources/halloween/spookysounds/249686__cylon8472__cthulhu-growl.mp3 b/bot/resources/halloween/spookysounds/249686__cylon8472__cthulhu-growl.mp3 deleted file mode 100644 index d141f68e..00000000 Binary files a/bot/resources/halloween/spookysounds/249686__cylon8472__cthulhu-growl.mp3 and /dev/null differ diff --git a/bot/resources/halloween/spookysounds/35716__analogchill__scream.mp3 b/bot/resources/halloween/spookysounds/35716__analogchill__scream.mp3 deleted file mode 100644 index a0614b53..00000000 Binary files a/bot/resources/halloween/spookysounds/35716__analogchill__scream.mp3 and /dev/null differ diff --git a/bot/resources/halloween/spookysounds/413315__inspectorj__something-evil-approaches-a.mp3 b/bot/resources/halloween/spookysounds/413315__inspectorj__something-evil-approaches-a.mp3 deleted file mode 100644 index 38374316..00000000 Binary files a/bot/resources/halloween/spookysounds/413315__inspectorj__something-evil-approaches-a.mp3 and /dev/null differ diff --git a/bot/resources/halloween/spookysounds/60571__gabemiller74__breathofdeath.mp3 b/bot/resources/halloween/spookysounds/60571__gabemiller74__breathofdeath.mp3 deleted file mode 100644 index f769d9d8..00000000 Binary files a/bot/resources/halloween/spookysounds/60571__gabemiller74__breathofdeath.mp3 and /dev/null differ diff --git a/bot/resources/halloween/spookysounds/Female_Monster_Growls_.mp3 b/bot/resources/halloween/spookysounds/Female_Monster_Growls_.mp3 deleted file mode 100644 index 8b04f0f5..00000000 Binary files a/bot/resources/halloween/spookysounds/Female_Monster_Growls_.mp3 and /dev/null differ diff --git a/bot/resources/halloween/spookysounds/Male_Zombie_Roar_.mp3 b/bot/resources/halloween/spookysounds/Male_Zombie_Roar_.mp3 deleted file mode 100644 index 964d685e..00000000 Binary files a/bot/resources/halloween/spookysounds/Male_Zombie_Roar_.mp3 and /dev/null differ diff --git a/bot/resources/halloween/spookysounds/Monster_Alien_Growl_Calm_.mp3 b/bot/resources/halloween/spookysounds/Monster_Alien_Growl_Calm_.mp3 deleted file mode 100644 index 9e643773..00000000 Binary files a/bot/resources/halloween/spookysounds/Monster_Alien_Growl_Calm_.mp3 and /dev/null differ diff --git a/bot/resources/halloween/spookysounds/Monster_Alien_Grunt_Hiss_.mp3 b/bot/resources/halloween/spookysounds/Monster_Alien_Grunt_Hiss_.mp3 deleted file mode 100644 index ad99cf76..00000000 Binary files a/bot/resources/halloween/spookysounds/Monster_Alien_Grunt_Hiss_.mp3 and /dev/null differ diff --git a/bot/resources/halloween/spookysounds/sources.txt b/bot/resources/halloween/spookysounds/sources.txt deleted file mode 100644 index 7df03c2e..00000000 --- a/bot/resources/halloween/spookysounds/sources.txt +++ /dev/null @@ -1,41 +0,0 @@ -Female_Monster_Growls_ -Male_Zombie_Roar_ -Monster_Alien_Growl_Calm_ -Monster_Alien_Grunt_Hiss_ -https://www.youtube.com/audiolibrary/soundeffects - -413315__inspectorj__something-evil-approaches-a -https://freesound.org/people/InspectorJ/sounds/413315/ - -133674__klankbeeld__horror-laugh-original-132802-nanakisan-evil-laugh-08 -https://freesound.org/people/klankbeeld/sounds/133674/ - -35716__analogchill__scream -https://freesound.org/people/analogchill/sounds/35716/ - -249686__cylon8472__cthulhu-growl -https://freesound.org/people/cylon8472/sounds/249686/ - -126113__klankbeeld__laugh -https://freesound.org/people/klankbeeld/sounds/126113/ - -14570__oscillator__ghost-fx -https://freesound.org/people/oscillator/sounds/14570/ - -60571__gabemiller74__breathofdeath -https://freesound.org/people/gabemiller74/sounds/60571/ - -168650__0xmusex0__doorcreak -https://freesound.org/people/0XMUSEX0/sounds/168650/ - -193812__geoneo0__four-voices-whispering-6 -https://freesound.org/people/geoneo0/sounds/193812/ - -109710__tomlija__horror-gate -https://freesound.org/people/Tomlija/sounds/109710/ - -171078__klankbeeld__horror-scream-woman-long -https://freesound.org/people/klankbeeld/sounds/171078/ - -237282__devilfish101__frantic-violin-screech -https://freesound.org/people/devilfish101/sounds/237282/ -- cgit v1.2.3 From 4c3312a642f1876427d17a41eeb9c912f9cd4b06 Mon Sep 17 00:00:00 2001 From: Objectivitix <79152594+Objectivitix@users.noreply.github.com> Date: Fri, 7 May 2021 10:41:30 -0300 Subject: Add 30 math questions and 30 science questions to trivia_quiz.json --- bot/resources/evergreen/trivia_quiz.json | 331 +++++++++++++++++++++++++++++++ 1 file changed, 331 insertions(+) (limited to 'bot/resources') diff --git a/bot/resources/evergreen/trivia_quiz.json b/bot/resources/evergreen/trivia_quiz.json index a4225eb1..b20b953f 100644 --- a/bot/resources/evergreen/trivia_quiz.json +++ b/bot/resources/evergreen/trivia_quiz.json @@ -44,6 +44,24 @@ ], "question": "What was the first game Yoshi appeared in?", "answer": "Super Mario World" + }, + { + "id": 6, + "hints": [ + "They were used alternatively to playing cards.", + "They generally have handdrawn nature images on them." + ], + "question": "What did Nintendo make before video games and toys?", + "answer": "Hanafuda, Hanafuda cards" + }, + { + "id": 7, + "hints": [ + "Before being Nintendo's main competitor in home gaming, they were successful in arcades.", + "Their first console was called the Master System." + ], + "question": "Who was Nintendo's biggest competitor in 1990?", + "answer": "Sega" } ], "general": [ @@ -269,5 +287,318 @@ "answer": "1492", "info": "The explorer Christopher Columbus made four trips across the Atlantic Ocean from Spain: in 1492, 1493, 1498 and 1502. He was determined to find a direct water route west from Europe to Asia, but he never did. Instead, he stumbled upon the Americas" } + ], + "math": [ + { + "id": 201, + "question": "What is the highest power of a biquadratic polynomial?", + "answer": "4, four" + }, + { + "id": 202, + "question": "What is the formula for surface area of a sphere?", + "answer": "4pir^2, 4πr^2" + }, + { + "id": 203, + "question": "Which theorem states that hypotenuse2 = base2 + height2?", + "answer": "Pythagorean's, Pythagorean's theorem" + }, + { + "id": 204, + "question": "Which trigonometric function is defined as hypotenuse/opposite?", + "answer": "cosecant, cosec, csc" + }, + { + "id": 205, + "question": "Does the harmonic series converge or diverge?", + "answer": "diverge" + }, + { + "id": 206, + "question": "How many quadrants are there in a cartesian plane?", + "answer": "4, four" + }, + { + "id": 207, + "question": "What is the (0,0) coordinate in a cartesian plane termed as?", + "answer": "origin" + }, + { + "id": 208, + "question": "What's the following formula that finds the area of a triangle called?", + "img_url": "https://wikimedia.org/api/rest_v1/media/math/render/png/d22b8566e8187542966e8d166e72e93746a1a6fc", + "answer": "Heron's formula" + }, + { + "id": 209, + "dynamic_id": 201, + "question": "Solve the following system of linear equations (format your answer like this & ):\n{}x + {}y = {},\n{}x + {}y = {}", + "answer": "{} & {}" + }, + { + "id": 210, + "dynamic_id": 202, + "question": "What's {} + {} mod {} congruent to?", + "answer": "{}" + }, + { + "id": 211, + "question": "What is the bottom number on a fraction called?", + "answer": "denominator" + }, + { + "id": 212, + "dynamic_id": 203, + "question": "How many vertices are on a {}gonal prism?", + "answer": "{}" + }, + { + "id": 213, + "question": "What is the term used to describe two triangles that have equal corresponding sides and angle measures?", + "answer": "congruent" + }, + { + "id": 214, + "question": "⅓πr2h is the volume of which 3 dimensional figure?", + "answer": "cone" + }, + { + "id": 215, + "dynamic_id": 204, + "question": "Find the square root of -{}.", + "answer": "{}i" + }, + { + "id": 216, + "question": "In set builder notation, {p/q | q ≠ 0, p & q ∈ Z} represents what?", + "answer": "Rational Numbers" + }, + { + "id": 217, + "question": "What is the natural log of -1 (use i for imaginary number)?", + "answer": "pi*i, pii, πi" + }, + { + "id": 218, + "question": "When is the *inaugural* World Maths Day (format your answer in MM/DD)?", + "answer": "03/13" + }, + { + "id": 219, + "question": "As the Fibonacci sequence extends to infinity, what's the ratio of each number `n` and its preceding number `n-1` approaching?", + "answer": "Golden Ratio" + }, + { + "id": 220, + "question": "0, 1, 1, 2, 3, 5, 8, 13, 21, 34 are numbers of which sequence?", + "answer": "Fibonacci" + }, + { + "id": 221, + "question": "Prime numbers only have __ factors.", + "answer": "2, two" + }, + { + "id": 222, + "question": "In probability, the ________ ______ of an experiment or random trial is the set of all possible outcomes of it.", + "answer": "sample space" + }, + { + "id": 223, + "question": "In statistics, what does this formula represent?", + "img_url": "https://www.statisticshowto.com/wp-content/uploads/2013/11/sample-standard-deviation.jpg", + "answer": "sample standard deviation, standard deviation of a sample" + }, + { + "id": 224, + "question": "\"Hexakosioihexekontahexaphobia\" is the fear of which number?", + "answer": "666" + }, + { + "id": 225, + "question": "Prove or disprove the Riemann Hypothesis", + "answer": "" + }, + { + "id": 226, + "dynamic_id": 205, + "question": "BASE TWO QUESTION: Calculate {} {} {}", + "answer": "{}" + }, + { + "id": 227, + "question": "What is the only number in the entire number system which can be spelled with the same number of letters as itself?", + "answer": "4, four" + + }, + { + "id": 228, + "question": "1/100th of a second is also termed as what?", + "answer": "jiffy" + }, + { + "id": 229, + "question": "What is this triangle called?", + "img_url": "https://cdn.askpython.com/wp-content/uploads/2020/07/Pascals-triangle.png", + "answer": "Pascal's triangle, Pascal" + }, + { + "id": 230, + "question": "6a^2 is the surface area of which 3 dimensional figure?", + "answer": "cube" + } + ], + "science": [ + { + "id": 301, + "question": "The three main components of a normal atom are: protons, neutrons, and…", + "answer": "electrons" + }, + { + "id": 302, + "question": "As of 2021, how many elements are there in the Periodic Table?", + "answer": "118" + }, + { + "id": 303, + "question": "What is the universal force discovered by Newton that causes objects with mass to attract each other called?", + "answer": "gravity" + }, + { + "id": 304, + "question": "What do you call an organism composed of only one cell?", + "answer": "unicellular, single-celled" + }, + { + "id": 305, + "question": "The Heisenberg’s Uncertainty Principle states that the position and ________ of a quantum object can’t be both exactly measured at the same time.", + "answer": "velocity, momentum" + }, + { + "id": 306, + "question": "A ____________ reaction is the one wherein an atom or a set of atoms is/are replaced by another atom or a set of atoms", + "answer": "displacement, exchange" + }, + { + "id": 307, + "question": "What is the process by which green plants and certain other organisms transform light energy into chemical energy?", + "answer": "photosynthesis" + }, + { + "id": 308, + "question": "DYNAMIC QUESTION, TO BE DETERMINED", + "answer": "DYNAMIC QUESTION, TO BE DETERMINED" + }, + { + "id": 309, + "question": "DYNAMIC QUESTION, TO BE DETERMINED", + "answer": "DYNAMIC QUESTION, TO BE DETERMINED" + }, + { + "id": 310, + "question": "DYNAMIC QUESTION, TO BE DETERMINED", + "answer": "DYNAMIC QUESTION, TO BE DETERMINED" + }, + { + "id": 311, + "question": "How does one call the direct phase transition from gas to solid?", + "answer": "deposition" + }, + { + "id": 312, + "question": "What is the intermolecular force caused by temporary and induced dipoles?", + "answer": "LDF, London dispersion, London dispersion force" + }, + { + "id": 313, + "question": "What is the force that causes objects to float in fluids called?", + "answer": "buoyancy" + }, + { + "id": 314, + "question": "About how many neurons are in the human brain? (A. 1 billion, B. 10 billion, C. 100 billion, D. 300 billion)", + "answer": "C, 100 billion, 100 bil" + }, + { + "id": 315, + "question": "What is the name of our galaxy group in which the Milky Way resides?", + "answer": "Local Group" + }, + { + "id": 316, + "question": "Which cell organelle is nicknamed \"the powerhouse of the cell\"?", + "answer": "mitochondria" + }, + { + "id": 317, + "question": "Which vascular tissue transports water and minerals from the roots to the rest of a plant?", + "answer": "xylem" + }, + { + "id": 318, + "question": "Who discovered the theories of relativity?", + "answer": "Albert Einstein, Einstein" + }, + { + "id": 319, + "question": "In particle physics, the hypothetical isolated elementary particle with only one magnetic pole is termed as...", + "answer": "magnetic monopole" + }, + { + "id": 320, + "question": "How does one describe a chemical reaction wherein heat is released?", + "answer": "exothermic" + }, + { + "id": 321, + "question": "What range of frequency are the average human ears capable of hearing (A. 10Hz-10kHz, B. 20Hz-20kHz, C. 20Hz-2000Hz, D. 10kHz-20kHz)?", + "answer": "B, 20Hz-20kHz" + }, + { + "id": 322, + "question": "What is the process used to separate substances with different polarity in a mixture, using a stationary and mobile phase?", + "answer": "chromatography" + }, + { + "id": 323, + "question": "Which law states that the current through a conductor between two points is directly proportional to the voltage across the two points?", + "answer": "Ohm's law" + }, + { + "id": 324, + "question": "The type of rock that is formed by the accumulation or deposition of mineral or organic particles at the Earth's surface, followed by cementation, is called...", + "answer": "sedimentary, sedimentary rock" + }, + { + "id": 325, + "question": "Is the Richter scale (common earthquake scale) linear or logarithmic?", + "answer": "logarithmic" + }, + { + "id": 326, + "question": "What type of image is formed by a convex mirror?", + "answer": "virtual image, virtual" + }, + { + "id": 327, + "question": "How does one call the branch of physics that deals with the study of mechanical waves in gases, liquids, and solids including topics such as vibration, sound, ultrasound and infrasound", + "answer": "acoustics" + }, + { + "id": 328, + "question": "Which law states that the global entropy in a closed system can only increase?", + "answer": "second law of thermodynamics" + }, + { + "id": 329, + "question": "Which particle is emitted during the beta decay of a radioactive element?", + "answer": "an electron, electron" + }, + { + "id": 330, + "question": "When DNA is unzipped, two strands are formed. What are they called (separate both answers by the word \"and\")?", + "answer": "leading and lagging, leading strand and lagging strand" + } ] } -- cgit v1.2.3 From 0913bf2ba9a66bb7d6dc7c729d689b98dfdcb520 Mon Sep 17 00:00:00 2001 From: Objectivitix <79152594+Objectivitix@users.noreply.github.com> Date: Fri, 7 May 2021 14:06:34 -0300 Subject: Add dynamically generated science questions --- bot/resources/evergreen/trivia_quiz.json | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'bot/resources') diff --git a/bot/resources/evergreen/trivia_quiz.json b/bot/resources/evergreen/trivia_quiz.json index b20b953f..ce33e8c9 100644 --- a/bot/resources/evergreen/trivia_quiz.json +++ b/bot/resources/evergreen/trivia_quiz.json @@ -435,7 +435,7 @@ { "id": 228, "question": "1/100th of a second is also termed as what?", - "answer": "jiffy" + "answer": "a jiffy, jiffy" }, { "id": 229, @@ -487,18 +487,22 @@ }, { "id": 308, - "question": "DYNAMIC QUESTION, TO BE DETERMINED", - "answer": "DYNAMIC QUESTION, TO BE DETERMINED" + "dynamic_id": 301, + "question": "What is the {} planet of our Solar System?", + "answer": "{}" }, { "id": 309, - "question": "DYNAMIC QUESTION, TO BE DETERMINED", - "answer": "DYNAMIC QUESTION, TO BE DETERMINED" + "dynamic_id": 302, + "question": "In the biological taxonomic hierarchy, what is placed directly above {}?", + "answer": "{}" }, { "id": 310, - "question": "DYNAMIC QUESTION, TO BE DETERMINED", - "answer": "DYNAMIC QUESTION, TO BE DETERMINED" + "dynamic_id": 303, + "question": "How does one describe the unit {} in SI base units?\n**IMPORTANT:** use * for multiplication, ^ for exponentiation, and place your base units in this order: m - kg - s - A", + "img_url": "https://i.imgur.com/NRzU6tf.png", + "answer": "{}" }, { "id": 311, @@ -533,7 +537,7 @@ { "id": 317, "question": "Which vascular tissue transports water and minerals from the roots to the rest of a plant?", - "answer": "xylem" + "answer": "the xylem, xylem" }, { "id": 318, @@ -593,7 +597,7 @@ { "id": 329, "question": "Which particle is emitted during the beta decay of a radioactive element?", - "answer": "an electron, electron" + "answer": "an electron, the electron, electron" }, { "id": 330, -- cgit v1.2.3 From 66480996e0a227506c01260e8899ea4256db6eb9 Mon Sep 17 00:00:00 2001 From: Objectivitix <79152594+Objectivitix@users.noreply.github.com> Date: Sun, 9 May 2021 17:41:34 -0300 Subject: use binary formatting instead of `bin()` in function --- bot/resources/evergreen/trivia_quiz.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bot/resources') diff --git a/bot/resources/evergreen/trivia_quiz.json b/bot/resources/evergreen/trivia_quiz.json index ce33e8c9..79e79d00 100644 --- a/bot/resources/evergreen/trivia_quiz.json +++ b/bot/resources/evergreen/trivia_quiz.json @@ -423,8 +423,8 @@ { "id": 226, "dynamic_id": 205, - "question": "BASE TWO QUESTION: Calculate {} {} {}", - "answer": "{}" + "question": "BASE TWO QUESTION: Calculate {:b} {} {:b}", + "answer": "{:b}" }, { "id": 227, -- cgit v1.2.3 From 3f0388556c886d9d8e26b7a0373e3a6d2d9ba5ad Mon Sep 17 00:00:00 2001 From: Objectivitix <79152594+Objectivitix@users.noreply.github.com> Date: Tue, 11 May 2021 09:05:09 -0400 Subject: fix original copy paste error in math question Co-authored-by: Matteo Bertucci --- bot/resources/evergreen/trivia_quiz.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bot/resources') diff --git a/bot/resources/evergreen/trivia_quiz.json b/bot/resources/evergreen/trivia_quiz.json index 79e79d00..1e85542f 100644 --- a/bot/resources/evergreen/trivia_quiz.json +++ b/bot/resources/evergreen/trivia_quiz.json @@ -301,7 +301,7 @@ }, { "id": 203, - "question": "Which theorem states that hypotenuse2 = base2 + height2?", + "question": "Which theorem states that hypotenuse^2 = base^2 + height^2?", "answer": "Pythagorean's, Pythagorean's theorem" }, { -- cgit v1.2.3 From fa0f365acebfdef1130330dc2835945e9da3a69b Mon Sep 17 00:00:00 2001 From: Objectivitix <79152594+Objectivitix@users.noreply.github.com> Date: Tue, 11 May 2021 10:08:40 -0300 Subject: add one more correct answer to science (q328) --- bot/resources/evergreen/trivia_quiz.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bot/resources') diff --git a/bot/resources/evergreen/trivia_quiz.json b/bot/resources/evergreen/trivia_quiz.json index 1e85542f..774c235a 100644 --- a/bot/resources/evergreen/trivia_quiz.json +++ b/bot/resources/evergreen/trivia_quiz.json @@ -592,7 +592,7 @@ { "id": 328, "question": "Which law states that the global entropy in a closed system can only increase?", - "answer": "second law of thermodynamics" + "answer": "second law, second law of thermodynamics" }, { "id": 329, -- cgit v1.2.3 From 5241fc893d1d378f6a4dcae32925f672ce8f87a7 Mon Sep 17 00:00:00 2001 From: Objectivitix <79152594+Objectivitix@users.noreply.github.com> Date: Tue, 11 May 2021 15:29:13 -0300 Subject: change weird google docs unicode to standard ones --- bot/resources/evergreen/trivia_quiz.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'bot/resources') diff --git a/bot/resources/evergreen/trivia_quiz.json b/bot/resources/evergreen/trivia_quiz.json index 774c235a..e2054f43 100644 --- a/bot/resources/evergreen/trivia_quiz.json +++ b/bot/resources/evergreen/trivia_quiz.json @@ -301,7 +301,7 @@ }, { "id": 203, - "question": "Which theorem states that hypotenuse^2 = base^2 + height^2?", + "question": "Which theorem states that hypotenuse2 = base2 + height2?", "answer": "Pythagorean's, Pythagorean's theorem" }, { @@ -360,7 +360,7 @@ }, { "id": 214, - "question": "⅓πr2h is the volume of which 3 dimensional figure?", + "question": "⅓πr^2h is the volume of which 3 dimensional figure?", "answer": "cone" }, { @@ -452,7 +452,7 @@ "science": [ { "id": 301, - "question": "The three main components of a normal atom are: protons, neutrons, and…", + "question": "The three main components of a normal atom are: protons, neutrons, and...", "answer": "electrons" }, { @@ -472,7 +472,7 @@ }, { "id": 305, - "question": "The Heisenberg’s Uncertainty Principle states that the position and ________ of a quantum object can’t be both exactly measured at the same time.", + "question": "The Heisenberg's Uncertainty Principle states that the position and ________ of a quantum object can't be both exactly measured at the same time.", "answer": "velocity, momentum" }, { @@ -500,9 +500,9 @@ { "id": 310, "dynamic_id": 303, - "question": "How does one describe the unit {} in SI base units?\n**IMPORTANT:** use * for multiplication, ^ for exponentiation, and place your base units in this order: m - kg - s - A", + "question": "How does one describe the unit {} in SI base units?\n**IMPORTANT:** enclose answer in backticks, use \\* for multiplication, ^ for exponentiation, and place your base units in this order: m - kg - s - A", "img_url": "https://i.imgur.com/NRzU6tf.png", - "answer": "{}" + "answer": "`{}`" }, { "id": 311, -- cgit v1.2.3 From 91db03e5fde06efb41341d595d75424b9ff759b2 Mon Sep 17 00:00:00 2001 From: Objectivitix <79152594+Objectivitix@users.noreply.github.com> Date: Tue, 11 May 2021 15:30:34 -0300 Subject: fix copy paste error --- bot/resources/evergreen/trivia_quiz.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bot/resources') diff --git a/bot/resources/evergreen/trivia_quiz.json b/bot/resources/evergreen/trivia_quiz.json index e2054f43..1ba5ea7b 100644 --- a/bot/resources/evergreen/trivia_quiz.json +++ b/bot/resources/evergreen/trivia_quiz.json @@ -301,7 +301,7 @@ }, { "id": 203, - "question": "Which theorem states that hypotenuse2 = base2 + height2?", + "question": "Which theorem states that hypotenuse^2 = base^2 + height2^?", "answer": "Pythagorean's, Pythagorean's theorem" }, { -- cgit v1.2.3 From 8ee99da88cb5d2b0fc9b1e3dcf24f72bca5679a4 Mon Sep 17 00:00:00 2001 From: Objectivitix <79152594+Objectivitix@users.noreply.github.com> Date: Wed, 12 May 2021 08:38:53 -0400 Subject: fix ANOTHER copy paste error 3rd copy paste error- smh Co-authored-by: Shivansh-007 --- bot/resources/evergreen/trivia_quiz.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bot/resources') diff --git a/bot/resources/evergreen/trivia_quiz.json b/bot/resources/evergreen/trivia_quiz.json index 1ba5ea7b..acf7375a 100644 --- a/bot/resources/evergreen/trivia_quiz.json +++ b/bot/resources/evergreen/trivia_quiz.json @@ -301,7 +301,7 @@ }, { "id": 203, - "question": "Which theorem states that hypotenuse^2 = base^2 + height2^?", + "question": "Which theorem states that hypotenuse^2 = base^2 + height^2?", "answer": "Pythagorean's, Pythagorean's theorem" }, { -- cgit v1.2.3 From 4448f0d04987ac2628f74e43f6262a5856509f9d Mon Sep 17 00:00:00 2001 From: Objectivitix <79152594+Objectivitix@users.noreply.github.com> Date: Wed, 12 May 2021 09:41:05 -0300 Subject: add one more possible answer to math q208 --- bot/resources/evergreen/trivia_quiz.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bot/resources') diff --git a/bot/resources/evergreen/trivia_quiz.json b/bot/resources/evergreen/trivia_quiz.json index acf7375a..3a907de1 100644 --- a/bot/resources/evergreen/trivia_quiz.json +++ b/bot/resources/evergreen/trivia_quiz.json @@ -328,7 +328,7 @@ "id": 208, "question": "What's the following formula that finds the area of a triangle called?", "img_url": "https://wikimedia.org/api/rest_v1/media/math/render/png/d22b8566e8187542966e8d166e72e93746a1a6fc", - "answer": "Heron's formula" + "answer": "Heron's formula, Heron" }, { "id": 209, -- cgit v1.2.3 From b125a1ab1cdb8355d6c4c5225f1b048ca760e957 Mon Sep 17 00:00:00 2001 From: Objectivitix <79152594+Objectivitix@users.noreply.github.com> Date: Thu, 13 May 2021 08:49:41 -0400 Subject: change the unsolvable math question to a linalg question --- bot/resources/evergreen/trivia_quiz.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bot/resources') diff --git a/bot/resources/evergreen/trivia_quiz.json b/bot/resources/evergreen/trivia_quiz.json index 3a907de1..94082849 100644 --- a/bot/resources/evergreen/trivia_quiz.json +++ b/bot/resources/evergreen/trivia_quiz.json @@ -417,8 +417,8 @@ }, { "id": 225, - "question": "Prove or disprove the Riemann Hypothesis", - "answer": "" + "question": "A matrix multiplied by its inverse matrix equals...", + "answer": "the identity matrix, identity matrix" }, { "id": 226, -- cgit v1.2.3 From 6dc4dcd52d7dd697a6c0ad8a7cc941eeb1d102b7 Mon Sep 17 00:00:00 2001 From: Soham Banerjee <63705023+soham4abc@users.noreply.github.com> Date: Sat, 29 May 2021 09:54:10 +0530 Subject: Added "centisecond" in trivia_quiz.json (#751) * added centisecond in json Co-authored-by: Xithrius <15021300+Xithrius@users.noreply.github.com> --- bot/resources/evergreen/trivia_quiz.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bot/resources') diff --git a/bot/resources/evergreen/trivia_quiz.json b/bot/resources/evergreen/trivia_quiz.json index 94082849..fee1b6d7 100644 --- a/bot/resources/evergreen/trivia_quiz.json +++ b/bot/resources/evergreen/trivia_quiz.json @@ -435,7 +435,7 @@ { "id": 228, "question": "1/100th of a second is also termed as what?", - "answer": "a jiffy, jiffy" + "answer": "a jiffy, jiffy, centisecond" }, { "id": 229, -- cgit v1.2.3 From 5ebe5ee24a4a1a0d867700927381a3601057ab8e Mon Sep 17 00:00:00 2001 From: Objectivitix <79152594+Objectivitix@users.noreply.github.com> Date: Tue, 6 Jul 2021 16:40:15 -0400 Subject: Add "cs" and "python" categories to the `.quiz` command * add 30 questions each under the categories "cs" and "python" add the two categories into the code and modify the starting phase Co-authored-by: Xithrius <15021300+Xithrius@users.noreply.github.com> Co-authored-by: ToxicKidz <78174417+ToxicKidz@users.noreply.github.com> --- bot/exts/evergreen/trivia_quiz.py | 29 +-- bot/resources/evergreen/trivia_quiz.json | 318 ++++++++++++++++++++++++++++++- 2 files changed, 326 insertions(+), 21 deletions(-) (limited to 'bot/resources') diff --git a/bot/exts/evergreen/trivia_quiz.py b/bot/exts/evergreen/trivia_quiz.py index a8d10afd..28924aed 100644 --- a/bot/exts/evergreen/trivia_quiz.py +++ b/bot/exts/evergreen/trivia_quiz.py @@ -17,8 +17,8 @@ from bot.constants import Colours, NEGATIVE_REPLIES, Roles logger = logging.getLogger(__name__) DEFAULT_QUESTION_LIMIT = 6 -STANDARD_VARIATION_TOLERANCE = 83 -DYNAMICALLY_GEN_VARIATION_TOLERANCE = 95 +STANDARD_VARIATION_TOLERANCE = 88 +DYNAMICALLY_GEN_VARIATION_TOLERANCE = 97 WRONG_ANS_RESPONSE = [ "No one answered correctly!", @@ -210,6 +210,8 @@ class TriviaQuiz(commands.Cog): "retro": "Questions related to retro gaming.", "math": "General questions about mathematics ranging from grade 8 to grade 12.", "science": "Put your understanding of science to the test!", + "cs": "A large variety of computer science questions.", + "python": "Trivia on our amazing language, Python!", } @staticmethod @@ -225,10 +227,12 @@ class TriviaQuiz(commands.Cog): Start a quiz! Questions for the quiz can be selected from the following categories: - - general: Test your general knowledge. (default) + - general: Test your general knowledge. - retro: Questions related to retro gaming. - math: General questions about mathematics ranging from grade 8 to grade 12. - science: Put your understanding of science to the test! + - cs: A large variety of computer science questions. + - python: Trivia on our amazing language, Python! (More to come!) """ @@ -290,7 +294,7 @@ class TriviaQuiz(commands.Cog): start_embed = self.make_start_embed(category) await ctx.send(embed=start_embed) # send an embed with the rules - await asyncio.sleep(1) + await asyncio.sleep(5) done_question = [] hint_no = 0 @@ -430,21 +434,18 @@ class TriviaQuiz(commands.Cog): """Generate a starting/introduction embed for the quiz.""" start_embed = discord.Embed( colour=Colours.blue, - title="Quiz game starting!", + title="A quiz game is starting!", description=( - f"This game consists of {self.question_limit + 1} questions.\n" - "**Rules: **No cheating and have fun!\n" + f"This game consists of {self.question_limit + 1} questions.\n\n" + "**Rules: **\n" + "1. Only enclose your answer in backticks when the question tells you to.\n" + "2. If the question specifies an answer format, follow it or else it won't be accepted.\n" + "3. You have 30s per question. Points for each question reduces by 25 after 10s or after a hint.\n" + "4. No cheating and have fun!\n\n" f"**Category**: {category}" ), ) - start_embed.set_footer( - text=( - "Points for each question reduces by 25 after 10s or after a hint. " - "Total time is 30s per question" - ) - ) - return start_embed @staticmethod diff --git a/bot/resources/evergreen/trivia_quiz.json b/bot/resources/evergreen/trivia_quiz.json index fee1b6d7..8008838c 100644 --- a/bot/resources/evergreen/trivia_quiz.json +++ b/bot/resources/evergreen/trivia_quiz.json @@ -371,8 +371,8 @@ }, { "id": 216, - "question": "In set builder notation, {p/q | q ≠ 0, p & q ∈ Z} represents what?", - "answer": "Rational Numbers" + "question": "In set builder notation, what does {p/q | q ≠ 0, p & q ∈ Z} represent?", + "answer": "Rationals, Rational Numbers" }, { "id": 217, @@ -401,7 +401,7 @@ }, { "id": 222, - "question": "In probability, the ________ ______ of an experiment or random trial is the set of all possible outcomes of it.", + "question": "In probability, the \\_\\_\\_\\_\\_\\_ \\_\\_\\_\\_\\_ of an experiment or random trial is the set of all possible outcomes of it.", "answer": "sample space" }, { @@ -472,12 +472,12 @@ }, { "id": 305, - "question": "The Heisenberg's Uncertainty Principle states that the position and ________ of a quantum object can't be both exactly measured at the same time.", + "question": "The Heisenberg's Uncertainty Principle states that the position and \\_\\_\\_\\_\\_\\_\\_\\_ of a quantum object can't be both exactly measured at the same time.", "answer": "velocity, momentum" }, { "id": 306, - "question": "A ____________ reaction is the one wherein an atom or a set of atoms is/are replaced by another atom or a set of atoms", + "question": "A \\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_ reaction is the one wherein an atom or a set of atoms is/are replaced by another atom or a set of atoms", "answer": "displacement, exchange" }, { @@ -521,7 +521,7 @@ }, { "id": 314, - "question": "About how many neurons are in the human brain? (A. 1 billion, B. 10 billion, C. 100 billion, D. 300 billion)", + "question": "About how many neurons are in the human brain?\n(A. 1 billion, B. 10 billion, C. 100 billion, D. 300 billion)", "answer": "C, 100 billion, 100 bil" }, { @@ -556,7 +556,7 @@ }, { "id": 321, - "question": "What range of frequency are the average human ears capable of hearing (A. 10Hz-10kHz, B. 20Hz-20kHz, C. 20Hz-2000Hz, D. 10kHz-20kHz)?", + "question": "What range of frequency are the average human ears capable of hearing?\n(A. 10Hz-10kHz, B. 20Hz-20kHz, C. 20Hz-2000Hz, D. 10kHz-20kHz)", "answer": "B, 20Hz-20kHz" }, { @@ -604,5 +604,309 @@ "question": "When DNA is unzipped, two strands are formed. What are they called (separate both answers by the word \"and\")?", "answer": "leading and lagging, leading strand and lagging strand" } + ], + "cs": [ + { + "id": 401, + "question": "What does HTML stand for?", + "answer": "HyperText Markup Language" + }, + { + "id": 402, + "question": "What does ASCII stand for?", + "answer": "American Standard Code for Information Interchange" + }, + { + "id": 403, + "question": "What does SASS stand for?", + "answer": "Syntactically Awesome Stylesheets, Syntactically Awesome Style Sheets" + }, + { + "id": 404, + "question": "In neural networks, \\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_\\_ is an algorithm for supervised learning using gradient descent.", + "answer": "backpropagation" + }, + { + "id": 405, + "question": "What is computing capable of performing exaFLOPS called?", + "answer": "exascale computing, exascale" + }, + { + "id": 406, + "question": "In quantum computing, what is the full name of \"qubit\"?", + "answer": "quantum binary digit" + }, + { + "id": 407, + "question": "Given that January 1, 1970 is the starting epoch of time_t in c time, and that time_t is stored as a signed 32-bit integer, when will unix time roll over (year)?", + "answer": "2038" + }, + { + "id": 408, + "question": "What are the components of digital devices that make up logic gates called?", + "answer": "transistors" + }, + { + "id": 409, + "question": "How many possible public IPv6 addresses are there (answer in 2^n)?", + "answer": "2^128" + }, + { + "id": 410, + "question": "A hypothetical point in time at which technological growth becomes uncontrollable and irreversible, resulting in unforeseeable changes to human civilization is termed as...?", + "answer": "technological singularity, singularity" + }, + { + "id": 411, + "question": "In cryptography, the practice of establishing a shared secret between two parties using public keys and private keys is called...?", + "answer": "key exchange" + }, + { + "id": 412, + "question": "How many bits are in a TCP checksum header?", + "answer": "16, sixteen" + }, + { + "id": 413, + "question": "What is the most popular protocol (as of 2021) that handles communication between email servers?", + "answer": "SMTP, Simple Mail Transfer Protocol" + }, + { + "id": 414, + "question": "Which port does SMTP use to communicate between email servers? (assuming its plaintext)", + "answer": "25" + }, + { + "id": 415, + "question": "Which DNS record contains mail servers of a given domain?", + "answer": "MX, mail exchange" + }, + { + "id": 416, + "question": "Which newline sequence does HTTP use?", + "answer": "carriage return line feed, CRLF, \\r\\n" + }, + { + "id": 417, + "question": "What does one call the optimization technique used in CPU design that attempts to guess the outcome of a conditional operation and prepare for the most likely result?", + "answer": "branch prediction" + }, + { + "id": 418, + "question": "Name a universal logic gate.", + "answer": "NAND, NOR" + }, + { + "id": 419, + "question": "What is the mathematical formalism which functional programming was built on?", + "answer": "lambda calculus" + }, + { + "id": 420, + "question": "Why is a DDoS attack different from a DoS attack?\n(A. because the victim's server was indefinitely disrupted from the amount of traffic, B. because it also attacks the victim's confidentiality, C. because the attack had political purposes behind it, D. because the traffic flooding the victim originated from many different sources)", + "answer": "D" + }, + { + "id": 421, + "question": "What is a HTTP/1.1 feature that was superseded by HTTP/2 multiplexing and is unsupported in most browsers nowadays?", + "answer": "pipelining" + }, + { + "id": 422, + "question": "Which of these languages is the oldest?\n(Tcl, Smalltalk 80, Haskell, Standard ML, Java)", + "answer": "Smalltalk 80" + }, + { + "id": 423, + "question": "What is the name for unicode codepoints that do not fit into 16 bits?", + "answer": "surrogates" + }, + { + "id": 424, + "question": "Under what locale does making a string lowercase behave differently?", + "answer": "Turkish" + }, + { + "id": 425, + "question": "What does the \"a\" represent in a HSLA color value?", + "answer": "transparency, translucency, alpha value, alpha channel, alpha" + }, + { + "id": 426, + "question": "What is the section of a GIF that is limited to 256 colors called?", + "answer": "image block" + }, + { + "id": 427, + "question": "What is an interpreter capable of interpreting itself called?", + "answer": "metainterpreter" + }, + { + "id": 428, + "question": "Due to what data storage medium did old programming languages, such as cobol, ignore all characters past the 72nd column?", + "answer": "punch cards" + }, + { + "id": 429, + "question": "Which of these sorting algorithms is not stable?\n(Counting sort, quick sort, insertion sort, tim sort, bubble sort)", + "answer": "quick, quick sort" + }, + { + "id": 430, + "question": "Which of these languages is the youngest?\n(Lisp, Python, Java, Haskell, Prolog, Ruby, Perl)", + "answer": "Java" + } + ], + "python": [ + { + "id": 501, + "question": "Is everything an instance of the `object` class (y/n)?", + "answer": "y, yes" + }, + { + "id": 502, + "question": "Name the only non-dunder method of the builtin slice object.", + "answer": "indices" + }, + { + "id": 503, + "question": "What exception, other than `StopIteration`, can you raise from a `__getitem__` dunder to indicate to an iterator that it should stop?", + "answer": "IndexError" + }, + { + "id": 504, + "question": "What type does the `&` operator return when given 2 `dict_keys` objects?", + "answer": "set" + }, + { + "id": 505, + "question": "Can you pickle a running `list_iterator` (y/n)?", + "answer": "y, yes" + }, + { + "id": 506, + "question": "What attribute of a closure contains the value closed over?", + "answer": "cell_contents" + }, + { + "id": 507, + "question": "What name does a lambda function have?", + "answer": "" + }, + { + "id": 508, + "question": "Which file contains all special site builtins, such as help or credits?", + "answer": "_sitebuiltins" + }, + { + "id": 509, + "question": "Which module when imported opens up a web browser tab that points to the classic 353 XKCD comic mentioning Python?", + "answer": "antigravity" + }, + { + "id": 510, + "question": "Which attribute is the documentation string of a function/method/class stored in (answer should be enclosed in backticks!)?", + "answer": "`__doc__`" + }, + { + "id": 511, + "question": "What is the official name of this operator `:=`, introduced in 3.8?", + "answer": "assignment-expression operator" + }, + { + "id": 512, + "question": "When was Python first released?", + "answer": "1991" + }, + { + "id": 513, + "question": "Where does the name Python come from?", + "answer": "Monty Python, Monty Python's Flying Circus" + }, + { + "id": 514, + "question": "How is infinity represented in Python?", + "answer": "float(\"infinity\"), float('infinity'), float(\"inf\"), float('inf')" + }, + { + "id": 515, + "question": "Which of these characters is valid python outside of string literals in some context?\n(`@`, `$`, `?`)", + "answer": "@" + }, + { + "id": 516, + "question": "Which standard library module is designed for making simple parsers for languages like shell, as well as safe quoting of strings for use in a shell?", + "answer": "shlex" + }, + { + "id": 517, + "question": "Which one of these protocols/abstract base classes does the builtin `range` object NOT implement?\n(`Sequence`, `Iterable`, `Generator`)", + "answer": "Generator" + }, + { + "id": 518, + "question": "What decorator is used to allow a protocol to be checked at runtime?", + "answer": "runtime_checkable, typing.runtime_checkable" + }, + { + "id": 519, + "question": "Does `numbers.Rational` include the builtin object float (y/n)", + "answer": "n, no" + }, + { + "id": 520, + "question": "What is a package that doesn't have a `__init__` file called?", + "answer":"namespace package" + }, + { + "id": 521, + "question": "What file extension is used by the site module to determine what to do at every start?", + "answer": ".pth" + }, + { + "id": 522, + "question": "What is the garbage collection strategy used by cpython to collect everything but reference cycles?", + "answer": "reference counting, refcounting" + }, + { + "id": 523, + "question": "What dunder method is used by the tuple constructor to optimize converting an iterator to a tuple (answer should be enclosed in backticks!)?", + "answer": "`__length_hint__`" + }, + { + "id": 524, + "question": "Which protocol is used to pass self to methods when accessed on classes?", + "answer": "Descriptor" + }, + { + "id": 525, + "question": "Which year was Python 3 released?", + "answer": "2008" + }, + { + "id": 526, + "question": "Which of these is not a generator method?\n(`next`, `send`, `throw`, `close`)", + "answer": "next" + }, + { + "id": 527, + "question": "Is the `__aiter__` method async (y/n)?", + "answer": "n, no" + }, + { + "id": 528, + "question": "How does one call a class who defines the behavior of their instance classes?", + "answer": "a metaclass, metaclass" + }, + { + "id": 529, + "question": "Which of these is a subclass of `Exception`?\n(`NotImplemented`, `asyncio.CancelledError`, `StopIteration`)", + "answer": "StopIteration" + }, + { + "id": 530, + "question": "What type is the attribute of a frame object that contains the current local variables?", + "answer": "dict" + } ] } -- cgit v1.2.3 From 27ebd35e1b8cf74e239608164b63999cf67ce682 Mon Sep 17 00:00:00 2001 From: Cam Caswell Date: Thu, 8 Jul 2021 01:54:36 -0400 Subject: Add initial embed and image manipulation functions - Add the all_cards.png file Fix my mistakes from last commit - add missing attributes to DuckGame - call divmod correctly - call assemble_board_image correctly - assemble_board_image now returns the image - I'm sorry it was late at night --- bot/exts/evergreen/duck_game.py | 59 ++++++++++++++++++++++++++++++++-- bot/resources/evergreen/all_cards.png | Bin 0 -> 155466 bytes 2 files changed, 57 insertions(+), 2 deletions(-) create mode 100644 bot/resources/evergreen/all_cards.png (limited to 'bot/resources') diff --git a/bot/exts/evergreen/duck_game.py b/bot/exts/evergreen/duck_game.py index e3e5db67..96241ea1 100644 --- a/bot/exts/evergreen/duck_game.py +++ b/bot/exts/evergreen/duck_game.py @@ -1,16 +1,54 @@ import asyncio import random +from collections import defaultdict +from io import BytesIO from itertools import product +from pathlib import Path import discord +from PIL import Image, ImageDraw from discord.ext import commands from bot.bot import Bot +from bot.constants import Colours DECK = list(product(*[(0, 1, 2)]*4)) GAME_DURATION = 180 +p = Path("bot", "resources", "evergreen", "all_cards.png") +ALL_CARDS = Image.open(p) +CARD_WIDTH = 155 +CARD_HEIGHT = 97 + + +def assemble_board_image(board: list[tuple[int]], rows: int, columns: int) -> Image: + """Cut and paste images representing the given cards into an image representing the board.""" + new_im = Image.new("RGBA", (CARD_WIDTH*columns, CARD_HEIGHT*rows)) + draw = ImageDraw.Draw(new_im) + for idx, card in enumerate(board): + card_image = get_card_image(card) + row, col = divmod(idx, columns) + top, left = row * CARD_HEIGHT, col * CARD_WIDTH + new_im.paste(card_image, (left, top)) + draw.text((left+7, top+4), str(idx)) # magic numbers are buffers for the card labels + return new_im + + +def get_card_image(card: tuple[int]) -> Image: + """Slice the image containing all the cards to get just this card.""" + row, col = divmod(as_trinary(card), 9) # all_cards.png should have 9x9 cards + x1 = col * CARD_WIDTH + x2 = x1 + CARD_WIDTH + y1 = row * CARD_HEIGHT + y2 = y1 + CARD_HEIGHT + return ALL_CARDS.crop((x1, y1, x2, y2)) + + +def as_trinary(card: tuple[int]) -> int: + """Find the card's unique index by interpreting its features as trinary.""" + return int(''.join(str(x) for x in card), base=3) + class DuckGame: """A class for a single game.""" @@ -28,8 +66,13 @@ class DuckGame: columns (int, optional): Columns in the game board. Defaults to 3. minimum_solutions (int, optional): Minimum acceptable number of solutions in the board. Defaults to 1. """ - self._solutions = None + self.rows = rows + self.columns = columns size = rows * columns + + self._solutions = None + self.scores = defaultdict(int) + self.board = random.sample(DECK, size) while len(self.solutions) < minimum_solutions: self.board = random.sample(DECK, size) @@ -93,6 +136,7 @@ class DuckGamesDirector(commands.Cog): return game = DuckGame() + game.running = True self.current_games[ctx.channel.id] = game game.embed_msg = await self.send_board_embed(ctx, game) @@ -110,7 +154,18 @@ class DuckGamesDirector(commands.Cog): async def send_board_embed(self, ctx: commands.Context, game: DuckGame) -> discord.Message: """Create and send the initial game embed. This will be edited as the game goes on.""" - pass + image = assemble_board_image(game.board, game.rows, game.columns) + with BytesIO() as image_stream: + image.save(image_stream, format="png") + image_stream.seek(0) + file = discord.File(fp=image_stream, filename="board.png") + embed = discord.Embed( + title="Duck Duck Duck Goose!", + color=Colours.bright_green, + footer="" + ) + embed.set_image(url="attachment://board.png") + return await ctx.send(embed=embed, file=file) def setup(bot: Bot) -> None: diff --git a/bot/resources/evergreen/all_cards.png b/bot/resources/evergreen/all_cards.png new file mode 100644 index 00000000..10ed2eb8 Binary files /dev/null and b/bot/resources/evergreen/all_cards.png differ -- cgit v1.2.3 From 79db5a00dfe7639020174bd543fb10d1e789dace Mon Sep 17 00:00:00 2001 From: Cam Caswell Date: Fri, 9 Jul 2021 13:36:08 -0400 Subject: Improve the look of labels --- bot/exts/evergreen/duck_game.py | 16 ++++++++++++---- bot/resources/evergreen/LuckiestGuy-Regular.ttf | Bin 0 -> 58292 bytes 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 bot/resources/evergreen/LuckiestGuy-Regular.ttf (limited to 'bot/resources') diff --git a/bot/exts/evergreen/duck_game.py b/bot/exts/evergreen/duck_game.py index fb54fcfd..7fb23ff6 100644 --- a/bot/exts/evergreen/duck_game.py +++ b/bot/exts/evergreen/duck_game.py @@ -8,7 +8,7 @@ from pathlib import Path from urllib.parse import urlparse import discord -from PIL import Image, ImageDraw +from PIL import Image, ImageDraw, ImageFont from discord.ext import commands from bot.bot import Bot @@ -32,8 +32,11 @@ INCORRECT_GOOSE = -1 """ SOLN_DISTR = 0, 0.05, 0.05, 0.1, 0.15, 0.25, 0.2, 0.15, .05 -p = Path("bot", "resources", "evergreen", "all_cards.png") -ALL_CARDS = Image.open(p) +image_path = Path("bot", "resources", "evergreen", "all_cards.png") +font_path = Path("bot", "resources", "evergreen", "LuckiestGuy-Regular.ttf") + +ALL_CARDS = Image.open(image_path) +LABEL_FONT = ImageFont.truetype(str(font_path), size=16) CARD_WIDTH = 155 CARD_HEIGHT = 97 @@ -51,7 +54,12 @@ def assemble_board_image(board: list[tuple[int]], rows: int, columns: int) -> Im row, col = divmod(idx, columns) top, left = row * CARD_HEIGHT, col * CARD_WIDTH new_im.paste(card_image, (left, top)) - draw.text((left+7, top+4), str(idx), (0, 0, 0)) # magic numbers are buffers for the card labels + draw.text( + xy=(left+5, top+5), # magic numbers are buffers for the card labels + text=str(idx), + fill=(0, 0, 0), + font=LABEL_FONT, + ) return new_im diff --git a/bot/resources/evergreen/LuckiestGuy-Regular.ttf b/bot/resources/evergreen/LuckiestGuy-Regular.ttf new file mode 100644 index 00000000..8c79c875 Binary files /dev/null and b/bot/resources/evergreen/LuckiestGuy-Regular.ttf differ -- cgit v1.2.3 From c18676eb72530dd8747fdd8d6572d4c6c748b6b3 Mon Sep 17 00:00:00 2001 From: Axis <77634274+blankRiot96@users.noreply.github.com> Date: Fri, 4 Jun 2021 22:21:03 +0530 Subject: Added more topics to `py_topics.yaml`. --- bot/resources/evergreen/py_topics.yaml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'bot/resources') diff --git a/bot/resources/evergreen/py_topics.yaml b/bot/resources/evergreen/py_topics.yaml index 6b7e0206..a3fb2ccc 100644 --- a/bot/resources/evergreen/py_topics.yaml +++ b/bot/resources/evergreen/py_topics.yaml @@ -23,6 +23,19 @@ - When you were first learning, what is a resource you wish you had? - What is something you know now, that you wish you knew when starting out? - What is something simple that you still error on today? + - What do you plan on eventually achieving with Python? + - Is Python your first programming language? If not, what is it? + - What's your favourite aspect of Python development? (Backend, frontend, game dev, machine learning, ai, etc.) + - In what ways has Python Discord helped you with Python? + - Are you currently using Python professionally, for education, or as a hobby? + - What is your process when you decide to start a project in Python? + - Have you ever been unable to finish a Python project? What is it and why? + - How often do you program in Python? + - How would you learn a new library if needed to do so? + - Have you ever worked with a microcontroller or anything physical with Python before? + - How good would you say you are at Python so far? Beginner, intermediate, or advanced? + - Have you ever tried making your own programming language? + - Has a recently discovered Python module changed your general use of Python? # algos-and-data-structs 650401909852864553: @@ -52,7 +65,7 @@ - What unique features does your bot contain, if any? - What commands/features are you proud of making? - What feature would you be the most interested in making? - - What feature would you like to see added to the library? what feature in the library do you think is redundant? + - What feature would you like to see added to the library? What feature in the library do you think is redundant? - Do you think there's a way in which Discord could handle bots better? - What's one feature you wish more developers had in their bots? -- cgit v1.2.3 From 9368d4c6f7befb956e049c7253ddbf2bddd0b3c5 Mon Sep 17 00:00:00 2001 From: Cam Caswell Date: Thu, 19 Aug 2021 18:07:31 -0400 Subject: Improve help message --- bot/exts/evergreen/duck_game.py | 34 ++++++++++++++++++++++-------- bot/resources/evergreen/ducks_help_ex.png | Bin 0 -> 343921 bytes 2 files changed, 25 insertions(+), 9 deletions(-) create mode 100644 bot/resources/evergreen/ducks_help_ex.png (limited to 'bot/resources') diff --git a/bot/exts/evergreen/duck_game.py b/bot/exts/evergreen/duck_game.py index 8eb5d858..04ae03a0 100644 --- a/bot/exts/evergreen/duck_game.py +++ b/bot/exts/evergreen/duck_game.py @@ -34,6 +34,7 @@ SOLN_DISTR = 0, 0.05, 0.05, 0.1, 0.15, 0.25, 0.2, 0.15, .05 IMAGE_PATH = Path("bot", "resources", "evergreen", "all_cards.png") FONT_PATH = Path("bot", "resources", "evergreen", "LuckiestGuy-Regular.ttf") +HELP_IMAGE_PATH = Path("bot", "resources", "evergreen", "ducks_help_ex.png") ALL_CARDS = Image.open(IMAGE_PATH) LABEL_FONT = ImageFont.truetype(str(FONT_PATH), size=16) @@ -44,6 +45,26 @@ EMOJI_WRONG = "\u274C" ANSWER_REGEX = re.compile(r'^\D*(\d+)\D+(\d+)\D+(\d+)\D*$') +HELP_TEXT = """ +**Each card has 4 features** +Color, Number, Hat, and Accessory + +**A valid flight** +3 cards where each feature is either all the same or all different + +**Call "GOOSE"** +if you think there are no more flights + +**+1** for each valid flight +**+2** for a correct "GOOSE" call +**-1** for any wrong answer + +The first flight below is invalid: the first card has swords while the other two have no accessory.\ + It would be valid if the first card was empty-handed, or one of the other two had paintbrushes. + +The second flight is valid because there are no 2:1 splits; each feature is either all the same or all different. +""" + def assemble_board_image(board: list[tuple[int]], rows: int, columns: int) -> Image: """Cut and paste images representing the given cards into an image representing the board.""" @@ -304,18 +325,13 @@ class DuckGamesDirector(commands.Cog): title="Compete against other players to find valid flights!", color=discord.Color.dark_purple(), ) - embed.description = ( - "**Each card has 4 features**\nColor, Number, Hat, and Accessory\n" - "\n**A valid flight**\n3 cards where each feature is either all the same or all different\n" - '\n**Call "GOOSE"**\nif you think there are no more flights\n' - "\n**1** for each valid flight\n" - '**2** for a correct "GOOSE" call\n' - "**-1** for any wrong answer" - ) + embed.description = HELP_TEXT + file = discord.File(HELP_IMAGE_PATH, filename="help.png") + embed.set_image(url="attachment://help.png") embed.set_footer( text="Tip: using Discord's compact message display mode can help keep the board on the screen" ) - await ctx.send(embed=embed) + await ctx.send(file=file, embed=embed) @staticmethod async def edit_embed_with_image(msg: discord.Message, embed: discord.Embed) -> discord.Message: diff --git a/bot/resources/evergreen/ducks_help_ex.png b/bot/resources/evergreen/ducks_help_ex.png new file mode 100644 index 00000000..01d9c243 Binary files /dev/null and b/bot/resources/evergreen/ducks_help_ex.png differ -- cgit v1.2.3