Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c55d5b3d07 | |||
| 45a34a1b5b |
@ -1,12 +1,12 @@
|
||||
package config
|
||||
|
||||
var BotToken = "MTMwMDU3NjEzNTkzMDk3MDI2NA.GuRb2j.1C-wvihlNPCPWz1SXeEmeZcONJNUIirkxgTWW8"
|
||||
var BotToken = "YOUR_TOKEN"
|
||||
|
||||
var CustomTeamNames = map[string]string{
|
||||
"UGA": "Georgia",
|
||||
"Booger Eaters": "Auburn",
|
||||
"Rape Enablers": "LSU",
|
||||
"Checkerboard Clowns": "Tennessee",
|
||||
"uga": "Georgia",
|
||||
"booger eaters": "Auburn",
|
||||
"rape enablers": "LSU",
|
||||
"checkerboard clowns": "Tennessee",
|
||||
}
|
||||
|
||||
func LoadConfig() {
|
||||
|
||||
@ -10,6 +10,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
"unicode"
|
||||
"discord-scores-bot/config"
|
||||
)
|
||||
|
||||
type Game struct {
|
||||
@ -36,8 +37,14 @@ type Team struct {
|
||||
}
|
||||
|
||||
func GetGameInfo(teamName string) string {
|
||||
teamName = strings.TrimSpace(teamName)
|
||||
teamName = strings.TrimSpace(strings.ToLower(teamName))
|
||||
week := ""
|
||||
|
||||
// Check if the teamName matches a custom name and replace if found
|
||||
if customName, exists := config.CustomTeamNames[teamName]; exists {
|
||||
log.Printf("Custom team name detected: %s -> %s", teamName, customName)
|
||||
teamName = customName
|
||||
}
|
||||
|
||||
// Check if the last two characters of the input are integers for the week
|
||||
if len(teamName) >= 2 && unicode.IsDigit(rune(teamName[len(teamName)-1])) && unicode.IsDigit(rune(teamName[len(teamName)-2])) {
|
||||
|
||||
Reference in New Issue
Block a user