Fixed glaring oversight in channel
This commit is contained in:
parent
c50e0d7319
commit
56e6419c02
1 changed files with 1 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
const db = require("../utils/database.js");
|
const db = require("../utils/database.js");
|
||||||
|
|
||||||
exports.run = async (message, args) => {
|
exports.run = async (message, args) => {
|
||||||
|
if (!message.member.permission.has("administrator") && message.member.id !== process.env.OWNER) return `${message.author.mention}, you need to be an administrator to enable/disable me!`;
|
||||||
if (args.length === 0) return `${message.author.mention}, you need to provide whether I should be enabled or disabled in this channel!`;
|
if (args.length === 0) return `${message.author.mention}, you need to provide whether I should be enabled or disabled in this channel!`;
|
||||||
if (args[0] !== "disable" && args[0] !== "enable") return `${message.author.mention}, that's not a valid option!`;
|
if (args[0] !== "disable" && args[0] !== "enable") return `${message.author.mention}, that's not a valid option!`;
|
||||||
const guildDB = (await db.guilds.find({id: message.channel.guild.id}).exec())[0];
|
const guildDB = (await db.guilds.find({id: message.channel.guild.id}).exec())[0];
|
||||||
|
|
Loading…
Reference in a new issue