fix(issues): actually fixed the cog not working (maybe?) - last commit was an accident - staged the wrong file lmao
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 7s
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 7s
This commit is contained in:
parent
c7dd2ab0fe
commit
0bc8898773
1 changed files with 9 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
from typing import Union
|
||||
from redbot.core import commands, Config
|
||||
from redbot.core import commands, Config, app_commands
|
||||
import discord
|
||||
|
||||
class Issues(commands.Cog):
|
||||
|
@ -9,13 +9,14 @@ class Issues(commands.Cog):
|
|||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
self.config = Config.get_conf(self, identifier=4285273314713, force_registration=True)
|
||||
self.config.register_guild(
|
||||
self.config.register_global(
|
||||
channel = None,
|
||||
gitea_url = None
|
||||
)
|
||||
|
||||
@commands.command()
|
||||
async def issuestest(self, ctx: commands.Context):
|
||||
await ctx.message.reply(content="Hello world!", view=self.IssueButtons)
|
||||
@app_commands.command()
|
||||
async def issuestest(self, interaction: discord.Interaction):
|
||||
await interaction.response.send_message(content="Hello world!", view=self.IssueButtons(), ephemeral=True)
|
||||
|
||||
async def send_to_target(self, target: Union[discord.Member, discord.TextChannel], interaction: discord.Interaction, message: str, secondary_message: str = None):
|
||||
if isinstance(target, discord.Member):
|
||||
|
@ -45,6 +46,9 @@ class Issues(commands.Cog):
|
|||
await interaction.response.send_modal(Issues.BotModal())
|
||||
|
||||
class BotModal(discord.ui.Modal, title="Creating issue..."):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
description = discord.ui.TextInput(
|
||||
label="Describe the bug",
|
||||
placeholder="A clear and concise description of what the bug is.",
|
||||
|
|
Loading…
Reference in a new issue