diff --git a/package.json b/package.json index ad00d84..fd6125c 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "@ghaiklor/x509": "^1.0.0", "axios": "^0.19.0", "body-parser": "^1.19.0", - "eris": "^0.10.1", + "eris": "abalabahaha/eris#dev", "eris-pagination": "bsian03/eris-pagination", "express": "^4.17.1", "fs-extra": "^8.1.0", diff --git a/src/class/Util.ts b/src/class/Util.ts index adc5aa0..1f7481f 100644 --- a/src/class/Util.ts +++ b/src/class/Util.ts @@ -2,7 +2,7 @@ import { promisify } from 'util'; import childProcess from 'child_process'; import nodemailer from 'nodemailer'; -import { Message, PrivateChannel, Member, User } from 'eris'; +import { Message, PrivateChannel, GroupChannel, Member, User } from 'eris'; import uuid from 'uuid/v4'; import moment from 'moment'; import fs from 'fs'; @@ -78,7 +78,7 @@ export default class Util { embed.addField('User', `${message.author.mention} (\`${message.author.id}\`)`, true); embed.addField('Channel', message.channel.mention, true); let guild: string; - if (message.channel instanceof PrivateChannel) guild = '@me'; + if (message.channel instanceof PrivateChannel || message.channel instanceof GroupChannel) guild = '@me'; else guild = message.channel.guild.id; embed.addField('Message link', `[Click here](https://discordapp.com/channels/${guild}/${message.channel.id}/${message.id})`, true); embed.setTimestamp(new Date(message.timestamp)); diff --git a/src/commands/createaccount.ts b/src/commands/createaccount.ts index aff9360..e45e86e 100644 --- a/src/commands/createaccount.ts +++ b/src/commands/createaccount.ts @@ -1,4 +1,4 @@ -import { Message, PrivateChannel } from 'eris'; +import { Message, PrivateChannel, GroupChannel } from 'eris'; import uuid from 'uuid/v4'; import { Client } from '..'; import { Command, RichEmbed } from '../class'; @@ -22,7 +22,7 @@ export default class CreateAccount extends Command { public async run(message: Message, args: string[]) { try { - if (message.channel instanceof PrivateChannel) return message; // Stop TS being gay + if (message.channel instanceof PrivateChannel || message.channel instanceof GroupChannel) return message; // Stop TS being gay if (!args[2]) return this.client.commands.get('help').run(message, [this.name]); if (!message.channel.guild.members.has(args[0])) return message.channel.createMessage(`${this.client.stores.emojis.error} ***User not found***`); if (message.channel.guild.members.get(args[0]).bot) return message.channel.createMessage(`${this.client.stores.emojis.error} ***I cannot create accounts for bots***`);