Skip to content

Commit

Permalink
feat: channel placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
cortmnzz committed May 21, 2023
1 parent 4b6a335 commit a24b98b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions twitch_key_control.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const actionMap = new Map();

robot.setKeyboardDelay(delay);

client.connect().then(() => console.log(config.language.CHAT_STATUS_CONNECTED));
client.connect().then(() => console.log(config.language.CHAT_STATUS_CONNECTED.replace("{channel}", channelName)));
client?.on('message', (channel, tags, message) => {
const action = getByCommand(message);

Expand All @@ -41,7 +41,7 @@ client?.on('message', (channel, tags, message) => {
actionMap.delete(action);
}, time);

if (actionMap.get(action) > minAmount) {
if (actionMap.get(action) >= minAmount) {
const amount = actionMap.get(action);
console.log((amount > 1 ? config.language.ACTION_PERFORM_PLURAL : config.language.ACTION_PERFORM_SINGULAR)
.replace("{command}", action.command).replace("{amount}", amount));
Expand Down

0 comments on commit a24b98b

Please sign in to comment.