optimize reactions

This commit is contained in:
Skillz
2020-08-28 21:08:30 -04:00
parent 4f3e2214df
commit cefeb02171
+6
View File
@@ -75,6 +75,12 @@ export function addReaction(
throw new Error(Errors.MISSING_READ_MESSAGE_HISTORY); throw new Error(Errors.MISSING_READ_MESSAGE_HISTORY);
} }
if (reaction.startsWith("<:")) {
reaction = reaction.substring(2, reaction.length - 1);
} else if (reaction.startsWith("<a:")) {
reaction = reaction.substring(3, reaction.length - 1);
}
return RequestManager.put( return RequestManager.put(
endpoints.CHANNEL_MESSAGE_REACTION_ME( endpoints.CHANNEL_MESSAGE_REACTION_ME(
channelID, channelID,