diff --git a/src/components/layout/NavBar.vue b/src/components/layout/NavBar.vue index a2a0e37c..d943604e 100644 --- a/src/components/layout/NavBar.vue +++ b/src/components/layout/NavBar.vue @@ -133,7 +133,7 @@ export default class NavBar extends Vue { @ftbot.Action pingAll; - @ftbot.Action getState; + @ftbot.Action allGetState; @ftbot.Action logout; @@ -170,7 +170,7 @@ export default class NavBar extends Vue { if (this.hasBots) { // Query botstate - this will enable / disable certain modes - this.getState(); + this.allGetState(); } } diff --git a/src/store/modules/botStoreWrapper.ts b/src/store/modules/botStoreWrapper.ts index 15a39f6d..7b82d817 100644 --- a/src/store/modules/botStoreWrapper.ts +++ b/src/store/modules/botStoreWrapper.ts @@ -260,6 +260,11 @@ export default function createBotStore(store) { dispatch(`${e}/ping`); }); }, + allGetState({ getters, dispatch }) { + getters.allAvailableBotsList.forEach((e) => { + dispatch(`${e}/getState`); + }); + }, }; // Autocreate Actions from botstores Object.keys(BotStoreActions).forEach((e) => {