Create simple help command for setting up.
This commit is contained in:
@@ -6,6 +6,7 @@ from nextcord.ext import commands
|
|||||||
|
|
||||||
from .create import CreateCog
|
from .create import CreateCog
|
||||||
from .delete import DeleteCog
|
from .delete import DeleteCog
|
||||||
|
from .help import HelpCog
|
||||||
from .refresh import RefreshCog
|
from .refresh import RefreshCog
|
||||||
from .set import SetCog
|
from .set import SetCog
|
||||||
from .update import UpdateCog
|
from .update import UpdateCog
|
||||||
@@ -19,6 +20,7 @@ def setup(bot: commands.Bot):
|
|||||||
"""
|
"""
|
||||||
bot.add_cog(CreateCog(bot))
|
bot.add_cog(CreateCog(bot))
|
||||||
bot.add_cog(DeleteCog())
|
bot.add_cog(DeleteCog())
|
||||||
|
bot.add_cog(HelpCog())
|
||||||
bot.add_cog(RefreshCog(bot))
|
bot.add_cog(RefreshCog(bot))
|
||||||
bot.add_cog(SetCog())
|
bot.add_cog(SetCog())
|
||||||
bot.add_cog(UpdateCog(bot))
|
bot.add_cog(UpdateCog(bot))
|
||||||
|
|||||||
@@ -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)
|
||||||
@@ -48,7 +48,7 @@ class SetCog(commands.Cog, name="Set command."):
|
|||||||
Command function to register a CategoryGroup's output channel.
|
Command function to register a CategoryGroup's output channel.
|
||||||
|
|
||||||
Args:
|
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.
|
group_id (str): String representation of Group id to register channel to. Is SlashOption.
|
||||||
channel (nextcord.abc.GuildChannel, optional): Channel to register
|
channel (nextcord.abc.GuildChannel, optional): Channel to register
|
||||||
Is a SlashOption. Limited to text channels, Defaults to None.
|
Is a SlashOption. Limited to text channels, Defaults to None.
|
||||||
|
|||||||
Reference in New Issue
Block a user