diff --git a/src/lib/Twitch2Ma.ts b/src/lib/Twitch2Ma.ts index 39388c7..3c73c7c 100644 --- a/src/lib/Twitch2Ma.ts +++ b/src/lib/Twitch2Ma.ts @@ -117,7 +117,7 @@ export default class Twitch2Ma extends EventEmitter { async handleMessage(channel: string, user: string, message: string, rawMessage: TwitchPrivateMessage) { - let raw = message.match(/!([a-zA-Z0-9]+)( !?([a-zA-Z0-9]+))?/); + let raw = message.match(/!([a-zA-Z0-9-]+)( !?([a-zA-Z0-9-]+))?/); if (_.isArray(raw)) { let chatCommand = raw[1]; diff --git a/src/resources/config.schema.json b/src/resources/config.schema.json index 6c9b3c6..87431b6 100644 --- a/src/resources/config.schema.json +++ b/src/resources/config.schema.json @@ -72,7 +72,7 @@ "chatCommand": { "description": "The command viewers need to use in chat without '!'. The command 'lights' is reserved for viewer help. ", "type": "string", - "pattern": "^((?!\\b[lL][iI][gG][hH][tT][sS]\\b)[a-zA-Z0-9])+$" + "pattern": "^((?!\\b[lL][iI][gG][hH][tT][sS]\\b)[a-zA-Z0-9-])+$" }, "consoleCommand": { "description": "The command that gets executed on the desk.", @@ -95,7 +95,7 @@ "parameter": { "description": "The parameter to append to the command.", "type": "string", - "pattern": "^[a-zA-Z0-9]+$" + "pattern": "^[a-zA-Z0-9-]+$" }, "consoleCommand": { "description": "The command that gets executed on the desk when using the parameter.",