Compare commits

..
Author SHA1 Message Date
imcompiling f76171ac84 Create simple help command for setting up. 2023-02-12 20:52:28 -05:00
3 changed files with 50 additions and 1 deletions
+2
View File
@@ -6,6 +6,7 @@ from nextcord.ext import commands
from .create import CreateCog
from .delete import DeleteCog
from .help import HelpCog
from .refresh import RefreshCog
from .set import SetCog
from .update import UpdateCog
@@ -19,6 +20,7 @@ def setup(bot: commands.Bot):
"""
bot.add_cog(CreateCog(bot))
bot.add_cog(DeleteCog())
bot.add_cog(HelpCog())
bot.add_cog(RefreshCog(bot))
bot.add_cog(SetCog())
bot.add_cog(UpdateCog(bot))
+47
View File
@@ -0,0 +1,47 @@
"""
Commands for helping a user.
"""
import nextcord
from nextcord.ext import commands
class HelpCog(commands.Cog, name="Help commands."):
"""
Class holds commands for getting help.
"""
def __init__(self) -> None:
"""
Default constructor for HelpCog class. Does nothing.
"""
@nextcord.slash_command()
async def help(self, interaction: nextcord.Interaction):
"""
Parent slash command for help. Never called.
"""
@help.subcommand(description="Describes how to get started with Agon.")
async def setup(self, interaction: nextcord.Interaction):
"""
Sends a message describing how to get started with Agon.
Args:
interaction (nextcord.Interaction): Interaction that invoked the command.
"""
# I hate this but don't want indents in the string.
# pylint: disable=line-too-long
help_str: str = """Welcome to Agon! Three simple steps are needed to get started.
1.) Set a channel to recieve submission verifications with "/set verify_channel."
This channel is used to allow moderators to check if a submission is real/valid.
2.) Set a channel for submissions to be posted in with "/set submission_channel."
This channel will be where all user submission messages are sent.
3.) Set up your highscore tables! Use "/create group" to first create a group message in the channel you would like and then use "/create category" to create a category in that group message!"""
# pylint: enable=line-too-long
print(help_str)
await interaction.response.send_message(content=help_str)
+1 -1
View File
@@ -48,7 +48,7 @@ class SetCog(commands.Cog, name="Set command."):
Command function to register a CategoryGroup's output channel.
Args:
interaction (nextcord.Interaction): Interaction that invoked the command
interaction (nextcord.Interaction): Interaction that invoked the command.
group_id (str): String representation of Group id to register channel to. Is SlashOption.
channel (nextcord.abc.GuildChannel, optional): Channel to register
Is a SlashOption. Limited to text channels, Defaults to None.