Skip to content

Commit

Permalink
Update to Eris 0.10.1 to fix /serverinfo bug \o/
Browse files Browse the repository at this point in the history
Eris 0.10.1 includes my PR to support /serverinfo GIF server icons.
Also fixed bug where ban messages actually didn't work.
  • Loading branch information
retrixe committed Jul 18, 2019
1 parent 27b40df commit 25b6db7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 3 additions & 2 deletions server/bot/commands/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion server/bot/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 25b6db7

Please sign in to comment.