Skip to content

Commit

Permalink
feat: Use dashes in commands and parameters (#6)
Browse files Browse the repository at this point in the history
* Update config.schema.json

* Update Twitch2Ma.ts
  • Loading branch information
kevyn-raw authored Jun 9, 2020
1 parent 5a773ea commit a570c1d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/lib/Twitch2Ma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
4 changes: 2 additions & 2 deletions src/resources/config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand All @@ -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.",
Expand Down

0 comments on commit a570c1d

Please sign in to comment.