mirror of
https://github.com/Paillat-dev/Botator.git
synced 2026-01-02 17:24:55 +00:00
Update chat.py
This commit is contained in:
@@ -83,8 +83,11 @@ class Chat (discord.Cog) :
|
|||||||
@discord.message_command(name="Downvote", description="Downvote a message")
|
@discord.message_command(name="Downvote", description="Downvote a message")
|
||||||
@commands.cooldown(1, 60, commands.BucketType.user)
|
@commands.cooldown(1, 60, commands.BucketType.user)
|
||||||
async def downvote(self, ctx: discord.ApplicationContext, message: discord.Message):
|
async def downvote(self, ctx: discord.ApplicationContext, message: discord.Message):
|
||||||
modal = MyModal(message)
|
if message.author.id == self.bot.user.id:
|
||||||
await ctx.send_modal(modal)
|
modal = MyModal(message)
|
||||||
|
await ctx.send_modal(modal)
|
||||||
|
else:
|
||||||
|
await ctx.respond("You can't downvote a message that is not from me !", ephemeral=True)
|
||||||
|
|
||||||
@downvote.error
|
@downvote.error
|
||||||
async def downvote_error(self, ctx, error):
|
async def downvote_error(self, ctx, error):
|
||||||
|
|||||||
Reference in New Issue
Block a user