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