fix(bot): ✨ p.suggest command not replying.

This commit is contained in:
Nyeki.py
2024-10-18 03:38:35 -03:00
parent 6cd56b1870
commit f7b974f3ed
+12 -4
View File
@@ -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.