Update chat.py

This commit is contained in:
Paillat
2023-03-09 20:31:45 +01:00
parent a2bc32a0e8
commit fa0875a52a

View File

@@ -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):
if message.author.id == self.bot.user.id:
modal = MyModal(message) modal = MyModal(message)
await ctx.send_modal(modal) 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):