diff options
| author | max2323madcity <[email protected]> | 2024-11-21 17:50:28 +0000 |
|---|---|---|
| committer | max2323madcity <[email protected]> | 2024-11-21 17:50:28 +0000 |
| commit | c30fcaf5acbd511680d4adce362f55b7bbb62977 (patch) | |
| tree | a849db7c957913d9e63863eea0e170fdb66c0656 /handlers/messageHandlers/poketwoHandler.go | |
| parent | eb1cd6e687a0dc50b3c58ddea422b0973a2d97da (diff) | |
| download | yuzaki-c30fcaf5acbd511680d4adce362f55b7bbb62977.tar.xz yuzaki-c30fcaf5acbd511680d4adce362f55b7bbb62977.zip | |
trails
Diffstat (limited to 'handlers/messageHandlers/poketwoHandler.go')
| -rw-r--r-- | handlers/messageHandlers/poketwoHandler.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/handlers/messageHandlers/poketwoHandler.go b/handlers/messageHandlers/poketwoHandler.go index 3ceb83b..0e108f5 100644 --- a/handlers/messageHandlers/poketwoHandler.go +++ b/handlers/messageHandlers/poketwoHandler.go @@ -20,12 +20,13 @@ func PoketwoHandler(s *discordgo.Session, m *discordgo.MessageCreate) { } return } - if isPoketwoCommand(m) && !isAllowed { handleUnauthorizedCommand(s, m) } } + + func isPoketwoCommand(m *discordgo.MessageCreate) bool { return strings.HasPrefix(strings.ToLower(m.Content), "p!") || (len(m.Mentions) > 0 && m.Mentions[0].ID == poketwoID) |
