Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubaid7 authored Jun 29, 2021
1 parent d763d19 commit b19e03f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
19 changes: 19 additions & 0 deletions Episode 50/commands/Per-Server-Commands/Reset/resetcahtbot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const db = require('quick.db')

module.exports = {
commands: ['resetchatbot', 'reset-chat-bot'], // You Can Keep Any Name
description: 'ReSet Chat Bot 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 chatbotchannel = db.fetch(`chatbotchannel_${message.guild.id}`)
if(chatbotchannel === null) return message.reply(`Chat Bot Channel Isnot Set.`) // If Chat Bot Channel Isnot Set
else if(chatbotchannel !== null) { // If Its Set Then...
message.reply(`Chat Bot Channel Removed`)
db.delete(`chatbotchannel_${message.guild.id}`) // Delete Chat Bot Channel
}

}
}
19 changes: 18 additions & 1 deletion Episode 50/commands/Per-Server-Commands/Reset/resetprefix.js
Original file line number Diff line number Diff line change
@@ -1 +1,18 @@

const db = require('quick.db')

module.exports = {
commands: ['reset-prefix'], // You Can Keep Any Name
description: 'ReSet Prefix For Server', // Optional
permissions: 'MANAGE_GUILD', // You Can Keep Any Permission
permissionError: 'You Dont Have Permission To Use This Command', // Optional

callback: async(message, args, client) => {

const prefix = db.fetch(`prefix_${message.guild.id}`) // Get Old Prefix
if(prefix === null) return message.reply('Prefix Not Set For This Server') // If No Prefix Is Set Yet
else if(prefix !== null) { // If Prefix Is Set Then...
message.reply('Prefix Reset To **+**')
db.delete(`prefix_${message.guild.id}`) // Delete Prefix And Set To Default Prefix
}
}
}

0 comments on commit b19e03f

Please sign in to comment.