diff --git a/src/commands/cwg.ts b/src/commands/cwg.ts index 593f531..5b2df4f 100644 --- a/src/commands/cwg.ts +++ b/src/commands/cwg.ts @@ -16,6 +16,7 @@ export default class CWG extends Command { } public async run(message: Message, args?: string[]) { + if (!args.length) return this.client.commands.get('help').run(message, [this.name]); /* args[1] should be the user's ID OR account username; required args[2] should be the domain; required diff --git a/src/commands/lock.ts b/src/commands/lock.ts index f1ad4e7..e9b7d89 100644 --- a/src/commands/lock.ts +++ b/src/commands/lock.ts @@ -16,6 +16,7 @@ export default class Lock extends Command { public async run(message: Message, args: string[]) { // eslint-disable-line try { + if (!args.length) return this.client.commands.get('help').run(message, [this.name]); const account = await this.client.db.Account.findOne({ $or: [{ account: args[0] }, { userID: args[0].replace(/[<@!>]/gi, '') }] }); if (!account) return message.channel.createMessage(`***${this.client.stores.emojis.error} Cannot find user.***`); if (account.locked) return message.channel.createMessage(`***${this.client.stores.emojis.error} This account is already locked.***`); diff --git a/src/commands/modlogs.ts b/src/commands/modlogs.ts index b21a36e..d62e46e 100644 --- a/src/commands/modlogs.ts +++ b/src/commands/modlogs.ts @@ -16,6 +16,7 @@ export default class Modlogs extends Command { public async run(message: Message, args: string[]) { try { + if (!args.length) return this.client.commands.get('help').run(message, [this.name]); const msg: Message = await message.channel.createMessage(`***${this.client.stores.emojis.loading} Locating modlogs...***`); const query = await this.client.db.Moderation.find({ $or: [{ username: args.join(' ') }, { userID: args.filter((a) => a)[0].replace(/[<@!>]/g, '') }] }); if (!query.length) return msg.edit(`***${this.client.stores.emojis.error} Cannot locate modlogs for ${args.join(' ')}***`); diff --git a/src/commands/sysinfo.ts b/src/commands/sysinfo.ts index be7601c..3f880a2 100644 --- a/src/commands/sysinfo.ts +++ b/src/commands/sysinfo.ts @@ -27,7 +27,7 @@ export default class SysInfo extends Command { embed.addField('Load Average (last 15 minutes)', os.loadavg()[2].toFixed(3), true); embed.addField('Memory/RAM', `${usedMemory} / ${dataConversion(totalmem())}`, true); embed.addField('Network Interfaces (IPv4)', os.networkInterfaces().eth0.filter((r) => r.family === 'IPv4')[0].address, true); - embed.addField('Network Interfaces (IPv6)', os.networkInterfaces().eth0.filter((r) => r.family === 'IPv6')[0].address, true); + embed.addField('Network Interfaces (IPv6)', os.networkInterfaces().eth0.filter((r) => r.family === 'IPv6')[0].address.replace(/:/gi, '\:'), true); // eslint-disable-line embed.setFooter(this.client.user.username, this.client.user.avatarURL); embed.setTimestamp(); // @ts-ignore diff --git a/src/commands/unlock.ts b/src/commands/unlock.ts index b16a9d8..5174282 100644 --- a/src/commands/unlock.ts +++ b/src/commands/unlock.ts @@ -14,6 +14,7 @@ export default class Unlock extends Command { public async run(message: Message, args: string[]) { // eslint-disable-line try { + if (!args.length) return this.client.commands.get('help').run(message, [this.name]); const account = await this.client.db.Account.findOne({ $or: [{ account: args[0] }, { userID: args[0].replace(/[<@!>]/gi, '') }] }); if (!account) return message.channel.createMessage(`***${this.client.stores.emojis.error} Cannot find user.***`); if (!account.locked) return message.channel.createMessage(`***${this.client.stores.emojis.error} This account is already unlocked.***`);