fix(bot): ✨ p.suggest command not replying.
This commit is contained in:
@@ -5,7 +5,7 @@ from discord.ext import commands
|
|||||||
|
|
||||||
from payphone import bot
|
from payphone import bot
|
||||||
from payphone.cogs import base
|
from payphone.cogs import base
|
||||||
from payphone.core import config
|
from payphone.core import config, constants
|
||||||
|
|
||||||
|
|
||||||
class Utility(base.Cog):
|
class Utility(base.Cog):
|
||||||
@@ -14,21 +14,29 @@ class Utility(base.Cog):
|
|||||||
|
|
||||||
@commands.command()
|
@commands.command()
|
||||||
@commands.cooldown(1, 60, commands.BucketType.user)
|
@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(
|
embed = discord.Embed(
|
||||||
|
color=constants.EMBED_COLOR,
|
||||||
title="Suggestion",
|
title="Suggestion",
|
||||||
description=suggestion,
|
description=suggestion,
|
||||||
|
timestamp=datetime.now(timezone.utc),
|
||||||
author=discord.EmbedAuthor(
|
author=discord.EmbedAuthor(
|
||||||
name=ctx.author.display_name, icon_url=ctx.author.display_avatar.url
|
name=ctx.author.display_name, icon_url=ctx.author.display_avatar.url
|
||||||
),
|
),
|
||||||
footer=discord.EmbedFooter(text=ctx.author.username),
|
footer=discord.EmbedFooter(text=ctx.author.name),
|
||||||
timestamp=datetime.now(timezone.utc),
|
thumbnail=self.bot.user.display_avatar.url,
|
||||||
)
|
)
|
||||||
|
|
||||||
await self.bot.get_partial_messageable(config.SUGGESTIONS_CHANNEL_ID).send(
|
await self.bot.get_partial_messageable(config.SUGGESTIONS_CHANNEL_ID).send(
|
||||||
embed=embed
|
embed=embed
|
||||||
)
|
)
|
||||||
|
|
||||||
|
await ctx.send("✅ Thank you for your suggestion!")
|
||||||
|
|
||||||
|
|
||||||
def setup(b: bot.Payphone) -> None:
|
def setup(b: bot.Payphone) -> None:
|
||||||
"""Load the cog into the bot.
|
"""Load the cog into the bot.
|
||||||
|
|||||||
Reference in New Issue
Block a user