-
Notifications
You must be signed in to change notification settings - Fork 117
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
40 additions
and
1 deletion.
There are no files selected for viewing
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,21 @@ | ||
const db = require('quick.db') | ||
|
||
module.exports = { | ||
commands: ['setchatbot', 'set-chat-bot'], // You Can Keep Any Name | ||
description: 'Set 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 channel = args[0] | ||
if(!channel) return message.reply('Which Channel you You Want To Set As Chat Bot?') // If No Channel is Provided | ||
if(isNaN(parseInt(args[0]))) return message.reply('Channel ID Isn\'t A Number') // If Channel ID Is Provided As Name | ||
const chatbotchannel = db.fetch(`chatbotchannel_${message.guild.id}`) // Get ChatBoChannel | ||
if(chatbotchannel !== null) return message.reply(`Chat Bot Channel Is Already Set. Current Channel Is <#${chatbotchannel}>. Reset Channel To Set Again`) // If Channel is Already Set | ||
else if(chatbotchannel === null) { // If Channel is Not Set Then... | ||
message.reply(`Chat Bot Channel Set To <#${channel}>`) | ||
db.set(`chatbotchannel_${message.guild.id}`, channel) // Set Chat Bot Channel | ||
} | ||
|
||
} | ||
} |
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,19 @@ | ||
|
||
const db = require('quick.db') | ||
|
||
module.exports = { | ||
commands: ['set-prefix'], // You Can Keep Any Name | ||
description: 'Set 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 newprefix = args[0] // New Prefix | ||
if(!newprefix) return message.reply('What Prefix Do You Want To Keep As?') // If No Prefix Is Added | ||
else if(newprefix.length > 4) return message.reply('Your Prefix Is Too Long, Chose Shorter(Less Then 4 Character)') // If Prefix Is More Then 4 Character's | ||
else { | ||
message.reply(`Prefix Set As **${newprefix}**`) | ||
db.set(`prefix_${message.guild.id}`, newprefix) // Set New Prefix | ||
} | ||
} | ||
} |