alright it is finally working
This commit is contained in:
parent
eaea49de85
commit
0444dc2ee8
1 changed files with 7 additions and 5 deletions
|
@ -83,11 +83,7 @@ client.on("interactionCreate", async interaction => {
|
||||||
if (cmd.Level) {
|
if (cmd.Level) {
|
||||||
if (!data.Guild.Level) return;
|
if (!data.Guild.Level) return;
|
||||||
}
|
}
|
||||||
if (cmd.name == "nsfw" && !data.Guild?.NSFW) {
|
|
||||||
interaction.followUp({
|
|
||||||
content: "NSFW commands have been disabled in this server",
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if (!interaction.guild.me.permissions.has(cmd.BotPerms || [])) {
|
if (!interaction.guild.me.permissions.has(cmd.BotPerms || [])) {
|
||||||
return interaction.followUp({
|
return interaction.followUp({
|
||||||
content: `You can't use this command. I need to have ${cmd.BotPerms} permission to use this command.`,
|
content: `You can't use this command. I need to have ${cmd.BotPerms} permission to use this command.`,
|
||||||
|
@ -115,6 +111,12 @@ client.on("interactionCreate", async interaction => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const random = utils.rndint(3, 6);
|
const random = utils.rndint(3, 6);
|
||||||
|
if (cmd.name == "nsfw" && !data.Guild?.NSFW) {
|
||||||
|
interaction.followUp({
|
||||||
|
content: "NSFW commands have been disabled in this server",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (cmd.timeout) {
|
if (cmd.timeout) {
|
||||||
const current_time = Date.now();
|
const current_time = Date.now();
|
||||||
const cooldown_amount = cmd.timeout;
|
const cooldown_amount = cmd.timeout;
|
||||||
|
|
Loading…
Reference in a new issue