Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nate1280 committed Aug 21, 2021
1 parent fb1d531 commit 4143bd7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
25 changes: 7 additions & 18 deletions nate1280.streamerbot.sdPlugin/js/buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,14 @@ class Button {
}
}

hasAction(action) {
var id = (typeof action === 'string' || action instanceof String) ? action : action.id;
for (var i = 0; i < SB.actions.length; i++) {
if (SB.actions[i].id == id) {
return true;
}
}
}

_doAction() {
if (this.hasAction(this.action)) {
sb.send('DoAction', {
'action': {
'id': this.action
}
})
} else {
StreamDeck.sendAlert(this.context)
}
// blind send the action
var id = (typeof this.action === 'string' || this.action instanceof String) ? this.action : this.action.id;
sb.send('DoAction', {
'action': {
'id': id
}
})
}

_updateTitle() {
Expand Down
2 changes: 1 addition & 1 deletion nate1280.streamerbot.sdPlugin/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Description": "Interface to run Streamer.bot actions from your StreamDeck!",
"Author": "nate1280",
"URL": "https://github.com/nate1280/streamdeck-Streamer.bot",
"Version": "0.2.0",
"Version": "0.3.0",
"Icon": "icons/icon",
"CodePath": "plugin.html",

Expand Down

0 comments on commit 4143bd7

Please sign in to comment.