diff --git a/src/commands/config.ts b/src/commands/config.ts index cfc27ee..7f5f639 100644 --- a/src/commands/config.ts +++ b/src/commands/config.ts @@ -4,6 +4,7 @@ * @author Naomi Carrigan */ +import { PermissionFlagBits } from "discord.js"; import { errorHandler } from "../utils/errorHandler.js"; import { isTheme } from "../utils/typeguards.js"; import type { Command } from "../interfaces/command.js"; @@ -15,6 +16,12 @@ import type { Command } from "../interfaces/command.js"; */ export const config: Command = async(pavelle, interaction) => { try { + if (!interaction.member.permissions.has(PermissionFlagBits.ManageServer)) { + await interaction.editReply({ + content: "No no no, you cannot do this.", + }); + return; + } const theme = interaction.options.getString("theme"); const spoiler = interaction.options.getBoolean("spoiler"); const query: { theme?: string; spoiler?: boolean } = {};