Import from github and add cbb support
This commit is contained in:
@ -2,7 +2,8 @@ package bot
|
||||
|
||||
import (
|
||||
"discord-cfb-bot/config"
|
||||
"discord-cfb-bot/internal/clients"
|
||||
cfbClient "git.ewnix.net/phlux/discord-cfb-bot/internal/clients/cfb"
|
||||
cbbClient "git.ewnix.net/discord-cfb-bot/internal/clients/cbb"
|
||||
"github.com/bwmarrin/discordgo"
|
||||
"fmt"
|
||||
"strings"
|
||||
@ -35,7 +36,13 @@ func commandHandler(s *discordgo.Session, m *discordgo.MessageCreate) {
|
||||
|
||||
if strings.HasPrefix(m.Content, "!cfb ") {
|
||||
teamName := strings.TrimSpace(strings.TrimPrefix(m.Content, "!cfb "))
|
||||
response := cfb.GetGameInfo(teamName)
|
||||
response := cfbClient.GetGameInfo(teamName)
|
||||
s.ChannelMessageSend(m.ChannelID, response)
|
||||
}
|
||||
|
||||
if strings.HasPrefix(m.Content, "!cbb ") {
|
||||
teamName := strings.TrimSpace(strings.TrimPrefix(m.Content, "!cbb "))
|
||||
response := cbbClient.GetGameInfo(teamName)
|
||||
s.ChannelMessageSend(m.ChannelID, response)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user