diff options
Diffstat (limited to 'crystal/lib')
-rw-r--r-- | crystal/lib/bungmobott/src/bungmobott.cr | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/crystal/lib/bungmobott/src/bungmobott.cr b/crystal/lib/bungmobott/src/bungmobott.cr index 4fdb9d2..3df034f 100644 --- a/crystal/lib/bungmobott/src/bungmobott.cr +++ b/crystal/lib/bungmobott/src/bungmobott.cr @@ -13,11 +13,15 @@ #chat_user: # twitch: bungmonkey # gamesurge: bungmoBott +#match: +# '^gamesurge|twitch$' +# '^#bungmonkey$' +# '^!help$': [ { perm: [ any ], func: say, arg: ['| https://bungmonkey.omgwallhack.org/txt/commands.txt'] } ] module BungmoBott EXE = "bungmobott" - + class ChatUser include YAML::Serializable include YAML::Serializable::Unmapped @@ -49,7 +53,7 @@ module BungmoBott property twitch : Array(String)? property gamesurge : Array(String)? end - + class Config include YAML::Serializable include YAML::Serializable::Unmapped @@ -74,7 +78,10 @@ module BungmoBott property obs_connect : String? = nil property chat_user : ChatUser? = ChatUser.from_yaml("---") property join_channels : JoinChannels? = JoinChannels.from_yaml("---") - property commands : Hash( String, Array( Commands ) )? = nil + property match : Hash( String, # network regex + Hash( String, # channel regex + Hash( String, # text regex + Array( Commands ) ) ) )? @[YAML::Field(emit_null: true)] property twitch_user_id : UInt32? = nil @[YAML::Field(emit_null: true)] |