Implement the command parser
Right now this just supports help and version, but will be getting new commands shortly.
This commit is contained in:
@@ -8,6 +8,8 @@ import (
|
||||
type bridge struct {
|
||||
UsernameTemplate string `yaml:"username_template"`
|
||||
|
||||
CommandPrefix string `yaml:"command_prefix"`
|
||||
|
||||
ManagementRoomText managementRoomText `yaml:"management_root_text"`
|
||||
|
||||
PortalMessageBuffer int `yaml:"portal_message_buffer"`
|
||||
@@ -31,6 +33,10 @@ func (b *bridge) validate() error {
|
||||
return err
|
||||
}
|
||||
|
||||
if b.CommandPrefix == "" {
|
||||
b.CommandPrefix = "!dis"
|
||||
}
|
||||
|
||||
if err := b.ManagementRoomText.validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user