Use emoji API name

Signed-off-by: Etzelia <etzelia@hotmail.com>
rate-insult
Etzelia 2020-06-12 09:57:01 -05:00
parent ddfa449a30
commit 98391aeafd
No known key found for this signature in database
GPG Key ID: 3CAEB74806C4ADE5
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ func reactionRemoveHandler() func(s *discordgo.Session, m *discordgo.MessageReac
func reactionHandler(add bool, s *discordgo.Session, m *discordgo.MessageReaction) {
if _, ok := messageRoleMap[m.MessageID]; ok {
if r, ok := messageRoleMap[m.MessageID][m.Emoji.Name]; ok {
if r, ok := messageRoleMap[m.MessageID][m.Emoji.APIName()]; ok {
var roleCmd func(guildID, userID, roleID string) (err error)
if add {
roleCmd = s.GuildMemberRoleAdd