Last active
September 14, 2024 18:36
-
-
Save shinmai/a1d92b4b5a84b78c9aa70b5559731135 to your computer and use it in GitHub Desktop.
BetterDiscord plugin to try to stop being AFK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @name No AFK | |
* @description Try to stop being AFK | |
* @version 0.0.1 | |
* @author shi | |
* @authorId 142594671078539264 | |
* @website https://shi.wtf/ | |
* @source https://gist.github.com/shinmai/a1d92b4b5a84b78c9aa70b5559731135/raw//NoAFK.plugin.js | |
*/ | |
/** | |
* Changelog: | |
* 0.0.1 - initial version | |
*/ | |
module.exports = meta => ({ | |
start() { | |
BdApi.Patcher.before('NoAFK', BdApi.Webpack.getModule(m => m.dispatch && m.subscribe), 'dispatch', (that, args) => { | |
const [ event ] = args; | |
if (event.type === "AFK") { | |
event.afk = false; | |
} | |
}) | |
}, | |
stop() { BdApi.Patcher.unpatchAll('NoAFK') } | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment