-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #284 from SylteA/dev
AOC migration ++
- Loading branch information
Showing
13 changed files
with
439 additions
and
498 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from bot.core import DiscordBot | ||
|
||
from .commands import AdventOfCode | ||
from .tasks import AdventOfCodeTasks | ||
|
||
|
||
async def setup(bot: DiscordBot) -> None: | ||
await bot.add_cog(AdventOfCode(bot=bot)) | ||
await bot.add_cog(AdventOfCodeTasks(bot=bot)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from discord import app_commands | ||
from discord.ext import commands | ||
|
||
from bot import core | ||
from bot.extensions.adventofcode.utils import home_embed | ||
from bot.extensions.adventofcode.views import CreateAdventOfCodeView | ||
|
||
|
||
class AdventOfCode(commands.Cog): | ||
def __init__(self, bot): | ||
self.bot = bot | ||
self._create_aoc_view = CreateAdventOfCodeView(timeout=None) | ||
self.bot.add_view(self._create_aoc_view) | ||
|
||
@app_commands.command(name="advent-of-code") | ||
async def advent_of_code(self, interaction: core.InteractionType): | ||
"""Returns information about the Advent of Code""" | ||
await interaction.response.send_message(embed=home_embed(), ephemeral=True, view=self._create_aoc_view) |
Oops, something went wrong.