mirror of https://github.com/stijndcl/didier
Fix linting & typing
parent
57e805e31c
commit
add9399944
|
@ -26,6 +26,7 @@ class Owner(commands.Cog):
|
|||
"""Global check for every command in this cog, so we don't have to add
|
||||
is_owner() to every single command separately
|
||||
"""
|
||||
# pylint: disable=W0236 # Pylint thinks this can't be async, but it can
|
||||
return await self.client.is_owner(ctx.author)
|
||||
|
||||
@commands.command(name="Sync")
|
||||
|
|
|
@ -6,15 +6,15 @@ import discord
|
|||
class CreateCustomCommand(discord.ui.Modal, title="Custom Command"):
|
||||
"""Modal shown to visually create custom commands"""
|
||||
|
||||
name = discord.ui.TextInput(label="Name", placeholder="Name of the command...")
|
||||
name: discord.ui.TextInput = discord.ui.TextInput(label="Name", placeholder="Name of the command...")
|
||||
|
||||
response = discord.ui.TextInput(
|
||||
response: discord.ui.TextInput = discord.ui.TextInput(
|
||||
label="Response", style=discord.TextStyle.long, placeholder="Response of the command...", max_length=2000
|
||||
)
|
||||
|
||||
async def on_submit(self, interaction: discord.Interaction) -> None:
|
||||
await interaction.response.send_message("Submitted", ephemeral=True)
|
||||
|
||||
async def on_error(self, interaction: discord.Interaction, error: Exception) -> None:
|
||||
async def on_error(self, interaction: discord.Interaction, error: Exception) -> None: # type: ignore
|
||||
await interaction.response.send_message("Errored", ephemeral=True)
|
||||
traceback.print_tb(error.__traceback__)
|
||||
|
|
Loading…
Reference in New Issue