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