diff --git a/didier/cogs/meta.py b/didier/cogs/meta.py index 1fb51b9..69a3805 100644 --- a/didier/cogs/meta.py +++ b/didier/cogs/meta.py @@ -15,6 +15,11 @@ class Meta(commands.Cog): def __init__(self, client: Didier): self.client = client + @commands.command(name="Marco") + async def marco(self, ctx: commands.Context): + """Ping command to get the delay of the bot""" + return await ctx.reply(f"Polo! {round(self.client.latency * 1000)}ms", mention_author=False) + @commands.command(name="Source", aliases=["Src"]) async def source(self, ctx: commands.Context, *, command_name: Optional[str] = None): """Command to get links to the source code of Didier""" diff --git a/didier/views/modals/dad_jokes.py b/didier/views/modals/dad_jokes.py index f52b051..c3b2f67 100644 --- a/didier/views/modals/dad_jokes.py +++ b/didier/views/modals/dad_jokes.py @@ -12,7 +12,7 @@ __all__ = ["AddDadJoke"] class AddDadJoke(discord.ui.Modal, title="Add Dad Joke"): """Modal to add a new dad joke""" - name: discord.ui.TextInput = discord.ui.TextInput( + joke: discord.ui.TextInput = discord.ui.TextInput( label="Joke", placeholder="I sold our vacuum cleaner, it was just gathering dust.", style=discord.TextStyle.long, @@ -27,7 +27,7 @@ class AddDadJoke(discord.ui.Modal, title="Add Dad Joke"): @overrides async def on_submit(self, interaction: discord.Interaction): async with self.client.postgres_session as session: - joke = await add_dad_joke(session, str(self.name.value)) + joke = await add_dad_joke(session, str(self.joke.value)) await interaction.response.send_message(f"Successfully added joke #{joke.dad_joke_id}", ephemeral=True)