From f7b974f3ed4b2a3867e5580c5d6f4ea4e005ade8 Mon Sep 17 00:00:00 2001 From: "Nyeki.py" <84998222+Nekidev@users.noreply.github.com> Date: Fri, 18 Oct 2024 03:38:35 -0300 Subject: [PATCH] fix(bot): :sparkles: `p.suggest` command not replying. --- payphone/cogs/utility/cog.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/payphone/cogs/utility/cog.py b/payphone/cogs/utility/cog.py index d92df2c..2b24677 100644 --- a/payphone/cogs/utility/cog.py +++ b/payphone/cogs/utility/cog.py @@ -5,7 +5,7 @@ from discord.ext import commands from payphone import bot from payphone.cogs import base -from payphone.core import config +from payphone.core import config, constants class Utility(base.Cog): @@ -14,21 +14,29 @@ class Utility(base.Cog): @commands.command() @commands.cooldown(1, 60, commands.BucketType.user) - async def suggest(self, ctx: commands.Context, suggestion: str) -> None: + async def suggest(self, ctx: commands.Context, *, suggestion: str) -> None: + """ + Make a suggestion to improve Payphone. + """ + embed = discord.Embed( + color=constants.EMBED_COLOR, title="Suggestion", description=suggestion, + timestamp=datetime.now(timezone.utc), author=discord.EmbedAuthor( name=ctx.author.display_name, icon_url=ctx.author.display_avatar.url ), - footer=discord.EmbedFooter(text=ctx.author.username), - timestamp=datetime.now(timezone.utc), + footer=discord.EmbedFooter(text=ctx.author.name), + thumbnail=self.bot.user.display_avatar.url, ) await self.bot.get_partial_messageable(config.SUGGESTIONS_CHANNEL_ID).send( embed=embed ) + await ctx.send("✅ Thank you for your suggestion!") + def setup(b: bot.Payphone) -> None: """Load the cog into the bot.