refactor options to be more generic

This commit is contained in:
Aine
2022-08-23 21:58:05 +03:00
parent 9eec8738f9
commit e5e9be528b
8 changed files with 157 additions and 241 deletions

View File

@@ -31,11 +31,11 @@ func (b *Bot) handleCommand(ctx context.Context, evt *event.Event, command []str
case "help":
b.sendHelp(ctx, evt.RoomID)
case "owner":
b.handleOwner(ctx, evt, command)
b.handleOption(ctx, evt, command)
case "mailbox":
b.handleMailbox(ctx, evt, command)
b.handleOption(ctx, evt, command)
case "nosender":
b.handleNoSender(ctx, evt, command)
b.handleOption(ctx, evt, command)
}
}