2Bot / 2Bot-Discord-Bot

Strum355's home-grown Discord Bot using Discordgo | Check dev branch for latest commits
GNU Affero General Public License v3.0
24 stars 3 forks source link

bigMoji command does not send emoji #20

Closed silvia-odwyer closed 6 years ago

silvia-odwyer commented 6 years ago

2Bot's command checking functionality is case sensitive, so that if I type bigMoji, 2Bot doesn't recognise that command, while it does recognise bigmoji. !owo bigMoji :eyes: does nothing so far, while !owo bigmoji :eyes: does indeed send the eyes.

Strum355 commented 6 years ago

clarification: command checking itself is case insensitive. the bigmoji command is a special case, for some reason this one isnt being treated like that :thinking:

silvia-odwyer commented 6 years ago

Ah, so it's only case sensitive for that special case then. I saw in your msgEmoji.go code on Line 62 that you're getting the user's typed emoji only if the first word of msglist is bigmoji. I dunno if ORring that with a bigMoji would help, so that Line 62 would read if msglist[0] == "bigmoji" || msglist[0] == "bigMoji". I dunno if that would fix it though, cos maybe msgEmoji.go isn't getting called in the first place.

Line 62 and onwards, as it is currently:


if msglist[0] == "bigmoji" {
    if len(msglist) < 2 {
        return
    }
    emoji = msglist[1]
    } else {
        emoji = msglist[0]
}
Strum355 commented 6 years ago

Welp that seems about right :stuck_out_tongue_closed_eyes: if you want you can submit a quick PR for that