Eris update

merge-requests/1/merge
Bsian 2019-12-09 10:07:59 +00:00
parent ba71d2ebdf
commit 1d3e6ce811
No known key found for this signature in database
GPG Key ID: 097FB9A291026091
3 changed files with 5 additions and 5 deletions

View File

@ -14,7 +14,7 @@
"@ghaiklor/x509": "^1.0.0", "@ghaiklor/x509": "^1.0.0",
"axios": "^0.19.0", "axios": "^0.19.0",
"body-parser": "^1.19.0", "body-parser": "^1.19.0",
"eris": "^0.10.1", "eris": "abalabahaha/eris#dev",
"eris-pagination": "bsian03/eris-pagination", "eris-pagination": "bsian03/eris-pagination",
"express": "^4.17.1", "express": "^4.17.1",
"fs-extra": "^8.1.0", "fs-extra": "^8.1.0",

View File

@ -2,7 +2,7 @@
import { promisify } from 'util'; import { promisify } from 'util';
import childProcess from 'child_process'; import childProcess from 'child_process';
import nodemailer from 'nodemailer'; 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 uuid from 'uuid/v4';
import moment from 'moment'; import moment from 'moment';
import fs from 'fs'; import fs from 'fs';
@ -78,7 +78,7 @@ export default class Util {
embed.addField('User', `${message.author.mention} (\`${message.author.id}\`)`, true); embed.addField('User', `${message.author.mention} (\`${message.author.id}\`)`, true);
embed.addField('Channel', message.channel.mention, true); embed.addField('Channel', message.channel.mention, true);
let guild: string; 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; else guild = message.channel.guild.id;
embed.addField('Message link', `[Click here](https://discordapp.com/channels/${guild}/${message.channel.id}/${message.id})`, true); embed.addField('Message link', `[Click here](https://discordapp.com/channels/${guild}/${message.channel.id}/${message.id})`, true);
embed.setTimestamp(new Date(message.timestamp)); embed.setTimestamp(new Date(message.timestamp));

View File

@ -1,4 +1,4 @@
import { Message, PrivateChannel } from 'eris'; import { Message, PrivateChannel, GroupChannel } from 'eris';
import uuid from 'uuid/v4'; import uuid from 'uuid/v4';
import { Client } from '..'; import { Client } from '..';
import { Command, RichEmbed } from '../class'; import { Command, RichEmbed } from '../class';
@ -22,7 +22,7 @@ export default class CreateAccount extends Command {
public async run(message: Message, args: string[]) { public async run(message: Message, args: string[]) {
try { 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 (!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.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***`); if (message.channel.guild.members.get(args[0]).bot) return message.channel.createMessage(`${this.client.stores.emojis.error} ***I cannot create accounts for bots***`);