diff --git a/package-lock.json b/package-lock.json index 166ee57..1758fdb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "betterdiscordplugin-autoidleonafk", - "version": "0.3.2", + "version": "0.4.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "betterdiscordplugin-autoidleonafk", - "version": "0.3.2", + "version": "0.4.0", "license": "MIT", "dependencies": { "@types/bandagedbd__bdapi": "^0.3.4", diff --git a/release/AutoIdleOnAFK.plugin.js b/release/AutoIdleOnAFK.plugin.js index 89cd92b..8ffa30d 100644 --- a/release/AutoIdleOnAFK.plugin.js +++ b/release/AutoIdleOnAFK.plugin.js @@ -4,7 +4,7 @@ Plugin only works when your status is 'online' and you are not in a voice channel. For Bugs or Feature Requests open an issue on my Github - * @version 0.3.2 + * @version 0.4.0 * @author RoguedBear * @authorLink https://github.com/RoguedBear * @website https://github.com/RoguedBear/BetterDiscordPlugin-AutoIdleOnAFK @@ -43,19 +43,18 @@ const config = { link: "https://github.com/RoguedBear" } ], - version: "0.3.2", + version: "0.4.0", description: "Automatically updates your discord status to 'idle' when you haven't opened your discord client for more than 5 minutes.\nPlugin only works when your status is 'online' and you are not in a voice channel. \n\nFor Bugs or Feature Requests open an issue on my Github", github: "https://github.com/RoguedBear/BetterDiscordPlugin-AutoIdleOnAFK", github_raw: "https://raw.githubusercontent.com/RoguedBear/BetterDiscordPlugin-AutoIdleOnAFK/main/release/AutoIdleOnAFK.plugin.js" }, changelog: [ { - type: "fixed", - title: "Fixed the plugin :) 🎉", + type: "added", + title: "Added a setting to optionally ignore VC state when going AFK", items: [ - "Fixed the plugin after a long wait!!!", - "Thanks to: `@Violet-Vibes` for nudging me in the right direction, and `DevilBro's` BDFDB library for showing me the way!", - "so glad to have the plugin back working" + "Earlier if you were in a VC you couldn't go in AFK mode. Now you can toggle a setting to ignore whether you are in VC or not before going AFK.", + "default value: off" ] } ], @@ -122,6 +121,14 @@ const config = { 120 ] }, + { + type: "switch", + name: "Ignore VC state when going AFK", + note: "Allows going to Idle mode even when you are in a VC. default: off", + id: "ignoreVCState", + value: false, + defaultValue: false + }, { type: "switch", name: "Always Revert To Online", @@ -378,7 +385,10 @@ module.exports = !global.ZeresPluginLibrary ? Dummy : (([Plugin, Api]) => { * @returns {boolean} if user is in a VC */ inVoiceChannel() { - return getVoiceChannelId() !== null; + return ( + this.settings.ignoreVCState === false && + getVoiceChannelId() !== null + ); } /** diff --git a/release/AutoIdleOnAFK.plugin.js.sha256 b/release/AutoIdleOnAFK.plugin.js.sha256 index 62875a9..455f3ff 100644 --- a/release/AutoIdleOnAFK.plugin.js.sha256 +++ b/release/AutoIdleOnAFK.plugin.js.sha256 @@ -1 +1 @@ -26ae77c5aa75ae6e0335ed68ed5438c1dfe36f3417d00a0fcc1007a89e1c51bb AutoIdleOnAFK.plugin.js +0a57d7da16daff0ea439858ac7a02efb13a1e134ab5e78154f20f6f8675422ce AutoIdleOnAFK.plugin.js