3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Temp fix to role change detection on specific servers: cache all members on bot start on these server

This commit is contained in:
Dragory 2021-04-02 21:31:05 +03:00
parent f5504724b1
commit fdaf386193
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -35,6 +35,7 @@ import { SnowflakeInfoCmd } from "./commands/SnowflakeInfoCmd";
import { discardRegExpRunner, getRegExpRunner } from "../../regExpRunners";
import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin";
import { VcdisconnectCmd } from "./commands/VcdisconnectCmd";
import { refreshMembersIfNeeded } from "./refreshMembers";
const defaultOptions: PluginOptions<UtilityPluginType> = {
config: {
@ -155,6 +156,21 @@ export const UtilityPlugin = zeppelinGuildPlugin<UtilityPluginType>()("utility",
sendSuccessMessage(pluginData, activeReloads.get(guild.id)!, "Reloaded!");
activeReloads.delete(guild.id);
}
// FIXME: Temp fix for role change detection for specific servers, load all guild members in the background on bot start
const roleChangeDetectionFixServers = [
"786212572285763605",
"653681924384096287",
"493351982887862283",
"513338222810497041",
"523043978178723840",
"718076393295970376",
"803251072877199400",
"750492934343753798",
];
if (roleChangeDetectionFixServers.includes(pluginData.guild.id)) {
refreshMembersIfNeeded(pluginData.guild);
}
},
onUnload(pluginData) {