commit eeb4e2d40015b027d28c11aa0fd05399a09c6960
parent 3ff8417955a50ff5edf39405b76fd8b70332e18e
Author: Demonstrandum <moi@knutsen.co>
Date: Wed, 18 Mar 2020 21:20:24 +0000
Fix ship.ts
Diffstat:
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/lib/commands/ship.ts b/lib/commands/ship.ts
@@ -1,19 +1,25 @@
-import { FORMATS } from '.././extensions';
+import { FORMATS } from '../extensions';
+import { Message } from 'discord.js';
export default home_scope => {
- const { message, args, HELP_SECTIONS, KNOWN_COMMANDS } = home_scope;
+ const { message, args,
+ HELP_SECTIONS,
+ KNOWN_COMMANDS }
+ : { message: Message, args: string[],
+ HELP_SECTIONS: string[],
+ KNOWN_COMMANDS: string[] } = home_scope;
if (args.length === 0 || args[0] == 'help' ||
- message.mentions.users.length === 0 ||
- message.mentions.users.length > 2)
+ message.mentions.users.size === 0 ||
+ message.mentions.users.size > 2)
{
message.channel.send(HELP_SECTIONS[KNOWN_COMMANDS.indexOf('ship')].trim());
return;
}
let userAvatars = {
- first: message.mentions.users.length === 1
- ? message.author.displayAvatarURL()
+ first: message.mentions.users.size === 1
+ ? message.author.displayAvatarURL
: message.mentions.users[0],
second: message.mentions.users[1].displayAvatarURL()
};