Fix command ads
This commit is contained in:
14
main.go
14
main.go
@ -32,12 +32,20 @@ func main() {
|
||||
ChatHandler: &chat,
|
||||
}
|
||||
setupCommands()
|
||||
var adCmds []chat1.UserBotCommandInput
|
||||
for _, v := range commands {
|
||||
adCmds = append(adCmds, v.Advert.Commands...)
|
||||
}
|
||||
ads := chat1.AdvertiseCommandAPIParam{
|
||||
Typ: "public",
|
||||
Commands: adCmds,
|
||||
}
|
||||
|
||||
cmds := keybase.AdvertiseCommandsOptions{
|
||||
Alias: "Tesla Bot",
|
||||
Advertisements: []chat1.AdvertiseCommandAPIParam{ads},
|
||||
}
|
||||
for _, v := range commands {
|
||||
cmds.Advertisements = append(cmds.Advertisements, v.Advert)
|
||||
}
|
||||
|
||||
k.AdvertiseCommands(cmds)
|
||||
k.Run(handlers, &keybase.RunOptions{})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user