From 3f263ad82b7e2cd4f1a1bad3b9bfd344f227efe1 Mon Sep 17 00:00:00 2001 From: EvolutionX Date: Thu, 29 Sep 2022 11:30:05 +0530 Subject: [PATCH] chore: this is where it all begins... permalink: http://whatthecommit.com/5451d91f285b68d197227e49df10f8b8 --- src/commands/refresh.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/commands/refresh.ts b/src/commands/refresh.ts index 81b75cc..1433ae1 100644 --- a/src/commands/refresh.ts +++ b/src/commands/refresh.ts @@ -3,6 +3,7 @@ import { Collection, Client } from "discord.js"; import { publish } from "../plugins/publish.js"; import { fetch } from "undici"; import type { Data } from "./plugin.js"; +import { ownerOnly } from "../plugins/ownerOnly.js"; export default commandModule({ type: CommandType.Slash, @@ -11,15 +12,10 @@ export default commandModule({ dmPermission: false, defaultMemberPermissions: ["Administrator"], }), + ownerOnly(["697795666373640213"]), ], description: "refresh plugins cache", async execute(ctx) { - if (ctx.user.id !== "697795666373640213") { - return ctx.reply({ - content: `Only <@!697795666373640213> can use this!`, - ephemeral: true, - }); - } const success = await cp(ctx.client); if (!success) return ctx.reply({