Add the guilds constant for adding commands.
This commit is contained in:
@@ -9,7 +9,7 @@ from sqlalchemy.orm import Session
|
|||||||
|
|
||||||
from cogs.submission.verification_view import VerificationView
|
from cogs.submission.verification_view import VerificationView
|
||||||
from database_setup.sql_data_classes import Category, CategoryGroup, Guild, Submission, engine
|
from database_setup.sql_data_classes import Category, CategoryGroup, Guild, Submission, engine
|
||||||
from utilities.utils import autofill_categories, autofill_groups, submit_score
|
from utilities.utils import GUILDS, autofill_categories, autofill_groups, submit_score
|
||||||
|
|
||||||
|
|
||||||
class SubmissionCog(commands.Cog):
|
class SubmissionCog(commands.Cog):
|
||||||
@@ -18,7 +18,7 @@ class SubmissionCog(commands.Cog):
|
|||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
return
|
return
|
||||||
|
|
||||||
@nextcord.slash_command()
|
@nextcord.slash_command(guild_ids=GUILDS)
|
||||||
async def submit(
|
async def submit(
|
||||||
self,
|
self,
|
||||||
interaction: nextcord.Interaction,
|
interaction: nextcord.Interaction,
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ from database_setup.sql_data_classes import Category, CategoryGroup, Guild, Scor
|
|||||||
|
|
||||||
MAX_LINE_LENGTH = 142
|
MAX_LINE_LENGTH = 142
|
||||||
|
|
||||||
|
GUILDS = [1000247361639030804]
|
||||||
|
|
||||||
|
|
||||||
def autofill_categories(guild_id: int, group_id: int, category_begin: str) -> "dict[str, str]":
|
def autofill_categories(guild_id: int, group_id: int, category_begin: str) -> "dict[str, str]":
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user