imports cleanup.
This commit is contained in:
@@ -2,11 +2,9 @@
|
||||
Bot command for registering various channels to the bot.
|
||||
"""
|
||||
|
||||
from typing import Optional
|
||||
|
||||
from nextcord import Embed, Interaction, Permissions, SlashOption
|
||||
import nextcord
|
||||
from nextcord.ext import commands
|
||||
import nextcord
|
||||
|
||||
from highscores import highscores_data # pylint: disable=import-error
|
||||
|
||||
@@ -14,10 +12,6 @@ from highscores import highscores_data # pylint: disable=import-error
|
||||
class Register(commands.Cog, name="Register"):
|
||||
"""
|
||||
Class holds various register commands.
|
||||
|
||||
Args:
|
||||
commands.Cog: Parent class
|
||||
name (str, optional): Name of Cog. Defaults to "Register".
|
||||
"""
|
||||
|
||||
def __init__(self) -> None:
|
||||
@@ -25,7 +19,7 @@ class Register(commands.Cog, name="Register"):
|
||||
Default constructor for Register class. Does nothing.
|
||||
"""
|
||||
|
||||
@nextcord.slash_command(default_member_permissions=Permissions(administrator=True))
|
||||
@nextcord.slash_command(default_member_permissions=nextcord.Permissions(administrator=True))
|
||||
async def register(self):
|
||||
"""
|
||||
Parent slash command, never called.
|
||||
@@ -35,7 +29,7 @@ class Register(commands.Cog, name="Register"):
|
||||
async def highscore(
|
||||
self,
|
||||
interaction: nextcord.Interaction,
|
||||
channel: nextcord.abc.GuildChannel = SlashOption(
|
||||
channel: nextcord.abc.GuildChannel = nextcord.SlashOption(
|
||||
description="Channel to register",
|
||||
required=False,
|
||||
channel_types=[nextcord.ChannelType.text],
|
||||
@@ -62,7 +56,7 @@ class Register(commands.Cog, name="Register"):
|
||||
async def submission(
|
||||
self,
|
||||
interaction: nextcord.Interaction,
|
||||
channel: nextcord.abc.GuildChannel = SlashOption(
|
||||
channel: nextcord.abc.GuildChannel = nextcord.SlashOption(
|
||||
description="Channel to register",
|
||||
required=False,
|
||||
channel_types=[nextcord.ChannelType.text],
|
||||
@@ -89,7 +83,7 @@ class Register(commands.Cog, name="Register"):
|
||||
async def verify(
|
||||
self,
|
||||
interaction: nextcord.Interaction,
|
||||
channel: nextcord.abc.GuildChannel = SlashOption(
|
||||
channel: nextcord.abc.GuildChannel = nextcord.SlashOption(
|
||||
description="Channel to register",
|
||||
required=False,
|
||||
channel_types=[nextcord.ChannelType.text],
|
||||
|
||||
+1
-1
@@ -6,8 +6,8 @@ import logging
|
||||
import os
|
||||
import sys
|
||||
|
||||
import nextcord
|
||||
from nextcord.ext import commands
|
||||
import nextcord
|
||||
|
||||
import config
|
||||
from classes.highscores_data import HighscoresData
|
||||
|
||||
Reference in New Issue
Block a user