diff --git a/package.json b/package.json index 8ecfaa9..deda7fd 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@material-ui/core": "^3.0.1", "@material-ui/icons": "^3.0.1", "apollo-boost": "^0.1.4", - "eris": "^0.10.0", + "eris": "^0.10.1", "graphql": "^14.0.2", "graphql-yoga": "^1.16.7", "isomorphic-unfetch": "^2.0.0", diff --git a/server/bot/commands/utilities.ts b/server/bot/commands/utilities.ts index 627379a..ff4b0b4 100644 --- a/server/bot/commands/utilities.ts +++ b/server/bot/commands/utilities.ts @@ -287,12 +287,13 @@ export const handleAvatar: Command = { let user: Message['author'] = getUser(message, args.join(' ')) || message.author if (!user && message.mentions.length !== 0) user = message.mentions[0] const member = message.member.guild.members.get(user.id) + const format = user.avatar.startsWith('a_') ? 'gif' : 'png' return { content: '**Avatar:**', embed: { author: { name: `${user.username}#${user.discriminator}`, icon_url: user.avatarURL }, - image: { url: user.dynamicAvatarURL('png', 2048) }, - description: `**[Link](${user.dynamicAvatarURL('png', 2048)})**`, + image: { url: user.dynamicAvatarURL(format, 2048) }, + description: `**[Link](${user.dynamicAvatarURL(format, 2048)})**`, color: member.roles.map(i => member.guild.roles.get(i)).sort( (a, b) => a.position > b.position ? -1 : 1 ).shift().color diff --git a/server/bot/index.ts b/server/bot/index.ts index c2b714b..92cb816 100644 --- a/server/bot/index.ts +++ b/server/bot/index.ts @@ -58,7 +58,7 @@ export const guildMemberRemove = (client: Client, db: Db) => async ( const { leaveMessage, channel, banMessage } = serverSettings.joinLeaveMessages if (!channel || !leaveMessage) return // If there is a ban message and the user is banned. - if (banMessage && (await guild.getBans()).find(i => i.id === member.user.id)) return + if (banMessage && (await guild.getBans()).find(i => i.user.id === member.user.id)) return // We send a message. try { const toSend = leaveMessage diff --git a/yarn.lock b/yarn.lock index 4163f6f..dedc082 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2726,10 +2726,10 @@ enhanced-resolve@^4.1.0: memory-fs "^0.4.0" tapable "^1.0.0" -eris@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/eris/-/eris-0.10.0.tgz#cfc3ba5721fe3c116e4f3dac5a2bb07b00ff7558" - integrity sha512-xAvmD4wsE5mwuiP+wy8RiarjiuwCylSsglKqru4J4sk0/WGOnSOfEZf43YLx/TcF4J1D4B2VMTq38446Bk1x1Q== +eris@^0.10.1: + version "0.10.1" + resolved "https://registry.yarnpkg.com/eris/-/eris-0.10.1.tgz#1ecc13ff06d45edb86c344b70ec2dd2e7ef270df" + integrity sha512-POWCQ91xmG75U5V3i2bAvh/hco+HkgF+YJzerTcULe++AgKutA4l1adxqUrJ13Nxah/O+olkkQCufO+gQoawtA== dependencies: ws "^6.0.0" optionalDependencies: