forked from Ubaid7/Discord.JS-V12-Bot-Tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
Episode 50/commands/Per-Server-Commands/Reset/resetlevelupchan.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
const db = require('quick.db') | ||
|
||
module.exports = { | ||
commands: ['resetlevelup', 'reset-level-up'], // You Can Keep Any Name | ||
description: 'ReSet Level Up Channel', // Optional | ||
permissions: 'MANAGE_CHANNELS', // You Can Keep Any Permission | ||
permissionError: 'You Dont Have Permission To Use This Command', // Optional | ||
|
||
callback: async(message, args, client) => { | ||
|
||
const levelupchannel = db.fetch(`levelupchannel_${message.guild.id}`) | ||
if(levelupchannel === null) return message.reply(`Level Up Channel Isn't Set.`) // If Level Up Channel Isnot Set | ||
else if(levelupchannel !== null) { // If Its Set Then... | ||
message.reply(`Level Up Channel Removed`) | ||
db.delete(`levelupchannel_${message.guild.id}`) // Delete Level Up Channel | ||
} | ||
|
||
} | ||
} |