Files
dakiny-bot/cogs/commands/test.py
T

41 lines
973 B
Python

"""
Commands for testing.
"""
import nextcord
from nextcord.ext import commands
from bot_messages.message_builder import MessageBuilder
class TestCog(commands.Cog, name="Test commands."):
"""
Class holds commands for testing.
"""
def __init__(self, bot) -> None:
"""
Default constructor for HelpCog class. Does nothing.
"""
self.bot = bot
@nextcord.slash_command()
async def test(self, interaction: nextcord.Interaction):
"""
Parent slash command for help. Never called.
"""
@test.subcommand()
async def msg_builder(self, interaction: nextcord.Interaction):
"""
Tests the message builder.
Args:
interaction (nextcord.Interaction): Interaction that invoked the command.
"""
msg_bulder = MessageBuilder(self.bot.config, 0)
message = msg_bulder.get_vote_start()
await interaction.channel.send(content=message)