remove unwanted from help, only print !zip or !state as configured
parent
56f7d093ef
commit
bd9dca9766
6
main.go
6
main.go
|
|
@ -82,7 +82,11 @@ func matrixrecv() error {
|
|||
if !printed {
|
||||
if _, err := db.Get(key); err == storage.ErrNotFound {
|
||||
logtr.Debugf("sending help")
|
||||
help := fmt.Sprintf("commands:\n...`!help` print this help\n...`!zip 27006 84058` to set zip codes for self\n...`!state nc NC nC Nc` set states for self\n...`!available 2022-12-31` set date self is available for work\n\nrun a command for someone else: `!state ga @caleb`")
|
||||
locationHelp := "`!state nc NC nC Nc` set states for self"
|
||||
if config.Get().Brokers.UseZips {
|
||||
locationHelp = "`!zip 27006 84058` to set zip codes for self"
|
||||
}
|
||||
help := fmt.Sprintf("commands:\n...`!help` print this help\n...%s\n\nrun a command for someone else: `!zip 2022-12-31 @caleb`", locationHelp)
|
||||
if err := sender.Send(help); err != nil {
|
||||
logtr.Errorf("failed to send help: %v", err)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue