package commands import ( "strings" "github.com/bwmarrin/discordgo" "gitea.teamortix.com/chanbakjsd/Milen/util" ) var ( CommonReplacement map[string]string Macro map[string]string ) func handleMacro(dg *discordgo.Session, m *discordgo.MessageCreate, split []string) { for k, _ := range split { split[k] = strings.ToLower(split[k]) if val, ok := CommonReplacement[split[k]]; ok { split[k] = val } } full := strings.Join(split, " ") for k, v := range Macro { if k == full { util.SendMessage(dg, m.ChannelID, v) return } } }