make !pm relay recognize the reset option
This commit is contained in:
parent
255d8a446a
commit
4f33e7eb8d
1 changed files with 4 additions and 0 deletions
|
|
@ -207,6 +207,10 @@ func (b *Bot) setRelay(ctx context.Context) {
|
|||
}
|
||||
|
||||
value := b.parseCommand(evt.Content.AsMessage().Body, false)[1] // get original value, without forced lower case
|
||||
if value == "reset" {
|
||||
value = ""
|
||||
}
|
||||
|
||||
cfg.Set(config.RoomRelay, value)
|
||||
err = b.cfg.SetRoom(ctx, evt.RoomID, cfg)
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue