Changed where submission views live.

This commit is contained in:
alwayscompiling
2022-07-06 21:05:04 -04:00
parent d0428afb3f
commit c4261fc7f4
6 changed files with 113 additions and 29 deletions
+26
View File
@@ -0,0 +1,26 @@
"""
Bot command to post the highscores
"""
from nextcord.ext import commands
from .submission_views import SubmissionButton
class SubmissionCog(commands.Cog, name="Submission Cog"):
"""Posts Highscores."""
def __init__(self, bot: commands.Bot):
self.bot = bot
@commands.Cog.listener()
async def on_ready(self):
"""Called when cog is loaded"""
self.bot.add_view(SubmissionButton())
# This function will be called when this extension is loaded.
# It is necessary to add these functions to the bot.
def setup(bot: commands.Bot):
"""Adds functon to bot"""
bot.add_cog(SubmissionCog(bot))