Refactor bot command invocation
This commit is contained in:
17
bots/discord/commands/AnimeList.go
Normal file
17
bots/discord/commands/AnimeList.go
Normal file
@ -0,0 +1,17 @@
|
||||
package commands
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/bwmarrin/discordgo"
|
||||
)
|
||||
|
||||
// AnimeList shows the link for the anime list of a user.
|
||||
func AnimeList(s *discordgo.Session, msg *discordgo.MessageCreate) bool {
|
||||
if strings.HasPrefix(msg.Content, "!animelist ") {
|
||||
return false
|
||||
}
|
||||
|
||||
s.ChannelMessageSend(msg.ChannelID, "https://notify.moe/+"+strings.Split(msg.Content, " ")[1]+"/animelist/watching")
|
||||
return true
|
||||
}
|
Reference in New Issue
Block a user