diff options
| -rw-r--r-- | discord/ilo-kesi/main.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/discord/ilo-kesi/main.go b/discord/ilo-kesi/main.go index 251b0a4..6d9f487 100644 --- a/discord/ilo-kesi/main.go +++ b/discord/ilo-kesi/main.go @@ -8,6 +8,7 @@ import ( "net/http" "os" "os/signal" + "regexp" "syscall" "time" @@ -37,6 +38,8 @@ func init() { rand.Seed(time.Now().UnixNano()) } +var mentionRex = regexp.MustCompile(`<((@!?\d+)|(:.+?:\d+))>`) + func main() { flag.Parse() internal.HandleLicense() @@ -97,7 +100,7 @@ func main() { return } - s.ChannelMessageSend(m.ChannelID, chain.Generate(15)) + s.ChannelMessageSend(m.ChannelID, mentionRex.ReplaceAllString(chain.Generate(15), "<narvi'a>")) } mc := func(s *discordgo.Session, m *discordgo.MessageCreate) { |
