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
2 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
Episode 50/commands/Per-Server-Commands/Reset/resetcahtbot.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: ['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
19
Episode 50/commands/Per-Server-Commands/Reset/resetprefix.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 |
---|---|---|
@@ -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 | ||
} | ||
} | ||
} |