Skip to content

Commit

Permalink
fix: Don't always return emote count when trading.
Browse files Browse the repository at this point in the history
  • Loading branch information
KararTY committed Aug 17, 2021
1 parent 637d9c8 commit 421febd
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions app/Services/Handlers/GiveEmotesHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,10 @@ export default class GiveEmotesHandler extends DefaultHandler {
data.emotes = sentEmotes

data.result = {
value: `you gave: ${sentEmotes.map(e => `x${e.amount} ${e.name}`).join(' ')}` +
value: `you gave: ${sentEmotes.map(e => `${(e.amount || 1) > 1 ? `x${e.amount} ` : ''}${e.name}`).join(' ')}` +
` to ${data.recipientUserTwitch.name}!`,
}

socket.send(this.ws.socketMessage(MessageType.GIVEEMOTES, JSON.stringify(data)))

// Attempted to match. Must wait for receiving end.
// data.result = {
// value: `you've sent ${sentEmotes.map(res => res.amount ?? 0).flat(1).join('')} emotes to user ${}.`,
// }

// socket.send(this.ws.socketMessage(MessageType.MATCH, JSON.stringify(data)))
}
}

0 comments on commit 421febd

Please sign in to comment.