diff --git a/src/commands/pic.ts b/src/commands/pic.ts index 5d712fd..7bf4d24 100644 --- a/src/commands/pic.ts +++ b/src/commands/pic.ts @@ -1,5 +1,5 @@ import { ApplyOptions } from '@sapphire/decorators'; -import { Args, Command } from '@sapphire/framework'; +import { Args, BucketScope, Command } from '@sapphire/framework'; import { Message } from 'discord.js'; import { Configuration, OpenAIApi } from 'openai'; @@ -11,9 +11,12 @@ const openai = new OpenAIApi(configuration); @ApplyOptions({ description: 'Make a picture!', options: ['prompt'], + // 10mins cooldownDelay: 600_000, cooldownLimit: 1, - cooldownFilteredUsers: ['himbothyswaggins'] + // Yes... I did hardcode myself. + cooldownFilteredUsers: ['himbothyswaggins'], + cooldownScope: BucketScope.User }) export class UserCommand extends Command { // Register Chat Input and Context Menu command diff --git a/src/index.ts b/src/index.ts index 2fb70ea..54e5ac8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -20,10 +20,13 @@ const client = new SapphireClient({ intents: [GatewayIntentBits.DirectMessages, GatewayIntentBits.GuildMessages, GatewayIntentBits.Guilds, GatewayIntentBits.MessageContent], loadMessageCommandListeners: true, defaultCooldown: { + // 10s delay: 10_000, filteredCommands: ['ping', 'wryna'], limit: 2, - scope: BucketScope.Guild + // Yes... I did hardcode myself. + filteredUsers: ['himbothyswaggins'], + scope: BucketScope.User } });