Verification button working.

This commit is contained in:
alwayscompiling
2022-07-03 17:11:06 -04:00
parent 445c77b012
commit 0834634cde
3 changed files with 46 additions and 12 deletions
+8 -4
View File
@@ -2,10 +2,10 @@
Bot command to submit a score
"""
from ast import AsyncFunctionDef
from nextcord.ext import commands
from utils import highscore_manage # pylint: disable=import-error
from highscores import highscores_data # pylint: disable=import-error
from utilities.utils import submit_score # pylint: disable=import-error
from .verification_view import VerificationView
class Score(commands.Cog, name="Score"):
@@ -14,6 +14,11 @@ class Score(commands.Cog, name="Score"):
def __init__(self, bot: commands.Bot):
self.bot = bot
@commands.Cog.listener()
async def on_ready(self):
"""Called when the cog is loaded"""
self.bot.add_view(VerificationView())
@commands.command(name="score")
async def score(self, ctx: commands.Context, boss_name: str, category: str, score: str):
"""A command which calls a function to submit the score to highscores.
@@ -35,10 +40,9 @@ class Score(commands.Cog, name="Score"):
await channel.send(
content=verification_string,
files=[await attch.to_file() for attch in ctx.message.attachments],
view=VerificationView(),
)
# await highscore_manage.submit_score(self, ctx, boss_name, category, score)
# This function will be called when this extension is loaded.
# It is necessary to add these functions to the bot.