Skip to content

Commit

Permalink
Reset/Delete Level Up Channel
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubaid7 authored Jun 29, 2021
1 parent b19e03f commit f08e1dc
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Episode 50/commands/Per-Server-Commands/Reset/resetlevelupchan.js
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
}

}
}

0 comments on commit f08e1dc

Please sign in to comment.