expose config setting in info
This commit is contained in:
parent
82f0d7af58
commit
47c9142763
6
main.go
6
main.go
@ -77,7 +77,11 @@ func main() {
|
||||
var infomsg string
|
||||
vlist := []string{}
|
||||
for _, vt := range vtubers {
|
||||
vlist = append(vlist, vt.Name)
|
||||
ann := ""
|
||||
if vt.AnnounceLive {
|
||||
ann = "*"
|
||||
}
|
||||
vlist = append(vlist, fmt.Sprintf("%v%v", vt.Name, ann))
|
||||
}
|
||||
infomsg = fmt.Sprintf("Currently Simping For: \n%v", strings.Join(vlist, "\n"))
|
||||
client.SendText(evt.RoomID, infomsg)
|
||||
|
@ -14,6 +14,7 @@ type VtuberConfig struct {
|
||||
Name string `mapstructure:"name"`
|
||||
ChannelID string `mapstructure:"channelid"`
|
||||
LiveMsg string `mapstructure:"msg"`
|
||||
Announce bool `mapstructure:"Announce"`
|
||||
}
|
||||
|
||||
type Vtuber struct {
|
||||
@ -45,7 +46,7 @@ func LoadVtubers() []*Vtuber {
|
||||
}
|
||||
for _, vt := range vtubersRaw {
|
||||
log.Printf("adding vtuber %v", vt)
|
||||
vtubers = append(vtubers, NewVtuber(vt.Name, vt.ChannelID, vt.LiveMsg))
|
||||
vtubers = append(vtubers, NewVtuber(vt.Name, vt.ChannelID, vt.LiveMsg, vt.Announce))
|
||||
}
|
||||
return vtubers
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user