Skip to content

Commit

Permalink
Add gaurd
Browse files Browse the repository at this point in the history
  • Loading branch information
deepsarda committed Sep 16, 2023
1 parent f937b49 commit aebf3db
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/plugins/setup/chatbot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export class Chatbot {
id: 'sharechatbot',
})
@Guard(
RateLimit(TIME_UNIT.hours, 1, {
RateLimit(TIME_UNIT.minutes, 20, {
rateValue: 1,
ephemeral: true,
}),
Expand All @@ -217,6 +217,15 @@ export class Chatbot {
@ButtonComponent({
id: /confirmsharechatbot-/gm,
})
@Guard(
RateLimit(TIME_UNIT.minutes, 20, {
rateValue: 1,
ephemeral: true,
}),
PermissionGuard(['ManageMessages'], {
ephemeral: true,
}),
)
async confirmsharechatbot(interaction: ButtonInteraction) {
let messageId = interaction.customId.split('-')[1];
await interaction.reply({
Expand Down

0 comments on commit aebf3db

Please sign in to comment.