delete message containing command after processing it
This commit is contained in:
@ -3,7 +3,6 @@ package core
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"log"
|
||||
"math/rand"
|
||||
"sort"
|
||||
"strings"
|
||||
@ -81,6 +80,9 @@ func MessageHandler(s *discordgo.Session, m *discordgo.MessageCreate) {
|
||||
}
|
||||
var message string = strings.TrimPrefix(m.Content, alias)
|
||||
CommandRegister[alias].command(s, m, message)
|
||||
|
||||
// delete the receveid command after processing it. less clutter
|
||||
s.ChannelMessageDelete(m.ChannelID, m.ID)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user