fixing stupid bugs

This commit is contained in:
codepupper 2019-11-13 22:12:14 +01:00
parent 7022efebb8
commit 54fff51e97
17 changed files with 124 additions and 121 deletions

View file

@ -54,12 +54,15 @@ module.exports = {
client.cooldowns.set(cmd.name, new Collection()); client.cooldowns.set(cmd.name, new Collection());
} }
if (ctx.isDeveloper) {
cmd.AuthorPermissions = 'NONE';
}
if (cmd.guildOnly && !msg.guild) return; if (cmd.guildOnly && !msg.guild) return;
if (cmd.nsfw && !ctx.channel.nsfw) if (cmd.nsfw && !ctx.channel.nsfw)
return ctx.send('This channel is not marked as NSFW, please mark it as such and rerun this command.'); return ctx.send('This channel is not marked as NSFW, please mark it as such and rerun this command.');
if (cmd.developerOnly && !client.config.developers.find((dev) => msg.author.id == dev.id)) return; if (cmd.developerOnly && !client.config.developers.find((dev) => msg.author.id == dev.id)) return;
if (cmd.AuthorPermissions !== 'NONE' && !ctx.member.permissions.has(cmd.AuthorPermissions)) { if (cmd.AuthorPermissions !== 'NONE' && !ctx.member.permissions.has(cmd.AuthorPermissions)) {
return ctx.send(`You need \`${cmd.AuthorPermissions}\` Permission(s) to run this Command`); return ctx.send(`You need the \`${cmd.AuthorPermissions}\` Permission(s) to run this Command`);
} }
const now = Date.now(); const now = Date.now();
const timestamps = client.cooldowns.get(cmd.name); const timestamps = client.cooldowns.get(cmd.name);
@ -90,6 +93,8 @@ module.exports = {
cmd.name + ' | ' + err.message, cmd.name + ' | ' + err.message,
`Full Error: `Full Error:
${err} ${err}
Content: ${ctx.msg.content}
Author: ${msg.author.tag} (${msg.author.id}) Author: ${msg.author.tag} (${msg.author.id})
Server: ${msg.guild.name} (${msg.guild.id})`, Server: ${msg.guild.name} (${msg.guild.id})`,

View file

@ -1,12 +1,11 @@
const { const { log } = require('../utils');
log
} = require('../utils');
const config = require('../config'); const config = require('../config');
const blapi = require('blapi'); const blapi = require('blapi');
//blapi.setLogging(true); //blapi.setLogging(true);
function randomStatus(client) { function randomStatus(client) {
const States = [{ const States = [
{
activity: { activity: {
name: 'server fans whirr 💨', name: 'server fans whirr 💨',
type: 'LISTENING' type: 'LISTENING'
@ -15,20 +14,18 @@ function randomStatus(client) {
}, },
{ {
activity: { activity: {
name: "my master's keyboard -w-", name: 'True Damage - GIANTS',
type: 'LISTENING' type: 'LISTENING'
}, },
status: 'online' status: 'online'
}, },
{ {
activity: { activity: {
name: client.guilds.size + ' Servers -w-', name: `${client.guilds.size} Servers -w-`,
type: 'WATCHING' type: 'WATCHING'
}, },
status: 'online' status: 'online'
}, },
// { game: { name: `${client.users.get('318044130796109825').username} dance~`, type: 'WATCHING' }, status: 'dnd' },
// { game: { name: thal.users.size + ' Wolves', type: 'WATCHING' }, status: 'dnd' },
{ {
activity: { activity: {
name: 'Δ & ♫', name: 'Δ & ♫',
@ -36,13 +33,6 @@ function randomStatus(client) {
}, },
status: 'online' status: 'online'
}, },
{
activity: {
name: 'True Damage - GIANTS',
type: 'LISTENING'
},
status: 'online'
},
{ {
activity: { activity: {
name: `'help | thaldr.in`, name: `'help | thaldr.in`,
@ -59,11 +49,13 @@ function randomStatus(client) {
module.exports = { module.exports = {
name: 'ready', name: 'ready',
run: async (client) => { run: async (client) => {
blapi.handle(client, config.apis); if (client.user.id === '434662676547764244') {
blapi.handle(client, config.apis);
}
log.hasStarted(); log.hasStarted();
randomStatus(client); randomStatus(client);
setInterval(() => { setInterval(() => {
randomStatus(client); randomStatus(client);
}, 60000); }, 60000);
} }
}; };

View file

@ -80,6 +80,7 @@ module.exports = class Help extends Command {
(c) => (c) =>
c.name == ctx.args[0].toLowerCase() || (c.aliases && c.aliases.includes(ctx.args[0].toLowerCase())) c.name == ctx.args[0].toLowerCase() || (c.aliases && c.aliases.includes(ctx.args[0].toLowerCase()))
); );
console.log(command);
let fields = [ let fields = [
{ {
@ -108,7 +109,6 @@ module.exports = class Help extends Command {
inline: true inline: true
} }
]; ];
if (!command) if (!command)
return ctx.send(`That command couldn't be found. See the \`help\` command for valid commands.`); return ctx.send(`That command couldn't be found. See the \`help\` command for valid commands.`);

View file

@ -6,7 +6,7 @@ module.exports = class Bang extends Command {
constructor() { constructor() {
super({ super({
name: 'bang', name: 'bang',
description: 'Cuddle a user', description: 'Bang a user',
aliases: [ 'fuck' ], aliases: [ 'fuck' ],
module: 'Roleplay', module: 'Roleplay',
cooldown: 2, cooldown: 2,
@ -25,7 +25,13 @@ module.exports = class Bang extends Command {
const Server = await ctx.db.servers.get(ctx.guild.id); const Server = await ctx.db.servers.get(ctx.guild.id);
let Line; let Line;
if (Server.rp_text) { let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
if (Settings.rp_text) {
const LineFromUtils = ctx.utils.int.bang[parseInt(Math.random() * ctx.utils.int.bang.length)]; const LineFromUtils = ctx.utils.int.bang[parseInt(Math.random() * ctx.utils.int.bang.length)];
Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace( Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace(
/1/g, /1/g,
@ -35,12 +41,6 @@ module.exports = class Bang extends Command {
Line = undefined; Line = undefined;
} }
let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req; let req;
let Message; let Message;
await yiff.furrybot.nsfw.bang().then((E) => (req = E)); await yiff.furrybot.nsfw.bang().then((E) => (req = E));

View file

@ -25,7 +25,13 @@ module.exports = class Boop extends Command {
const Server = await ctx.db.servers.get(ctx.guild.id); const Server = await ctx.db.servers.get(ctx.guild.id);
let Line; let Line;
if (Server.rp_text) { let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
if (Settings.rp_text) {
const LineFromUtils = ctx.utils.int.boop[parseInt(Math.random() * ctx.utils.int.boop.length)]; const LineFromUtils = ctx.utils.int.boop[parseInt(Math.random() * ctx.utils.int.boop.length)];
Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace( Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace(
/1/g, /1/g,
@ -34,13 +40,6 @@ module.exports = class Boop extends Command {
} else { } else {
Line = undefined; Line = undefined;
} }
let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req; let req;
let Message; let Message;
await yiff.furrybot.sfw.boop().then((E) => (req = E)); await yiff.furrybot.sfw.boop().then((E) => (req = E));

View file

@ -19,7 +19,13 @@ module.exports = class Bulge extends Command {
async command(ctx) { async command(ctx) {
let Line; let Line;
const Server = await ctx.db.servers.get(ctx.guild.id); const Server = await ctx.db.servers.get(ctx.guild.id);
if (ctx.msg.mentions.members.size > 0 && Server.rp_text) { let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
if (ctx.msg.mentions.members.size > 0 && Settings.rp_text) {
const LineFromUtils = ctx.utils.int.bulge[parseInt(Math.random() * ctx.utils.int.bulge.length)]; const LineFromUtils = ctx.utils.int.bulge[parseInt(Math.random() * ctx.utils.int.bulge.length)];
Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace( Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace(
/1/g, /1/g,
@ -29,12 +35,6 @@ module.exports = class Bulge extends Command {
Line = undefined; Line = undefined;
} }
let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req; let req;
let Message; let Message;
await yiff.furrybot.nsfw.bulge().then((E) => (req = E)); await yiff.furrybot.nsfw.bulge().then((E) => (req = E));

View file

@ -25,7 +25,13 @@ module.exports = class Cuddle extends Command {
const Server = await ctx.db.servers.get(ctx.guild.id); const Server = await ctx.db.servers.get(ctx.guild.id);
let Line; let Line;
if (Server.rp_text) { let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
if (Settings.rp_text) {
const LineFromUtils = ctx.utils.int.cuddle[parseInt(Math.random() * ctx.utils.int.cuddle.length)]; const LineFromUtils = ctx.utils.int.cuddle[parseInt(Math.random() * ctx.utils.int.cuddle.length)];
Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace( Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace(
/1/g, /1/g,
@ -34,13 +40,6 @@ module.exports = class Cuddle extends Command {
} else { } else {
Line = undefined; Line = undefined;
} }
let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req; let req;
let Message; let Message;
await yiff.furrybot.sfw.cuddle().then((E) => (req = E)); await yiff.furrybot.sfw.cuddle().then((E) => (req = E));

View file

@ -25,7 +25,13 @@ module.exports = class Hold extends Command {
const Server = await ctx.db.servers.get(ctx.guild.id); const Server = await ctx.db.servers.get(ctx.guild.id);
let Line; let Line;
if (Server.rp_text) { let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
if (Settings.rp_text) {
const LineFromUtils = ctx.utils.int.hold[parseInt(Math.random() * ctx.utils.int.hold.length)]; const LineFromUtils = ctx.utils.int.hold[parseInt(Math.random() * ctx.utils.int.hold.length)];
Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace( Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace(
/1/g, /1/g,
@ -35,12 +41,6 @@ module.exports = class Hold extends Command {
Line = undefined; Line = undefined;
} }
let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req; let req;
let Message; let Message;
await yiff.furrybot.sfw.hold().then((E) => (req = E)); await yiff.furrybot.sfw.hold().then((E) => (req = E));

View file

@ -25,7 +25,13 @@ module.exports = class Hug extends Command {
const Server = await ctx.db.servers.get(ctx.guild.id); const Server = await ctx.db.servers.get(ctx.guild.id);
let Line; let Line;
let Settings;
if (Server === null) { if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
if (Settings.rp_text) {
const LineFromUtils = ctx.utils.int.hug[parseInt(Math.random() * ctx.utils.int.hug.length)]; const LineFromUtils = ctx.utils.int.hug[parseInt(Math.random() * ctx.utils.int.hug.length)];
Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace( Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace(
/1/g, /1/g,
@ -35,12 +41,6 @@ module.exports = class Hug extends Command {
Line = undefined; Line = undefined;
} }
let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req; let req;
let Message; let Message;
await yiff.furrybot.sfw.hug().then((E) => (req = E)); await yiff.furrybot.sfw.hug().then((E) => (req = E));

View file

@ -25,7 +25,13 @@ module.exports = class Kiss extends Command {
const Server = await ctx.db.servers.get(ctx.guild.id); const Server = await ctx.db.servers.get(ctx.guild.id);
let Line; let Line;
if (Server.rp_text) { let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
if (Settings.rp_text) {
const LineFromUtils = ctx.utils.int.kiss[parseInt(Math.random() * ctx.utils.int.kiss.length)]; const LineFromUtils = ctx.utils.int.kiss[parseInt(Math.random() * ctx.utils.int.kiss.length)];
Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace( Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace(
/1/g, /1/g,
@ -35,12 +41,6 @@ module.exports = class Kiss extends Command {
Line = undefined; Line = undefined;
} }
let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req; let req;
let Message; let Message;
await yiff.furrybot.sfw.kiss().then((E) => (req = E)); await yiff.furrybot.sfw.kiss().then((E) => (req = E));

View file

@ -24,7 +24,13 @@ module.exports = class Lick extends Command {
return ctx.send(`Don't you want to Lick someone other than yourself?`); return ctx.send(`Don't you want to Lick someone other than yourself?`);
const Server = await ctx.db.servers.get(ctx.guild.id); const Server = await ctx.db.servers.get(ctx.guild.id);
let Line; let Line;
if (Server.rp_text) { let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
if (Settings.rp_text) {
const LineFromUtils = ctx.utils.int.lick[parseInt(Math.random() * ctx.utils.int.lick.length)]; const LineFromUtils = ctx.utils.int.lick[parseInt(Math.random() * ctx.utils.int.lick.length)];
console.log(LineFromUtils); console.log(LineFromUtils);
Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace( Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace(
@ -35,12 +41,6 @@ module.exports = class Lick extends Command {
Line = undefined; Line = undefined;
} }
let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req; let req;
let Message; let Message;
await yiff.furrybot.sfw.lick().then((E) => (req = E)); await yiff.furrybot.sfw.lick().then((E) => (req = E));

View file

@ -25,7 +25,13 @@ module.exports = class nCuddle extends Command {
const Server = await ctx.db.servers.get(ctx.guild.id); const Server = await ctx.db.servers.get(ctx.guild.id);
let Line; let Line;
if (Server.rp_text) { let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
if (Settings.rp_text) {
const LineFromUtils = ctx.utils.int.cuddle[parseInt(Math.random() * ctx.utils.int.cuddle.length)]; const LineFromUtils = ctx.utils.int.cuddle[parseInt(Math.random() * ctx.utils.int.cuddle.length)];
Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace( Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace(
/1/g, /1/g,
@ -35,12 +41,6 @@ module.exports = class nCuddle extends Command {
Line = undefined; Line = undefined;
} }
let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req; let req;
let Message; let Message;
await yiff.furrybot.nsfw.cuddle().then((E) => (req = E)); await yiff.furrybot.nsfw.cuddle().then((E) => (req = E));

View file

@ -25,7 +25,13 @@ module.exports = class nHold extends Command {
const Server = await ctx.db.servers.get(ctx.guild.id); const Server = await ctx.db.servers.get(ctx.guild.id);
let Line; let Line;
if (Server.rp_text) { let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
if (Settings.rp_text) {
const LineFromUtils = ctx.utils.int.hold[parseInt(Math.random() * ctx.utils.int.hold.length)]; const LineFromUtils = ctx.utils.int.hold[parseInt(Math.random() * ctx.utils.int.hold.length)];
Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace( Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace(
/1/g, /1/g,
@ -35,12 +41,6 @@ module.exports = class nHold extends Command {
Line = undefined; Line = undefined;
} }
let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req; let req;
let Message; let Message;
await yiff.furrybot.nsfw.hold().then((E) => (req = E)); await yiff.furrybot.nsfw.hold().then((E) => (req = E));

View file

@ -24,7 +24,13 @@ module.exports = class nHug extends Command {
return ctx.send(`Don't you want to hug someone other than yourself?`); return ctx.send(`Don't you want to hug someone other than yourself?`);
let Line; let Line;
const Server = await ctx.db.servers.get(ctx.guild.id); const Server = await ctx.db.servers.get(ctx.guild.id);
if (Server.rp_text) { let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
if (Settings.rp_text) {
const LineFromUtils = ctx.utils.int.hug[parseInt(Math.random() * ctx.utils.int.hug.length)]; const LineFromUtils = ctx.utils.int.hug[parseInt(Math.random() * ctx.utils.int.hug.length)];
Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace( Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace(
/1/g, /1/g,
@ -34,12 +40,6 @@ module.exports = class nHug extends Command {
Line = undefined; Line = undefined;
} }
let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req; let req;
let Message; let Message;
await yiff.furrybot.nsfw.hug().then((E) => (req = E)); await yiff.furrybot.nsfw.hug().then((E) => (req = E));

View file

@ -24,7 +24,13 @@ module.exports = class nKiss extends Command {
return ctx.send(`Don't you want to kiss someone other than yourself?`); return ctx.send(`Don't you want to kiss someone other than yourself?`);
const Server = await ctx.db.servers.get(ctx.guild.id); const Server = await ctx.db.servers.get(ctx.guild.id);
let Line; let Line;
if (Server.rp_text) { let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
if (Settings.rp_text) {
const LineFromUtils = ctx.utils.int.kiss[parseInt(Math.random() * ctx.utils.int.kiss.length)]; const LineFromUtils = ctx.utils.int.kiss[parseInt(Math.random() * ctx.utils.int.kiss.length)];
Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace( Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace(
/1/g, /1/g,
@ -34,12 +40,6 @@ module.exports = class nKiss extends Command {
Line = undefined; Line = undefined;
} }
let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req; let req;
let Message; let Message;
await yiff.furrybot.nsfw.kiss().then((E) => (req = E)); await yiff.furrybot.nsfw.kiss().then((E) => (req = E));

View file

@ -24,7 +24,13 @@ module.exports = class nLick extends Command {
return ctx.send(`Don't you want to Lick someone other than yourself?`); return ctx.send(`Don't you want to Lick someone other than yourself?`);
const Server = await ctx.db.servers.get(ctx.guild.id); const Server = await ctx.db.servers.get(ctx.guild.id);
let Line; let Line;
if (Server.rp_text) { let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
if (Settings.rp_text) {
const LineFromUtils = ctx.utils.int.lick[parseInt(Math.random() * ctx.utils.int.lick.length)]; const LineFromUtils = ctx.utils.int.lick[parseInt(Math.random() * ctx.utils.int.lick.length)];
Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace( Line = LineFromUtils.replace(/0/g, ctx.utils.format.bold(ctx.author.username)).replace(
/1/g, /1/g,
@ -34,12 +40,6 @@ module.exports = class nLick extends Command {
Line = undefined; Line = undefined;
} }
let Settings;
if (Server === null) {
Settings = ctx.utils.db.defaults.server;
} else {
Settings = Server;
}
let req; let req;
let Message; let Message;
await yiff.furrybot.nsfw.lick().then((E) => (req = E)); await yiff.furrybot.nsfw.lick().then((E) => (req = E));

View file

@ -14,8 +14,6 @@ module.exports = class Prefix extends Command {
} }
async command(ctx) { async command(ctx) {
let PrefixEmbed = new ctx.utils.discord.MessageEmbed();
PrefixEmbed.setColor(ctx.config.color);
let ARG = ctx.args[0]; let ARG = ctx.args[0];
ctx.args.shift(); ctx.args.shift();
let Prefix = ctx.args.join(' '); let Prefix = ctx.args.join(' ');
@ -31,10 +29,12 @@ module.exports = class Prefix extends Command {
ctx.utils.db.prefix ctx.utils.db.prefix
.add(ctx, Prefix) .add(ctx, Prefix)
.then(async () => { .then(async () => {
let aPrefixEmbed = new ctx.utils.discord.MessageEmbed();
aPrefixEmbed.setColor(ctx.config.color);
let NServer = await ctx.db.servers.get(ctx.guild.id); let NServer = await ctx.db.servers.get(ctx.guild.id);
PrefixEmbed.setTitle(`Prefixes for ${ctx.guild.name}`); aPrefixEmbed.setTitle(`Prefixes for ${ctx.guild.name}`);
PrefixEmbed.setDescription(`${NServer.prefix.join(' | ') || ctx.db.defaults.server.prefix}`); aPrefixEmbed.setDescription(`${NServer.prefix.join(' | ') || ctx.config.prefixes}`);
ctx.send(PrefixEmbed); ctx.send(aPrefixEmbed);
}) })
.catch((err) => ctx.send(err)); .catch((err) => ctx.send(err));
break; break;
@ -45,11 +45,19 @@ module.exports = class Prefix extends Command {
.remove(ctx, Prefix) .remove(ctx, Prefix)
.then(async () => { .then(async () => {
let NServer = await ctx.db.servers.get(ctx.guild.id); let NServer = await ctx.db.servers.get(ctx.guild.id);
PrefixEmbed.setTitle(`Prefixes for ${ctx.guild.name}`); let rPrefixEmbed = new ctx.utils.discord.MessageEmbed();
PrefixEmbed.setDescription(`${NServer.prefix.join(' | ') || ctx.db.defaults.server.prefix}`); rPrefixEmbed.setColor(ctx.config.color);
ctx.send(PrefixEmbed); rPrefixEmbed.setTitle(`Prefixes for ${ctx.guild.name}`);
if (NServer.prefix === []) {
rPrefixEmbed.setDescription(ctx.config.prefixes.join(' **|**'));
} else {
rPrefixEmbed.setDescription(
`${NServer.prefix.join(' | ') || ctx.config.prefixes.join(' **|** ')}`
);
}
ctx.send(rPrefixEmbed);
}) })
.catch((err) => ctx.send(err)); .catch((err) => console.log(err));
break; break;
default: default:
PrefixEmbed.setTitle('Help'); PrefixEmbed.setTitle('Help');