aboutsummaryrefslogtreecommitdiff
path: root/code/cogs/modals.py
blob: 390bbda9c4846b646b969345ac5a7a73d02dbd8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import discord
from discord import app_commands
from discord.ext import commands

from bug_report import BugReport
from feedback import FeedbackForm


class Modals(commands.Cog):
    def __init__(self, bot):
        self.bot = bot

    @app_commands.command()
    async def bug(self, interaction: discord.Interaction):
        "Send a bug report to the developer"
        await interaction.response.send_modal(BugReport(self.bot))

    @app_commands.command()
    async def feedback(self, interaction: discord.Interaction):
        "Send bot feeback to the developer"
        await interaction.response.send_modal(FeedbackForm(self.bot))


async def setup(bot):
    await bot.add_cog(Modals(bot))