@@ -49,6 +49,11 @@ var add = Command{
4949 targetChannelName = message .Channel
5050 }
5151
52+ var as string
53+ if alias , found := parsedArgs .Named ["as" ]; found {
54+ as = alias
55+ }
56+
5257 res , err := twitchapi .GetUserByName (message .Cfg , targetChannelName )
5358 if err != nil || len (res ) == 0 {
5459 msg := message .Localizer .MustLocalize (& i18n.LocalizeConfig {
@@ -107,12 +112,19 @@ var add = Command{
107112 errorEmotes []string
108113 )
109114 for _ , emote := range parsedArgs .Positional {
110- err = seventvapi .AddEmoteWithQuery ("https://7tv.io" , targetChannel .ID , emote , message .Cfg .SevenTVToken )
115+ var alias string
116+ if len (parsedArgs .Positional ) == 1 && as != "" {
117+ alias = as
118+ } else {
119+ alias = emote
120+ }
121+
122+ err = seventvapi .AddEmoteWithQuery ("https://7tv.io" , targetChannel .ID , emote , alias , message .Cfg .SevenTVToken )
111123 if _ , found := activeSetEmotes [emote ]; err != nil || found {
112124 errorEmotes = append (errorEmotes , emote )
113125 continue
114126 }
115- addedEmotes = append (addedEmotes , emote )
127+ addedEmotes = append (addedEmotes , alias )
116128 }
117129
118130 var reply string
@@ -129,7 +141,7 @@ var add = Command{
129141 "Emotes" : strings .Join (errorEmotes , " " ),
130142 },
131143 })
132- reply += msg
144+ reply += msg + ". "
133145 }
134146 if len (addedEmotes ) > 0 {
135147 msg := message .Localizer .MustLocalize (& i18n.LocalizeConfig {
0 commit comments