diff options
Diffstat (limited to 'bot/exts')
-rw-r--r-- | bot/exts/avatar_modification/__init__.py (renamed from bot/exts/christmas/__init__.py) | 0 | ||||
-rw-r--r-- | bot/exts/avatar_modification/_effects.py (renamed from bot/exts/evergreen/avatar_modification/_effects.py) | 4 | ||||
-rw-r--r-- | bot/exts/avatar_modification/avatar_modify.py (renamed from bot/exts/evergreen/avatar_modification/avatar_modify.py) | 6 | ||||
-rw-r--r-- | bot/exts/core/__init__.py (renamed from bot/exts/easter/__init__.py) | 0 | ||||
-rw-r--r-- | bot/exts/core/error_handler.py (renamed from bot/exts/evergreen/error_handler.py) | 0 | ||||
-rw-r--r-- | bot/exts/core/extensions.py (renamed from bot/exts/utils/extensions.py) | 0 | ||||
-rw-r--r-- | bot/exts/core/help.py (renamed from bot/exts/evergreen/help.py) | 0 | ||||
-rw-r--r-- | bot/exts/core/internal_eval/__init__.py (renamed from bot/exts/internal_eval/__init__.py) | 0 | ||||
-rw-r--r-- | bot/exts/core/internal_eval/_helpers.py (renamed from bot/exts/internal_eval/_helpers.py) | 0 | ||||
-rw-r--r-- | bot/exts/core/internal_eval/_internal_eval.py (renamed from bot/exts/internal_eval/_internal_eval.py) | 0 | ||||
-rw-r--r-- | bot/exts/core/ping.py (renamed from bot/exts/evergreen/ping.py) | 0 | ||||
-rw-r--r-- | bot/exts/core/source.py (renamed from bot/exts/evergreen/source.py) | 0 | ||||
-rw-r--r-- | bot/exts/events/advent_of_code/__init__.py (renamed from bot/exts/christmas/advent_of_code/__init__.py) | 0 | ||||
-rw-r--r-- | bot/exts/events/advent_of_code/_caches.py (renamed from bot/exts/christmas/advent_of_code/_caches.py) | 0 | ||||
-rw-r--r-- | bot/exts/events/advent_of_code/_cog.py (renamed from bot/exts/christmas/advent_of_code/_cog.py) | 4 | ||||
-rw-r--r-- | bot/exts/events/advent_of_code/_helpers.py (renamed from bot/exts/christmas/advent_of_code/_helpers.py) | 2 | ||||
-rw-r--r-- | bot/exts/events/hacktoberfest/__init__.py (renamed from bot/exts/evergreen/__init__.py) | 0 | ||||
-rw-r--r-- | bot/exts/events/hacktoberfest/hacktober-issue-finder.py (renamed from bot/exts/halloween/hacktober-issue-finder.py) | 0 | ||||
-rw-r--r-- | bot/exts/events/hacktoberfest/hacktoberstats.py (renamed from bot/exts/halloween/hacktoberstats.py) | 0 | ||||
-rw-r--r-- | bot/exts/events/hacktoberfest/timeleft.py (renamed from bot/exts/halloween/timeleft.py) | 0 | ||||
-rw-r--r-- | bot/exts/fun/__init__.py (renamed from bot/exts/evergreen/avatar_modification/__init__.py) | 0 | ||||
-rw-r--r-- | bot/exts/fun/battleship.py (renamed from bot/exts/evergreen/battleship.py) | 0 | ||||
-rw-r--r-- | bot/exts/fun/catify.py (renamed from bot/exts/evergreen/catify.py) | 0 | ||||
-rw-r--r-- | bot/exts/fun/coinflip.py (renamed from bot/exts/evergreen/coinflip.py) | 0 | ||||
-rw-r--r-- | bot/exts/fun/connect_four.py (renamed from bot/exts/evergreen/connect_four.py) | 0 | ||||
-rw-r--r-- | bot/exts/fun/duck_game.py (renamed from bot/exts/evergreen/duck_game.py) | 40 | ||||
-rw-r--r-- | bot/exts/fun/fun.py (renamed from bot/exts/evergreen/fun.py) | 2 | ||||
-rw-r--r-- | bot/exts/fun/game.py (renamed from bot/exts/evergreen/game.py) | 0 | ||||
-rw-r--r-- | bot/exts/fun/magic_8ball.py (renamed from bot/exts/evergreen/magic_8ball.py) | 2 | ||||
-rw-r--r-- | bot/exts/fun/minesweeper.py (renamed from bot/exts/evergreen/minesweeper.py) | 0 | ||||
-rw-r--r-- | bot/exts/fun/movie.py (renamed from bot/exts/evergreen/movie.py) | 0 | ||||
-rw-r--r-- | bot/exts/fun/recommend_game.py (renamed from bot/exts/evergreen/recommend_game.py) | 2 | ||||
-rw-r--r-- | bot/exts/fun/rps.py (renamed from bot/exts/evergreen/rps.py) | 0 | ||||
-rw-r--r-- | bot/exts/fun/snakes/__init__.py (renamed from bot/exts/evergreen/snakes/__init__.py) | 2 | ||||
-rw-r--r-- | bot/exts/fun/snakes/_converter.py (renamed from bot/exts/evergreen/snakes/_converter.py) | 2 | ||||
-rw-r--r-- | bot/exts/fun/snakes/_snakes_cog.py (renamed from bot/exts/evergreen/snakes/_snakes_cog.py) | 16 | ||||
-rw-r--r-- | bot/exts/fun/snakes/_utils.py (renamed from bot/exts/evergreen/snakes/_utils.py) | 2 | ||||
-rw-r--r-- | bot/exts/fun/space.py (renamed from bot/exts/evergreen/space.py) | 0 | ||||
-rw-r--r-- | bot/exts/fun/speedrun.py (renamed from bot/exts/evergreen/speedrun.py) | 2 | ||||
-rw-r--r-- | bot/exts/fun/status_codes.py (renamed from bot/exts/evergreen/status_codes.py) | 0 | ||||
-rw-r--r-- | bot/exts/fun/tic_tac_toe.py (renamed from bot/exts/evergreen/tic_tac_toe.py) | 0 | ||||
-rw-r--r-- | bot/exts/fun/trivia_quiz.py (renamed from bot/exts/evergreen/trivia_quiz.py) | 2 | ||||
-rw-r--r-- | bot/exts/fun/wonder_twins.py (renamed from bot/exts/evergreen/wonder_twins.py) | 2 | ||||
-rw-r--r-- | bot/exts/fun/xkcd.py (renamed from bot/exts/evergreen/xkcd.py) | 0 | ||||
-rw-r--r-- | bot/exts/holidays/__init__.py (renamed from bot/exts/halloween/__init__.py) | 0 | ||||
-rw-r--r-- | bot/exts/holidays/earth_day/__init__.py (renamed from bot/exts/pride/__init__.py) | 0 | ||||
-rw-r--r-- | bot/exts/holidays/earth_day/save_the_planet.py (renamed from bot/exts/easter/save_the_planet.py) | 2 | ||||
-rw-r--r-- | bot/exts/holidays/easter/__init__.py (renamed from bot/exts/utils/__init__.py) | 0 | ||||
-rw-r--r-- | bot/exts/holidays/easter/april_fools_vids.py (renamed from bot/exts/easter/april_fools_vids.py) | 2 | ||||
-rw-r--r-- | bot/exts/holidays/easter/bunny_name_generator.py (renamed from bot/exts/easter/bunny_name_generator.py) | 2 | ||||
-rw-r--r-- | bot/exts/holidays/easter/earth_photos.py (renamed from bot/exts/easter/earth_photos.py) | 0 | ||||
-rw-r--r-- | bot/exts/holidays/easter/easter_riddle.py (renamed from bot/exts/easter/easter_riddle.py) | 2 | ||||
-rw-r--r-- | bot/exts/holidays/easter/egg_decorating.py (renamed from bot/exts/easter/egg_decorating.py) | 6 | ||||
-rw-r--r-- | bot/exts/holidays/easter/egg_facts.py (renamed from bot/exts/easter/egg_facts.py) | 2 | ||||
-rw-r--r-- | bot/exts/holidays/easter/egghead_quiz.py (renamed from bot/exts/easter/egghead_quiz.py) | 2 | ||||
-rw-r--r-- | bot/exts/holidays/easter/traditions.py (renamed from bot/exts/easter/traditions.py) | 2 | ||||
-rw-r--r-- | bot/exts/holidays/halloween/8ball.py (renamed from bot/exts/halloween/8ball.py) | 2 | ||||
-rw-r--r-- | bot/exts/holidays/halloween/__init__.py (renamed from bot/exts/valentines/__init__.py) | 0 | ||||
-rw-r--r-- | bot/exts/holidays/halloween/candy_collection.py (renamed from bot/exts/halloween/candy_collection.py) | 0 | ||||
-rw-r--r-- | bot/exts/holidays/halloween/halloween_facts.py (renamed from bot/exts/halloween/halloween_facts.py) | 2 | ||||
-rw-r--r-- | bot/exts/holidays/halloween/halloweenify.py (renamed from bot/exts/halloween/halloweenify.py) | 2 | ||||
-rw-r--r-- | bot/exts/holidays/halloween/monsterbio.py (renamed from bot/exts/halloween/monsterbio.py) | 2 | ||||
-rw-r--r-- | bot/exts/holidays/halloween/monstersurvey.py (renamed from bot/exts/halloween/monstersurvey.py) | 2 | ||||
-rw-r--r-- | bot/exts/holidays/halloween/scarymovie.py (renamed from bot/exts/halloween/scarymovie.py) | 0 | ||||
-rw-r--r-- | bot/exts/holidays/halloween/spookygif.py (renamed from bot/exts/halloween/spookygif.py) | 0 | ||||
-rw-r--r-- | bot/exts/holidays/halloween/spookynamerate.py (renamed from bot/exts/halloween/spookynamerate.py) | 2 | ||||
-rw-r--r-- | bot/exts/holidays/halloween/spookyrating.py (renamed from bot/exts/halloween/spookyrating.py) | 4 | ||||
-rw-r--r-- | bot/exts/holidays/halloween/spookyreact.py (renamed from bot/exts/halloween/spookyreact.py) | 0 | ||||
-rw-r--r-- | bot/exts/holidays/hanukkah/__init__.py | 0 | ||||
-rw-r--r-- | bot/exts/holidays/hanukkah/hanukkah_embed.py (renamed from bot/exts/christmas/hanukkah_embed.py) | 0 | ||||
-rw-r--r-- | bot/exts/holidays/pride/__init__.py | 0 | ||||
-rw-r--r-- | bot/exts/holidays/pride/drag_queen_name.py (renamed from bot/exts/pride/drag_queen_name.py) | 2 | ||||
-rw-r--r-- | bot/exts/holidays/pride/pride_anthem.py (renamed from bot/exts/pride/pride_anthem.py) | 2 | ||||
-rw-r--r-- | bot/exts/holidays/pride/pride_facts.py (renamed from bot/exts/pride/pride_facts.py) | 2 | ||||
-rw-r--r-- | bot/exts/holidays/pride/pride_leader.py (renamed from bot/exts/pride/pride_leader.py) | 2 | ||||
-rw-r--r-- | bot/exts/holidays/valentines/__init__.py | 0 | ||||
-rw-r--r-- | bot/exts/holidays/valentines/be_my_valentine.py (renamed from bot/exts/valentines/be_my_valentine.py) | 2 | ||||
-rw-r--r-- | bot/exts/holidays/valentines/lovecalculator.py (renamed from bot/exts/valentines/lovecalculator.py) | 2 | ||||
-rw-r--r-- | bot/exts/holidays/valentines/movie_generator.py (renamed from bot/exts/valentines/movie_generator.py) | 0 | ||||
-rw-r--r-- | bot/exts/holidays/valentines/myvalenstate.py (renamed from bot/exts/valentines/myvalenstate.py) | 2 | ||||
-rw-r--r-- | bot/exts/holidays/valentines/pickuplines.py (renamed from bot/exts/valentines/pickuplines.py) | 2 | ||||
-rw-r--r-- | bot/exts/holidays/valentines/savethedate.py (renamed from bot/exts/valentines/savethedate.py) | 2 | ||||
-rw-r--r-- | bot/exts/holidays/valentines/valentine_zodiac.py (renamed from bot/exts/valentines/valentine_zodiac.py) | 4 | ||||
-rw-r--r-- | bot/exts/holidays/valentines/whoisvalentine.py (renamed from bot/exts/valentines/whoisvalentine.py) | 2 | ||||
-rw-r--r-- | bot/exts/utilities/__init__.py | 0 | ||||
-rw-r--r-- | bot/exts/utilities/bookmark.py (renamed from bot/exts/evergreen/bookmark.py) | 0 | ||||
-rw-r--r-- | bot/exts/utilities/cheatsheet.py (renamed from bot/exts/evergreen/cheatsheet.py) | 0 | ||||
-rw-r--r-- | bot/exts/utilities/conversationstarters.py (renamed from bot/exts/evergreen/conversationstarters.py) | 6 | ||||
-rw-r--r-- | bot/exts/utilities/emoji.py (renamed from bot/exts/evergreen/emoji.py) | 0 | ||||
-rw-r--r-- | bot/exts/utilities/githubinfo.py (renamed from bot/exts/evergreen/githubinfo.py) | 2 | ||||
-rw-r--r-- | bot/exts/utilities/issues.py (renamed from bot/exts/evergreen/issues.py) | 0 | ||||
-rw-r--r-- | bot/exts/utilities/latex.py (renamed from bot/exts/evergreen/latex.py) | 0 | ||||
-rw-r--r-- | bot/exts/utilities/pythonfacts.py (renamed from bot/exts/evergreen/pythonfacts.py) | 2 | ||||
-rw-r--r-- | bot/exts/utilities/realpython.py (renamed from bot/exts/evergreen/realpython.py) | 0 | ||||
-rw-r--r-- | bot/exts/utilities/reddit.py (renamed from bot/exts/evergreen/reddit.py) | 0 | ||||
-rw-r--r-- | bot/exts/utilities/stackoverflow.py (renamed from bot/exts/evergreen/stackoverflow.py) | 0 | ||||
-rw-r--r-- | bot/exts/utilities/timed.py (renamed from bot/exts/evergreen/timed.py) | 0 | ||||
-rw-r--r-- | bot/exts/utilities/wikipedia.py (renamed from bot/exts/evergreen/wikipedia.py) | 0 | ||||
-rw-r--r-- | bot/exts/utilities/wolfram.py (renamed from bot/exts/evergreen/wolfram.py) | 0 |
99 files changed, 71 insertions, 89 deletions
diff --git a/bot/exts/christmas/__init__.py b/bot/exts/avatar_modification/__init__.py index e69de29b..e69de29b 100644 --- a/bot/exts/christmas/__init__.py +++ b/bot/exts/avatar_modification/__init__.py diff --git a/bot/exts/evergreen/avatar_modification/_effects.py b/bot/exts/avatar_modification/_effects.py index df741973..f1c2e6d1 100644 --- a/bot/exts/evergreen/avatar_modification/_effects.py +++ b/bot/exts/avatar_modification/_effects.py @@ -77,7 +77,7 @@ class PfpEffects: """Applies the given pride effect to the given image.""" image = PfpEffects.crop_avatar_circle(image) - ring = Image.open(Path(f"bot/resources/pride/flags/{flag}.png")).resize((1024, 1024)) + ring = Image.open(Path(f"bot/resources/holidays/pride/flags/{flag}.png")).resize((1024, 1024)) ring = ring.convert("RGBA") ring = PfpEffects.crop_ring(ring, pixels) @@ -125,7 +125,7 @@ class PfpEffects: )) overlay_image = overlay_image.convert("RGBA") else: - overlay_image = Image.open(Path("bot/resources/easter/chocolate_bunny.png")) + overlay_image = Image.open(Path("bot/resources/holidays/easter/chocolate_bunny.png")) alpha = image.getchannel("A").getdata() image = image.convert("RGB") diff --git a/bot/exts/evergreen/avatar_modification/avatar_modify.py b/bot/exts/avatar_modification/avatar_modify.py index 18202902..87eb05e6 100644 --- a/bot/exts/evergreen/avatar_modification/avatar_modify.py +++ b/bot/exts/avatar_modification/avatar_modify.py @@ -13,7 +13,7 @@ from discord.ext import commands from bot.bot import Bot from bot.constants import Colours, Emojis -from bot.exts.evergreen.avatar_modification._effects import PfpEffects +from bot.exts.avatar_modification._effects import PfpEffects from bot.utils.extensions import invoke_help_command from bot.utils.halloween import spookifications @@ -27,7 +27,7 @@ MAX_SQUARES = 10_000 T = TypeVar("T") -GENDER_OPTIONS = json.loads(Path("bot/resources/pride/gender_options.json").read_text("utf8")) +GENDER_OPTIONS = json.loads(Path("bot/resources/holidays/pride/gender_options.json").read_text("utf8")) async def in_executor(func: Callable[..., T], *args) -> T: @@ -239,7 +239,7 @@ class AvatarModify(commands.Cog): description=f"Here is your lovely avatar, surrounded by\n a beautiful {option} flag. Enjoy :D" ) embed.set_image(url=f"attachment://{file_name}") - embed.set_footer(text=f"Made by {ctx.author.display_name}.", icon_url=ctx.author.avatar_url) + embed.set_footer(text=f"Made by {ctx.author.display_name}.", icon_url=ctx.author.avatar.url) await ctx.send(file=file, embed=embed) @avatar_modify.group( diff --git a/bot/exts/easter/__init__.py b/bot/exts/core/__init__.py index e69de29b..e69de29b 100644 --- a/bot/exts/easter/__init__.py +++ b/bot/exts/core/__init__.py diff --git a/bot/exts/evergreen/error_handler.py b/bot/exts/core/error_handler.py index fd2123e7..fd2123e7 100644 --- a/bot/exts/evergreen/error_handler.py +++ b/bot/exts/core/error_handler.py diff --git a/bot/exts/utils/extensions.py b/bot/exts/core/extensions.py index 424bacac..424bacac 100644 --- a/bot/exts/utils/extensions.py +++ b/bot/exts/core/extensions.py diff --git a/bot/exts/evergreen/help.py b/bot/exts/core/help.py index 4b766b50..4b766b50 100644 --- a/bot/exts/evergreen/help.py +++ b/bot/exts/core/help.py diff --git a/bot/exts/internal_eval/__init__.py b/bot/exts/core/internal_eval/__init__.py index 695fa74d..695fa74d 100644 --- a/bot/exts/internal_eval/__init__.py +++ b/bot/exts/core/internal_eval/__init__.py diff --git a/bot/exts/internal_eval/_helpers.py b/bot/exts/core/internal_eval/_helpers.py index 5b2f8f5d..5b2f8f5d 100644 --- a/bot/exts/internal_eval/_helpers.py +++ b/bot/exts/core/internal_eval/_helpers.py diff --git a/bot/exts/internal_eval/_internal_eval.py b/bot/exts/core/internal_eval/_internal_eval.py index 4f6b4321..4f6b4321 100644 --- a/bot/exts/internal_eval/_internal_eval.py +++ b/bot/exts/core/internal_eval/_internal_eval.py diff --git a/bot/exts/evergreen/ping.py b/bot/exts/core/ping.py index 6be78117..6be78117 100644 --- a/bot/exts/evergreen/ping.py +++ b/bot/exts/core/ping.py diff --git a/bot/exts/evergreen/source.py b/bot/exts/core/source.py index 7572ce51..7572ce51 100644 --- a/bot/exts/evergreen/source.py +++ b/bot/exts/core/source.py diff --git a/bot/exts/christmas/advent_of_code/__init__.py b/bot/exts/events/advent_of_code/__init__.py index 3c521168..3c521168 100644 --- a/bot/exts/christmas/advent_of_code/__init__.py +++ b/bot/exts/events/advent_of_code/__init__.py diff --git a/bot/exts/christmas/advent_of_code/_caches.py b/bot/exts/events/advent_of_code/_caches.py index 32d5394f..32d5394f 100644 --- a/bot/exts/christmas/advent_of_code/_caches.py +++ b/bot/exts/events/advent_of_code/_caches.py diff --git a/bot/exts/christmas/advent_of_code/_cog.py b/bot/exts/events/advent_of_code/_cog.py index bc2ccc04..ca60e517 100644 --- a/bot/exts/christmas/advent_of_code/_cog.py +++ b/bot/exts/events/advent_of_code/_cog.py @@ -11,7 +11,7 @@ from bot.bot import Bot from bot.constants import ( AdventOfCode as AocConfig, Channels, Colours, Emojis, Month, Roles, WHITELISTED_CHANNELS, ) -from bot.exts.christmas.advent_of_code import _helpers +from bot.exts.events.advent_of_code import _helpers from bot.utils.decorators import InChannelCheckFailure, in_month, whitelist_override, with_role from bot.utils.extensions import invoke_help_command @@ -35,7 +35,7 @@ class AdventOfCode(commands.Cog): self._base_url = f"https://adventofcode.com/{AocConfig.year}" self.global_leaderboard_url = f"https://adventofcode.com/{AocConfig.year}/leaderboard" - self.about_aoc_filepath = Path("./bot/resources/advent_of_code/about.json") + self.about_aoc_filepath = Path("./bot/resources/events/advent_of_code/about.json") self.cached_about_aoc = self._build_about_embed() notification_coro = _helpers.new_puzzle_notification(self.bot) diff --git a/bot/exts/christmas/advent_of_code/_helpers.py b/bot/exts/events/advent_of_code/_helpers.py index b64b44a6..43aa5a7e 100644 --- a/bot/exts/christmas/advent_of_code/_helpers.py +++ b/bot/exts/events/advent_of_code/_helpers.py @@ -13,7 +13,7 @@ import discord from bot.bot import Bot from bot.constants import AdventOfCode, Channels, Colours -from bot.exts.christmas.advent_of_code import _caches +from bot.exts.advent_of_code import _caches log = logging.getLogger(__name__) diff --git a/bot/exts/evergreen/__init__.py b/bot/exts/events/hacktoberfest/__init__.py index e69de29b..e69de29b 100644 --- a/bot/exts/evergreen/__init__.py +++ b/bot/exts/events/hacktoberfest/__init__.py diff --git a/bot/exts/halloween/hacktober-issue-finder.py b/bot/exts/events/hacktoberfest/hacktober-issue-finder.py index e3053851..e3053851 100644 --- a/bot/exts/halloween/hacktober-issue-finder.py +++ b/bot/exts/events/hacktoberfest/hacktober-issue-finder.py diff --git a/bot/exts/halloween/hacktoberstats.py b/bot/exts/events/hacktoberfest/hacktoberstats.py index 72067dbe..72067dbe 100644 --- a/bot/exts/halloween/hacktoberstats.py +++ b/bot/exts/events/hacktoberfest/hacktoberstats.py diff --git a/bot/exts/halloween/timeleft.py b/bot/exts/events/hacktoberfest/timeleft.py index 55109599..55109599 100644 --- a/bot/exts/halloween/timeleft.py +++ b/bot/exts/events/hacktoberfest/timeleft.py diff --git a/bot/exts/evergreen/avatar_modification/__init__.py b/bot/exts/fun/__init__.py index e69de29b..e69de29b 100644 --- a/bot/exts/evergreen/avatar_modification/__init__.py +++ b/bot/exts/fun/__init__.py diff --git a/bot/exts/evergreen/battleship.py b/bot/exts/fun/battleship.py index f4351954..f4351954 100644 --- a/bot/exts/evergreen/battleship.py +++ b/bot/exts/fun/battleship.py diff --git a/bot/exts/evergreen/catify.py b/bot/exts/fun/catify.py index 32dfae09..32dfae09 100644 --- a/bot/exts/evergreen/catify.py +++ b/bot/exts/fun/catify.py diff --git a/bot/exts/evergreen/coinflip.py b/bot/exts/fun/coinflip.py index 804306bd..804306bd 100644 --- a/bot/exts/evergreen/coinflip.py +++ b/bot/exts/fun/coinflip.py diff --git a/bot/exts/evergreen/connect_four.py b/bot/exts/fun/connect_four.py index 647bb2b7..647bb2b7 100644 --- a/bot/exts/evergreen/connect_four.py +++ b/bot/exts/fun/connect_four.py diff --git a/bot/exts/evergreen/duck_game.py b/bot/exts/fun/duck_game.py index d592f3df..1ef7513f 100644 --- a/bot/exts/evergreen/duck_game.py +++ b/bot/exts/fun/duck_game.py @@ -5,7 +5,6 @@ from collections import defaultdict from io import BytesIO from itertools import product from pathlib import Path -from urllib.parse import urlparse import discord from PIL import Image, ImageDraw, ImageFont @@ -15,7 +14,6 @@ from bot.bot import Bot from bot.constants import Colours, MODERATION_ROLES from bot.utils.decorators import with_role - DECK = list(product(*[(0, 1, 2)]*4)) GAME_DURATION = 180 @@ -33,9 +31,9 @@ INCORRECT_GOOSE = -1 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") +IMAGE_PATH = Path("bot", "resources", "fun", "all_cards.png") +FONT_PATH = Path("bot", "resources", "fun", "LuckiestGuy-Regular.ttf") +HELP_IMAGE_PATH = Path("bot", "resources", "fun", "ducks_help_ex.png") ALL_CARDS = Image.open(IMAGE_PATH) LABEL_FONT = ImageFont.truetype(str(FONT_PATH), size=16) @@ -193,6 +191,7 @@ class DuckGamesDirector(commands.Cog): game.running = True self.current_games[ctx.channel.id] = game + game.msg_content = "" game.embed_msg = await self.send_board_embed(ctx, game) await asyncio.sleep(GAME_DURATION) @@ -261,7 +260,6 @@ class DuckGamesDirector(commands.Cog): 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) @@ -269,12 +267,11 @@ class DuckGamesDirector(commands.Cog): async def display_claimed_answer(self, game: DuckGame, author: discord.Member, answer: tuple[int]) -> None: """Add a claimed answer to the game embed.""" async with game.editing_embed: - game_embed, = game.embed_msg.embeds - old_footer = game_embed.footer.text - if old_footer == discord.Embed.Empty: - old_footer = "" - game_embed.set_footer(text=f"{old_footer}\n{str(answer):12s} - {author.display_name}") - await self.edit_embed_with_image(game.embed_msg, game_embed) + # We specifically edit the message contents instead of the embed + # Because we load in the image from the file, editing any portion of the embed + # Does weird things to the image and this works around that weirdness + game.msg_content = f"{game.msg_content}\n{str(answer):12s} - {author.display_name}" + await game.embed_msg.edit(content=game.msg_content) async def end_game(self, channel: discord.TextChannel, game: DuckGame, end_message: str) -> None: """Edit the game embed to reflect the end of the game and mark the game as not running.""" @@ -300,17 +297,7 @@ class DuckGamesDirector(commands.Cog): else: missed_text = "All the flights were found!" - game_embed, = game.embed_msg.embeds - old_footer = game_embed.footer.text - if old_footer == discord.Embed.Empty: - old_footer = "" - embed_as_dict = game_embed.to_dict() # Cannot set embed color after initialization - embed_as_dict["color"] = discord.Color.red().value - game_embed = discord.Embed.from_dict(embed_as_dict) - game_embed.set_footer( - text=f"{old_footer.rstrip()}\n\n{missed_text}" - ) - await self.edit_embed_with_image(game.embed_msg, game_embed) + await game.embed_msg.edit(content=f"{missed_text}") @start_game.command(name="help") async def show_rules(self, ctx: commands.Context) -> None: @@ -343,13 +330,6 @@ class DuckGamesDirector(commands.Cog): ) return await ctx.send(file=file, embed=embed) - @staticmethod - async def edit_embed_with_image(msg: discord.Message, embed: discord.Embed) -> None: - """Edit an embed without the attached image going wonky.""" - attach_name = urlparse(embed.image.url).path.split("/")[-1] - embed.set_image(url=f"attachment://{attach_name}") - await msg.edit(embed=embed) - def setup(bot: Bot) -> None: """Load the DuckGamesDirector cog.""" diff --git a/bot/exts/evergreen/fun.py b/bot/exts/fun/fun.py index 4bbfe859..b148f1f3 100644 --- a/bot/exts/evergreen/fun.py +++ b/bot/exts/fun/fun.py @@ -57,7 +57,7 @@ class Fun(Cog): def __init__(self, bot: Bot): self.bot = bot - self._caesar_cipher_embed = json.loads(Path("bot/resources/evergreen/caesar_info.json").read_text("UTF-8")) + self._caesar_cipher_embed = json.loads(Path("bot/resources/fun/caesar_info.json").read_text("UTF-8")) @staticmethod def _get_random_die() -> str: diff --git a/bot/exts/evergreen/game.py b/bot/exts/fun/game.py index f9c150e6..f9c150e6 100644 --- a/bot/exts/evergreen/game.py +++ b/bot/exts/fun/game.py diff --git a/bot/exts/evergreen/magic_8ball.py b/bot/exts/fun/magic_8ball.py index 28ddcea0..a7b682ca 100644 --- a/bot/exts/evergreen/magic_8ball.py +++ b/bot/exts/fun/magic_8ball.py @@ -9,7 +9,7 @@ from bot.bot import Bot log = logging.getLogger(__name__) -ANSWERS = json.loads(Path("bot/resources/evergreen/magic8ball.json").read_text("utf8")) +ANSWERS = json.loads(Path("bot/resources/fun/magic8ball.json").read_text("utf8")) class Magic8ball(commands.Cog): diff --git a/bot/exts/evergreen/minesweeper.py b/bot/exts/fun/minesweeper.py index a48b5051..a48b5051 100644 --- a/bot/exts/evergreen/minesweeper.py +++ b/bot/exts/fun/minesweeper.py diff --git a/bot/exts/evergreen/movie.py b/bot/exts/fun/movie.py index a04eeb41..a04eeb41 100644 --- a/bot/exts/evergreen/movie.py +++ b/bot/exts/fun/movie.py diff --git a/bot/exts/evergreen/recommend_game.py b/bot/exts/fun/recommend_game.py index bdd3acb1..42c9f7c2 100644 --- a/bot/exts/evergreen/recommend_game.py +++ b/bot/exts/fun/recommend_game.py @@ -12,7 +12,7 @@ log = logging.getLogger(__name__) game_recs = [] # Populate the list `game_recs` with resource files -for rec_path in Path("bot/resources/evergreen/game_recs").glob("*.json"): +for rec_path in Path("bot/resources/fun/game_recs").glob("*.json"): data = json.loads(rec_path.read_text("utf8")) game_recs.append(data) shuffle(game_recs) diff --git a/bot/exts/evergreen/rps.py b/bot/exts/fun/rps.py index c6bbff46..c6bbff46 100644 --- a/bot/exts/evergreen/rps.py +++ b/bot/exts/fun/rps.py diff --git a/bot/exts/evergreen/snakes/__init__.py b/bot/exts/fun/snakes/__init__.py index 7740429b..ba8333fd 100644 --- a/bot/exts/evergreen/snakes/__init__.py +++ b/bot/exts/fun/snakes/__init__.py @@ -1,7 +1,7 @@ import logging from bot.bot import Bot -from bot.exts.evergreen.snakes._snakes_cog import Snakes +from bot.exts.fun.snakes._snakes_cog import Snakes log = logging.getLogger(__name__) diff --git a/bot/exts/evergreen/snakes/_converter.py b/bot/exts/fun/snakes/_converter.py index 765b983d..c24ba8c6 100644 --- a/bot/exts/evergreen/snakes/_converter.py +++ b/bot/exts/fun/snakes/_converter.py @@ -7,7 +7,7 @@ import discord from discord.ext.commands import Context, Converter from rapidfuzz import fuzz -from bot.exts.evergreen.snakes._utils import SNAKE_RESOURCES +from bot.exts.fun.snakes._utils import SNAKE_RESOURCES from bot.utils import disambiguate log = logging.getLogger(__name__) diff --git a/bot/exts/evergreen/snakes/_snakes_cog.py b/bot/exts/fun/snakes/_snakes_cog.py index 04804222..59e57199 100644 --- a/bot/exts/evergreen/snakes/_snakes_cog.py +++ b/bot/exts/fun/snakes/_snakes_cog.py @@ -19,8 +19,8 @@ from discord.ext.commands import Cog, CommandError, Context, bot_has_permissions from bot.bot import Bot from bot.constants import ERROR_REPLIES, Tokens -from bot.exts.evergreen.snakes import _utils as utils -from bot.exts.evergreen.snakes._converter import Snake +from bot.exts.fun.snakes import _utils as utils +from bot.exts.fun.snakes._converter import Snake from bot.utils.decorators import locked from bot.utils.extensions import invoke_help_command @@ -122,14 +122,14 @@ CORRECT_GUESS = ( # snake card consts CARD = { - "top": Image.open("bot/resources/snakes/snake_cards/card_top.png"), - "frame": Image.open("bot/resources/snakes/snake_cards/card_frame.png"), - "bottom": Image.open("bot/resources/snakes/snake_cards/card_bottom.png"), + "top": Image.open("bot/resources/fun/snakes/snake_cards/card_top.png"), + "frame": Image.open("bot/resources/fun/snakes/snake_cards/card_frame.png"), + "bottom": Image.open("bot/resources/fun/snakes/snake_cards/card_bottom.png"), "backs": [ - Image.open(f"bot/resources/snakes/snake_cards/backs/{file}") - for file in os.listdir("bot/resources/snakes/snake_cards/backs") + Image.open(f"bot/resources/fun/snakes/snake_cards/backs/{file}") + for file in os.listdir("bot/resources/fun/snakes/snake_cards/backs") ], - "font": ImageFont.truetype("bot/resources/snakes/snake_cards/expressway.ttf", 20) + "font": ImageFont.truetype("bot/resources/fun/snakes/snake_cards/expressway.ttf", 20) } # endregion diff --git a/bot/exts/evergreen/snakes/_utils.py b/bot/exts/fun/snakes/_utils.py index b5f13c53..de51339d 100644 --- a/bot/exts/evergreen/snakes/_utils.py +++ b/bot/exts/fun/snakes/_utils.py @@ -14,7 +14,7 @@ from discord.ext.commands import Cog, Context from bot.constants import Roles -SNAKE_RESOURCES = Path("bot/resources/snakes").absolute() +SNAKE_RESOURCES = Path("bot/resources/fun/snakes").absolute() h1 = r"""``` ---- diff --git a/bot/exts/evergreen/space.py b/bot/exts/fun/space.py index 48ad0f96..48ad0f96 100644 --- a/bot/exts/evergreen/space.py +++ b/bot/exts/fun/space.py diff --git a/bot/exts/evergreen/speedrun.py b/bot/exts/fun/speedrun.py index 774eff81..c2966ce1 100644 --- a/bot/exts/evergreen/speedrun.py +++ b/bot/exts/fun/speedrun.py @@ -9,7 +9,7 @@ from bot.bot import Bot log = logging.getLogger(__name__) -LINKS = json.loads(Path("bot/resources/evergreen/speedrun_links.json").read_text("utf8")) +LINKS = json.loads(Path("bot/resources/fun/speedrun_links.json").read_text("utf8")) class Speedrun(commands.Cog): diff --git a/bot/exts/evergreen/status_codes.py b/bot/exts/fun/status_codes.py index 501cbe0a..501cbe0a 100644 --- a/bot/exts/evergreen/status_codes.py +++ b/bot/exts/fun/status_codes.py diff --git a/bot/exts/evergreen/tic_tac_toe.py b/bot/exts/fun/tic_tac_toe.py index 5c4f8051..5c4f8051 100644 --- a/bot/exts/evergreen/tic_tac_toe.py +++ b/bot/exts/fun/tic_tac_toe.py diff --git a/bot/exts/evergreen/trivia_quiz.py b/bot/exts/fun/trivia_quiz.py index aa4020d6..cf9e6cd3 100644 --- a/bot/exts/evergreen/trivia_quiz.py +++ b/bot/exts/fun/trivia_quiz.py @@ -217,7 +217,7 @@ class TriviaQuiz(commands.Cog): @staticmethod def load_questions() -> dict: """Load the questions from the JSON file.""" - p = Path("bot", "resources", "evergreen", "trivia_quiz.json") + p = Path("bot", "resources", "fun", "trivia_quiz.json") return json.loads(p.read_text(encoding="utf-8")) diff --git a/bot/exts/evergreen/wonder_twins.py b/bot/exts/fun/wonder_twins.py index 40edf785..79d6b6d9 100644 --- a/bot/exts/evergreen/wonder_twins.py +++ b/bot/exts/fun/wonder_twins.py @@ -11,7 +11,7 @@ class WonderTwins(Cog): """Cog for a Wonder Twins inspired command.""" def __init__(self): - with open(Path.cwd() / "bot" / "resources" / "evergreen" / "wonder_twins.yaml", "r", encoding="utf-8") as f: + with open(Path.cwd() / "bot" / "resources" / "fun" / "wonder_twins.yaml", "r", encoding="utf-8") as f: info = yaml.load(f, Loader=yaml.FullLoader) self.water_types = info["water_types"] self.objects = info["objects"] diff --git a/bot/exts/evergreen/xkcd.py b/bot/exts/fun/xkcd.py index b56c53d9..b56c53d9 100644 --- a/bot/exts/evergreen/xkcd.py +++ b/bot/exts/fun/xkcd.py diff --git a/bot/exts/halloween/__init__.py b/bot/exts/holidays/__init__.py index e69de29b..e69de29b 100644 --- a/bot/exts/halloween/__init__.py +++ b/bot/exts/holidays/__init__.py diff --git a/bot/exts/pride/__init__.py b/bot/exts/holidays/earth_day/__init__.py index e69de29b..e69de29b 100644 --- a/bot/exts/pride/__init__.py +++ b/bot/exts/holidays/earth_day/__init__.py diff --git a/bot/exts/easter/save_the_planet.py b/bot/exts/holidays/earth_day/save_the_planet.py index 1bd515f2..13c84886 100644 --- a/bot/exts/easter/save_the_planet.py +++ b/bot/exts/holidays/earth_day/save_the_planet.py @@ -7,7 +7,7 @@ from discord.ext import commands from bot.bot import Bot from bot.utils.randomization import RandomCycle -EMBED_DATA = RandomCycle(json.loads(Path("bot/resources/easter/save_the_planet.json").read_text("utf8"))) +EMBED_DATA = RandomCycle(json.loads(Path("bot/resources/holidays/earth_day/save_the_planet.json").read_text("utf8"))) class SaveThePlanet(commands.Cog): diff --git a/bot/exts/utils/__init__.py b/bot/exts/holidays/easter/__init__.py index e69de29b..e69de29b 100644 --- a/bot/exts/utils/__init__.py +++ b/bot/exts/holidays/easter/__init__.py diff --git a/bot/exts/easter/april_fools_vids.py b/bot/exts/holidays/easter/april_fools_vids.py index 5ef40704..ae22f751 100644 --- a/bot/exts/easter/april_fools_vids.py +++ b/bot/exts/holidays/easter/april_fools_vids.py @@ -9,7 +9,7 @@ from bot.bot import Bot log = logging.getLogger(__name__) -ALL_VIDS = loads(Path("bot/resources/easter/april_fools_vids.json").read_text("utf-8")) +ALL_VIDS = loads(Path("bot/resources/holidays/easter/april_fools_vids.json").read_text("utf-8")) class AprilFoolVideos(commands.Cog): diff --git a/bot/exts/easter/bunny_name_generator.py b/bot/exts/holidays/easter/bunny_name_generator.py index 4c3137de..f767f7c5 100644 --- a/bot/exts/easter/bunny_name_generator.py +++ b/bot/exts/holidays/easter/bunny_name_generator.py @@ -11,7 +11,7 @@ from bot.bot import Bot log = logging.getLogger(__name__) -BUNNY_NAMES = json.loads(Path("bot/resources/easter/bunny_names.json").read_text("utf8")) +BUNNY_NAMES = json.loads(Path("bot/resources/holidays/easter/bunny_names.json").read_text("utf8")) class BunnyNameGenerator(commands.Cog): diff --git a/bot/exts/easter/earth_photos.py b/bot/exts/holidays/easter/earth_photos.py index f65790af..f65790af 100644 --- a/bot/exts/easter/earth_photos.py +++ b/bot/exts/holidays/easter/earth_photos.py diff --git a/bot/exts/easter/easter_riddle.py b/bot/exts/holidays/easter/easter_riddle.py index 88b3be2f..c9b7fc53 100644 --- a/bot/exts/easter/easter_riddle.py +++ b/bot/exts/holidays/easter/easter_riddle.py @@ -12,7 +12,7 @@ from bot.constants import Colours, NEGATIVE_REPLIES log = logging.getLogger(__name__) -RIDDLE_QUESTIONS = loads(Path("bot/resources/easter/easter_riddle.json").read_text("utf8")) +RIDDLE_QUESTIONS = loads(Path("bot/resources/holidays/easter/easter_riddle.json").read_text("utf8")) TIMELIMIT = 10 diff --git a/bot/exts/easter/egg_decorating.py b/bot/exts/holidays/easter/egg_decorating.py index fb5701c4..1db9b347 100644 --- a/bot/exts/easter/egg_decorating.py +++ b/bot/exts/holidays/easter/egg_decorating.py @@ -15,9 +15,9 @@ from bot.utils import helpers log = logging.getLogger(__name__) -HTML_COLOURS = json.loads(Path("bot/resources/evergreen/html_colours.json").read_text("utf8")) +HTML_COLOURS = json.loads(Path("bot/resources/fun/html_colours.json").read_text("utf8")) -XKCD_COLOURS = json.loads(Path("bot/resources/evergreen/xkcd_colours.json").read_text("utf8")) +XKCD_COLOURS = json.loads(Path("bot/resources/fun/xkcd_colours.json").read_text("utf8")) COLOURS = [ (255, 0, 0, 255), (255, 128, 0, 255), (255, 255, 0, 255), (0, 255, 0, 255), @@ -80,7 +80,7 @@ class EggDecorating(commands.Cog): q, r = divmod(8, colours_n) colours = colours * q + colours[:r] num = random.randint(1, 6) - im = Image.open(Path(f"bot/resources/easter/easter_eggs/design{num}.png")) + im = Image.open(Path(f"bot/resources/holidays/easter/easter_eggs/design{num}.png")) data = list(im.getdata()) replaceable = {x for x in data if x not in IRREPLACEABLE} diff --git a/bot/exts/easter/egg_facts.py b/bot/exts/holidays/easter/egg_facts.py index 486e735f..5f216e0d 100644 --- a/bot/exts/easter/egg_facts.py +++ b/bot/exts/holidays/easter/egg_facts.py @@ -12,7 +12,7 @@ from bot.utils.decorators import seasonal_task log = logging.getLogger(__name__) -EGG_FACTS = loads(Path("bot/resources/easter/easter_egg_facts.json").read_text("utf8")) +EGG_FACTS = loads(Path("bot/resources/holidays/easter/easter_egg_facts.json").read_text("utf8")) class EasterFacts(commands.Cog): diff --git a/bot/exts/easter/egghead_quiz.py b/bot/exts/holidays/easter/egghead_quiz.py index ad550567..06229537 100644 --- a/bot/exts/easter/egghead_quiz.py +++ b/bot/exts/holidays/easter/egghead_quiz.py @@ -13,7 +13,7 @@ from bot.constants import Colours log = logging.getLogger(__name__) -EGGHEAD_QUESTIONS = loads(Path("bot/resources/easter/egghead_questions.json").read_text("utf8")) +EGGHEAD_QUESTIONS = loads(Path("bot/resources/holidays/easter/egghead_questions.json").read_text("utf8")) EMOJIS = [ diff --git a/bot/exts/easter/traditions.py b/bot/exts/holidays/easter/traditions.py index 93404f3e..f54ab5c4 100644 --- a/bot/exts/easter/traditions.py +++ b/bot/exts/holidays/easter/traditions.py @@ -9,7 +9,7 @@ from bot.bot import Bot log = logging.getLogger(__name__) -traditions = json.loads(Path("bot/resources/easter/traditions.json").read_text("utf8")) +traditions = json.loads(Path("bot/resources/holidays/easter/traditions.json").read_text("utf8")) class Traditions(commands.Cog): diff --git a/bot/exts/halloween/8ball.py b/bot/exts/holidays/halloween/8ball.py index a2431190..4fec8463 100644 --- a/bot/exts/halloween/8ball.py +++ b/bot/exts/holidays/halloween/8ball.py @@ -10,7 +10,7 @@ from bot.bot import Bot log = logging.getLogger(__name__) -RESPONSES = json.loads(Path("bot/resources/halloween/responses.json").read_text("utf8")) +RESPONSES = json.loads(Path("bot/resources/holidays/halloween/responses.json").read_text("utf8")) class SpookyEightBall(commands.Cog): diff --git a/bot/exts/valentines/__init__.py b/bot/exts/holidays/halloween/__init__.py index e69de29b..e69de29b 100644 --- a/bot/exts/valentines/__init__.py +++ b/bot/exts/holidays/halloween/__init__.py diff --git a/bot/exts/halloween/candy_collection.py b/bot/exts/holidays/halloween/candy_collection.py index 4afd5913..4afd5913 100644 --- a/bot/exts/halloween/candy_collection.py +++ b/bot/exts/holidays/halloween/candy_collection.py diff --git a/bot/exts/halloween/halloween_facts.py b/bot/exts/holidays/halloween/halloween_facts.py index ba3b5d17..adde2310 100644 --- a/bot/exts/halloween/halloween_facts.py +++ b/bot/exts/holidays/halloween/halloween_facts.py @@ -24,7 +24,7 @@ SPOOKY_EMOJIS = [ PUMPKIN_ORANGE = 0xFF7518 INTERVAL = timedelta(hours=6).total_seconds() -FACTS = json.loads(Path("bot/resources/halloween/halloween_facts.json").read_text("utf8")) +FACTS = json.loads(Path("bot/resources/holidays/halloween/halloween_facts.json").read_text("utf8")) FACTS = list(enumerate(FACTS)) diff --git a/bot/exts/halloween/halloweenify.py b/bot/exts/holidays/halloween/halloweenify.py index 83cfbaa7..03b52589 100644 --- a/bot/exts/halloween/halloweenify.py +++ b/bot/exts/holidays/halloween/halloweenify.py @@ -12,7 +12,7 @@ from bot.bot import Bot log = logging.getLogger(__name__) -HALLOWEENIFY_DATA = loads(Path("bot/resources/halloween/halloweenify.json").read_text("utf8")) +HALLOWEENIFY_DATA = loads(Path("bot/resources/holidays/halloween/halloweenify.json").read_text("utf8")) class Halloweenify(commands.Cog): diff --git a/bot/exts/halloween/monsterbio.py b/bot/exts/holidays/halloween/monsterbio.py index 69e898cb..0556a193 100644 --- a/bot/exts/halloween/monsterbio.py +++ b/bot/exts/holidays/halloween/monsterbio.py @@ -12,7 +12,7 @@ from bot.constants import Colours log = logging.getLogger(__name__) TEXT_OPTIONS = json.loads( - Path("bot/resources/halloween/monster.json").read_text("utf8") + Path("bot/resources/holidays/halloween/monster.json").read_text("utf8") ) # Data for a mad-lib style generation of text diff --git a/bot/exts/halloween/monstersurvey.py b/bot/exts/holidays/halloween/monstersurvey.py index 96cda11e..f3433886 100644 --- a/bot/exts/halloween/monstersurvey.py +++ b/bot/exts/holidays/halloween/monstersurvey.py @@ -25,7 +25,7 @@ class MonsterSurvey(Cog): def __init__(self): """Initializes values for the bot to use within the voting commands.""" - self.registry_path = pathlib.Path("bot", "resources", "halloween", "monstersurvey.json") + self.registry_path = pathlib.Path("bot", "resources", "holidays", "halloween", "monstersurvey.json") self.voter_registry = json.loads(self.registry_path.read_text("utf8")) def json_write(self) -> None: diff --git a/bot/exts/halloween/scarymovie.py b/bot/exts/holidays/halloween/scarymovie.py index 33659fd8..33659fd8 100644 --- a/bot/exts/halloween/scarymovie.py +++ b/bot/exts/holidays/halloween/scarymovie.py diff --git a/bot/exts/halloween/spookygif.py b/bot/exts/holidays/halloween/spookygif.py index 9511d407..9511d407 100644 --- a/bot/exts/halloween/spookygif.py +++ b/bot/exts/holidays/halloween/spookygif.py diff --git a/bot/exts/halloween/spookynamerate.py b/bot/exts/holidays/halloween/spookynamerate.py index 5c21ead7..2e59d4a8 100644 --- a/bot/exts/halloween/spookynamerate.py +++ b/bot/exts/holidays/halloween/spookynamerate.py @@ -66,7 +66,7 @@ HELP_MESSAGE_DICT = { } # The names are from https://www.mockaroo.com/ -NAMES = json.loads(Path("bot/resources/halloween/spookynamerate_names.json").read_text("utf8")) +NAMES = json.loads(Path("bot/resources/holidays/halloween/spookynamerate_names.json").read_text("utf8")) FIRST_NAMES = NAMES["first_names"] LAST_NAMES = NAMES["last_names"] diff --git a/bot/exts/halloween/spookyrating.py b/bot/exts/holidays/halloween/spookyrating.py index f566fac2..ec6e8821 100644 --- a/bot/exts/halloween/spookyrating.py +++ b/bot/exts/holidays/halloween/spookyrating.py @@ -12,7 +12,9 @@ from bot.constants import Colours log = logging.getLogger(__name__) -data: dict[str, dict[str, str]] = json.loads(Path("bot/resources/halloween/spooky_rating.json").read_text("utf8")) +data: dict[str, dict[str, str]] = json.loads( + Path("bot/resources/holidays/halloween/spooky_rating.json").read_text("utf8") +) SPOOKY_DATA = sorted((int(key), value) for key, value in data.items()) diff --git a/bot/exts/halloween/spookyreact.py b/bot/exts/holidays/halloween/spookyreact.py index 25e783f4..25e783f4 100644 --- a/bot/exts/halloween/spookyreact.py +++ b/bot/exts/holidays/halloween/spookyreact.py diff --git a/bot/exts/holidays/hanukkah/__init__.py b/bot/exts/holidays/hanukkah/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/bot/exts/holidays/hanukkah/__init__.py diff --git a/bot/exts/christmas/hanukkah_embed.py b/bot/exts/holidays/hanukkah/hanukkah_embed.py index 00125be3..00125be3 100644 --- a/bot/exts/christmas/hanukkah_embed.py +++ b/bot/exts/holidays/hanukkah/hanukkah_embed.py diff --git a/bot/exts/holidays/pride/__init__.py b/bot/exts/holidays/pride/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/bot/exts/holidays/pride/__init__.py diff --git a/bot/exts/pride/drag_queen_name.py b/bot/exts/holidays/pride/drag_queen_name.py index 15ca6576..bd01a603 100644 --- a/bot/exts/pride/drag_queen_name.py +++ b/bot/exts/holidays/pride/drag_queen_name.py @@ -9,7 +9,7 @@ from bot.bot import Bot log = logging.getLogger(__name__) -NAMES = json.loads(Path("bot/resources/pride/drag_queen_names.json").read_text("utf8")) +NAMES = json.loads(Path("bot/resources/holidays/pride/drag_queen_names.json").read_text("utf8")) class DragNames(commands.Cog): diff --git a/bot/exts/pride/pride_anthem.py b/bot/exts/holidays/pride/pride_anthem.py index 05286b3d..e8a4563b 100644 --- a/bot/exts/pride/pride_anthem.py +++ b/bot/exts/holidays/pride/pride_anthem.py @@ -10,7 +10,7 @@ from bot.bot import Bot log = logging.getLogger(__name__) -VIDEOS = json.loads(Path("bot/resources/pride/anthems.json").read_text("utf8")) +VIDEOS = json.loads(Path("bot/resources/holidays/pride/anthems.json").read_text("utf8")) class PrideAnthem(commands.Cog): diff --git a/bot/exts/pride/pride_facts.py b/bot/exts/holidays/pride/pride_facts.py index 63e33dda..e6ef7108 100644 --- a/bot/exts/pride/pride_facts.py +++ b/bot/exts/holidays/pride/pride_facts.py @@ -15,7 +15,7 @@ from bot.utils.decorators import seasonal_task log = logging.getLogger(__name__) -FACTS = json.loads(Path("bot/resources/pride/facts.json").read_text("utf8")) +FACTS = json.loads(Path("bot/resources/holidays/pride/facts.json").read_text("utf8")) class PrideFacts(commands.Cog): diff --git a/bot/exts/pride/pride_leader.py b/bot/exts/holidays/pride/pride_leader.py index 5684ff37..298c9328 100644 --- a/bot/exts/pride/pride_leader.py +++ b/bot/exts/holidays/pride/pride_leader.py @@ -13,7 +13,7 @@ from bot.bot import Bot log = logging.getLogger(__name__) -PRIDE_RESOURCE = json.loads(Path("bot/resources/pride/prideleader.json").read_text("utf8")) +PRIDE_RESOURCE = json.loads(Path("bot/resources/holidays/pride/prideleader.json").read_text("utf8")) MINIMUM_FUZZ_RATIO = 40 diff --git a/bot/exts/holidays/valentines/__init__.py b/bot/exts/holidays/valentines/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/bot/exts/holidays/valentines/__init__.py diff --git a/bot/exts/valentines/be_my_valentine.py b/bot/exts/holidays/valentines/be_my_valentine.py index c238027a..4d454c3a 100644 --- a/bot/exts/valentines/be_my_valentine.py +++ b/bot/exts/holidays/valentines/be_my_valentine.py @@ -26,7 +26,7 @@ class BeMyValentine(commands.Cog): @staticmethod def load_json() -> dict: """Load Valentines messages from the static resources.""" - p = Path("bot/resources/valentines/bemyvalentine_valentines.json") + p = Path("bot/resources/holidays/valentines/bemyvalentine_valentines.json") return loads(p.read_text("utf8")) @in_month(Month.FEBRUARY) diff --git a/bot/exts/valentines/lovecalculator.py b/bot/exts/holidays/valentines/lovecalculator.py index 1cb10e64..3999db2b 100644 --- a/bot/exts/valentines/lovecalculator.py +++ b/bot/exts/holidays/valentines/lovecalculator.py @@ -17,7 +17,7 @@ from bot.utils.decorators import in_month log = logging.getLogger(__name__) -LOVE_DATA = json.loads(Path("bot/resources/valentines/love_matches.json").read_text("utf8")) +LOVE_DATA = json.loads(Path("bot/resources/holidays/valentines/love_matches.json").read_text("utf8")) LOVE_DATA = sorted((int(key), value) for key, value in LOVE_DATA.items()) diff --git a/bot/exts/valentines/movie_generator.py b/bot/exts/holidays/valentines/movie_generator.py index d2dc8213..d2dc8213 100644 --- a/bot/exts/valentines/movie_generator.py +++ b/bot/exts/holidays/valentines/movie_generator.py diff --git a/bot/exts/valentines/myvalenstate.py b/bot/exts/holidays/valentines/myvalenstate.py index 52a61011..4b547d9b 100644 --- a/bot/exts/valentines/myvalenstate.py +++ b/bot/exts/holidays/valentines/myvalenstate.py @@ -12,7 +12,7 @@ from bot.constants import Colours log = logging.getLogger(__name__) -STATES = json.loads(Path("bot/resources/valentines/valenstates.json").read_text("utf8")) +STATES = json.loads(Path("bot/resources/holidays/valentines/valenstates.json").read_text("utf8")) class MyValenstate(commands.Cog): diff --git a/bot/exts/valentines/pickuplines.py b/bot/exts/holidays/valentines/pickuplines.py index 00741a72..bc4b88c6 100644 --- a/bot/exts/valentines/pickuplines.py +++ b/bot/exts/holidays/valentines/pickuplines.py @@ -11,7 +11,7 @@ from bot.constants import Colours log = logging.getLogger(__name__) -PICKUP_LINES = loads(Path("bot/resources/valentines/pickup_lines.json").read_text("utf8")) +PICKUP_LINES = loads(Path("bot/resources/holidays/valentines/pickup_lines.json").read_text("utf8")) class PickupLine(commands.Cog): diff --git a/bot/exts/valentines/savethedate.py b/bot/exts/holidays/valentines/savethedate.py index ffe559d6..3638c1ef 100644 --- a/bot/exts/valentines/savethedate.py +++ b/bot/exts/holidays/valentines/savethedate.py @@ -13,7 +13,7 @@ log = logging.getLogger(__name__) HEART_EMOJIS = [":heart:", ":gift_heart:", ":revolving_hearts:", ":sparkling_heart:", ":two_hearts:"] -VALENTINES_DATES = loads(Path("bot/resources/valentines/date_ideas.json").read_text("utf8")) +VALENTINES_DATES = loads(Path("bot/resources/holidays/valentines/date_ideas.json").read_text("utf8")) class SaveTheDate(commands.Cog): diff --git a/bot/exts/valentines/valentine_zodiac.py b/bot/exts/holidays/valentines/valentine_zodiac.py index 243f156e..d1b3a630 100644 --- a/bot/exts/valentines/valentine_zodiac.py +++ b/bot/exts/holidays/valentines/valentine_zodiac.py @@ -27,8 +27,8 @@ class ValentineZodiac(commands.Cog): @staticmethod def load_comp_json() -> tuple[dict, dict]: """Load zodiac compatibility from static JSON resource.""" - explanation_file = Path("bot/resources/valentines/zodiac_explanation.json") - compatibility_file = Path("bot/resources/valentines/zodiac_compatibility.json") + explanation_file = Path("bot/resources/holidays/valentines/zodiac_explanation.json") + compatibility_file = Path("bot/resources/holidays/valentines/zodiac_compatibility.json") zodiac_fact = json.loads(explanation_file.read_text("utf8")) diff --git a/bot/exts/valentines/whoisvalentine.py b/bot/exts/holidays/valentines/whoisvalentine.py index 211b1f27..67e46aa4 100644 --- a/bot/exts/valentines/whoisvalentine.py +++ b/bot/exts/holidays/valentines/whoisvalentine.py @@ -11,7 +11,7 @@ from bot.constants import Colours log = logging.getLogger(__name__) -FACTS = json.loads(Path("bot/resources/valentines/valentine_facts.json").read_text("utf8")) +FACTS = json.loads(Path("bot/resources/holidays/valentines/valentine_facts.json").read_text("utf8")) class ValentineFacts(commands.Cog): diff --git a/bot/exts/utilities/__init__.py b/bot/exts/utilities/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/bot/exts/utilities/__init__.py diff --git a/bot/exts/evergreen/bookmark.py b/bot/exts/utilities/bookmark.py index a91ef1c0..a91ef1c0 100644 --- a/bot/exts/evergreen/bookmark.py +++ b/bot/exts/utilities/bookmark.py diff --git a/bot/exts/evergreen/cheatsheet.py b/bot/exts/utilities/cheatsheet.py index 33d29f67..33d29f67 100644 --- a/bot/exts/evergreen/cheatsheet.py +++ b/bot/exts/utilities/cheatsheet.py diff --git a/bot/exts/evergreen/conversationstarters.py b/bot/exts/utilities/conversationstarters.py index fdc4467a..dd537022 100644 --- a/bot/exts/evergreen/conversationstarters.py +++ b/bot/exts/utilities/conversationstarters.py @@ -11,10 +11,10 @@ from bot.utils.randomization import RandomCycle SUGGESTION_FORM = "https://forms.gle/zw6kkJqv8U43Nfjg9" -with Path("bot/resources/evergreen/starter.yaml").open("r", encoding="utf8") as f: +with Path("bot/resources/utilities/starter.yaml").open("r", encoding="utf8") as f: STARTERS = yaml.load(f, Loader=yaml.FullLoader) -with Path("bot/resources/evergreen/py_topics.yaml").open("r", encoding="utf8") as f: +with Path("bot/resources/utilities/py_topics.yaml").open("r", encoding="utf8") as f: # First ID is #python-general and the rest are top to bottom categories of Topical Chat/Help. PY_TOPICS = yaml.load(f, Loader=yaml.FullLoader) @@ -33,7 +33,7 @@ TOPICS = { class ConvoStarters(commands.Cog): - """Evergreen conversation topics.""" + """General conversation topics.""" @commands.command() @whitelist_override(channels=ALL_ALLOWED_CHANNELS) diff --git a/bot/exts/evergreen/emoji.py b/bot/exts/utilities/emoji.py index 55d6b8e9..55d6b8e9 100644 --- a/bot/exts/evergreen/emoji.py +++ b/bot/exts/utilities/emoji.py diff --git a/bot/exts/evergreen/githubinfo.py b/bot/exts/utilities/githubinfo.py index bbc9061a..d00b408d 100644 --- a/bot/exts/evergreen/githubinfo.py +++ b/bot/exts/utilities/githubinfo.py @@ -8,7 +8,7 @@ from discord.ext import commands from bot.bot import Bot from bot.constants import Colours, NEGATIVE_REPLIES -from bot.exts.utils.extensions import invoke_help_command +from bot.exts.core.extensions import invoke_help_command log = logging.getLogger(__name__) diff --git a/bot/exts/evergreen/issues.py b/bot/exts/utilities/issues.py index 8a7ebed0..8a7ebed0 100644 --- a/bot/exts/evergreen/issues.py +++ b/bot/exts/utilities/issues.py diff --git a/bot/exts/evergreen/latex.py b/bot/exts/utilities/latex.py index 36c7e0ab..36c7e0ab 100644 --- a/bot/exts/evergreen/latex.py +++ b/bot/exts/utilities/latex.py diff --git a/bot/exts/evergreen/pythonfacts.py b/bot/exts/utilities/pythonfacts.py index 80a8da5d..ef190185 100644 --- a/bot/exts/evergreen/pythonfacts.py +++ b/bot/exts/utilities/pythonfacts.py @@ -6,7 +6,7 @@ from discord.ext import commands from bot.bot import Bot from bot.constants import Colours -with open("bot/resources/evergreen/python_facts.txt") as file: +with open("bot/resources/utilities/python_facts.txt") as file: FACTS = itertools.cycle(list(file)) COLORS = itertools.cycle([Colours.python_blue, Colours.python_yellow]) diff --git a/bot/exts/evergreen/realpython.py b/bot/exts/utilities/realpython.py index ef8b2638..ef8b2638 100644 --- a/bot/exts/evergreen/realpython.py +++ b/bot/exts/utilities/realpython.py diff --git a/bot/exts/evergreen/reddit.py b/bot/exts/utilities/reddit.py index e6cb5337..e6cb5337 100644 --- a/bot/exts/evergreen/reddit.py +++ b/bot/exts/utilities/reddit.py diff --git a/bot/exts/evergreen/stackoverflow.py b/bot/exts/utilities/stackoverflow.py index 64455e33..64455e33 100644 --- a/bot/exts/evergreen/stackoverflow.py +++ b/bot/exts/utilities/stackoverflow.py diff --git a/bot/exts/evergreen/timed.py b/bot/exts/utilities/timed.py index 2ea6b419..2ea6b419 100644 --- a/bot/exts/evergreen/timed.py +++ b/bot/exts/utilities/timed.py diff --git a/bot/exts/evergreen/wikipedia.py b/bot/exts/utilities/wikipedia.py index eccc1f8c..eccc1f8c 100644 --- a/bot/exts/evergreen/wikipedia.py +++ b/bot/exts/utilities/wikipedia.py diff --git a/bot/exts/evergreen/wolfram.py b/bot/exts/utilities/wolfram.py index 9a26e545..9a26e545 100644 --- a/bot/exts/evergreen/wolfram.py +++ b/bot/exts/utilities/wolfram.py |