From 055bfc0020f3535654f311771656c9ca2446c22a Mon Sep 17 00:00:00 2001 From: Atridad Lahiji <88056492+atridadl@users.noreply.github.com> Date: Thu, 15 Jun 2023 23:04:56 -0600 Subject: [PATCH] Rate Limit --- src/index.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/index.ts b/src/index.ts index b37364b..2fb70ea 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ import './lib/setup'; -import { LogLevel, SapphireClient } from '@sapphire/framework'; +import { LogLevel, SapphireClient, BucketScope } from '@sapphire/framework'; import { ActivityType, GatewayIntentBits } from 'discord.js'; const client = new SapphireClient({ @@ -8,8 +8,8 @@ const client = new SapphireClient({ status: 'online', activities: [ { - name: "I'm just here for the vibes my dudes...", - type: ActivityType.Playing + name: 'BOAT PARADE! BOAT PARADE! BOAT PARADE!', + type: ActivityType.Listening } ] }, @@ -18,7 +18,13 @@ const client = new SapphireClient({ level: LogLevel.Debug }, intents: [GatewayIntentBits.DirectMessages, GatewayIntentBits.GuildMessages, GatewayIntentBits.Guilds, GatewayIntentBits.MessageContent], - loadMessageCommandListeners: true + loadMessageCommandListeners: true, + defaultCooldown: { + delay: 10_000, + filteredCommands: ['ping', 'wryna'], + limit: 2, + scope: BucketScope.Guild + } }); const main = async () => {