From d34b30abf76d573bd938cfd8e1d5176df7643fcd Mon Sep 17 00:00:00 2001 From: choelzl Date: Wed, 9 Feb 2022 04:48:58 +0100 Subject: [PATCH] WIP --- twitch/chatguessr.js | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/twitch/chatguessr.js b/twitch/chatguessr.js index ac5a0a0..d55aeac 100644 --- a/twitch/chatguessr.js +++ b/twitch/chatguessr.js @@ -138,8 +138,8 @@ }; $.bind('command', function(event) { - - const sender = "" + event.getSender().toLowerCase(), + console.log(event) + const sender = event.getSender().toLowerCase(), command = event.getCommand(), args = event.getArgs(), action = args[0]; @@ -164,6 +164,7 @@ }else if(action.equalsIgnoreCase('refresh')){ var newseed = GameHelper.fetchSeed(args[1]); }else if(action.equalsIgnoreCase('gg')){ + console.log("GOT: GG") sendData('guesses',JSON.stringify(guesses)); } } @@ -173,12 +174,12 @@ $.registerChatCommand('./custom/custom/chatguessr.js', 'cg',7); $.registerChatCommand('./custom/custom/chatguessr.js', 'g',7); $.registerChatCommand('./custom/custom/chatguessr.js', 'cga',7); - $.registerChatSubcommand('cga', 'open', 1); - $.registerChatSubcommand('cga', 'close', 1); - $.registerChatSubcommand('cga', 'start', 1); - $.registerChatSubcommand('cga', 'end', 1); - $.registerChatSubcommand('cga', 'refresh', 1); - $.registerChatSubcommand('cga', 'gg', 1); + $.registerChatSubcommand('cga', 'open', 2); + $.registerChatSubcommand('cga', 'close', 2); + $.registerChatSubcommand('cga', 'start', 2); + $.registerChatSubcommand('cga', 'end', 2); + $.registerChatSubcommand('cga', 'refresh', 2); + $.registerChatSubcommand('cga', 'gg', 2); }); })();