generated from nhcarrigan/template
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
* @author Naomi Carrigan
|
* @author Naomi Carrigan
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import { PermissionFlagBits } from "discord.js";
|
||||||
import { errorHandler } from "../utils/errorHandler.js";
|
import { errorHandler } from "../utils/errorHandler.js";
|
||||||
import { isTheme } from "../utils/typeguards.js";
|
import { isTheme } from "../utils/typeguards.js";
|
||||||
import type { Command } from "../interfaces/command.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) => {
|
export const config: Command = async(pavelle, interaction) => {
|
||||||
try {
|
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 theme = interaction.options.getString("theme");
|
||||||
const spoiler = interaction.options.getBoolean("spoiler");
|
const spoiler = interaction.options.getBoolean("spoiler");
|
||||||
const query: { theme?: string; spoiler?: boolean } = {};
|
const query: { theme?: string; spoiler?: boolean } = {};
|
||||||
|
|||||||
Reference in New Issue
Block a user