mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 14:11:50 +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:
parent
f5504724b1
commit
fdaf386193
1 changed files with 16 additions and 0 deletions
|
@ -35,6 +35,7 @@ import { SnowflakeInfoCmd } from "./commands/SnowflakeInfoCmd";
|
||||||
import { discardRegExpRunner, getRegExpRunner } from "../../regExpRunners";
|
import { discardRegExpRunner, getRegExpRunner } from "../../regExpRunners";
|
||||||
import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin";
|
import { TimeAndDatePlugin } from "../TimeAndDate/TimeAndDatePlugin";
|
||||||
import { VcdisconnectCmd } from "./commands/VcdisconnectCmd";
|
import { VcdisconnectCmd } from "./commands/VcdisconnectCmd";
|
||||||
|
import { refreshMembersIfNeeded } from "./refreshMembers";
|
||||||
|
|
||||||
const defaultOptions: PluginOptions<UtilityPluginType> = {
|
const defaultOptions: PluginOptions<UtilityPluginType> = {
|
||||||
config: {
|
config: {
|
||||||
|
@ -155,6 +156,21 @@ export const UtilityPlugin = zeppelinGuildPlugin<UtilityPluginType>()("utility",
|
||||||
sendSuccessMessage(pluginData, activeReloads.get(guild.id)!, "Reloaded!");
|
sendSuccessMessage(pluginData, activeReloads.get(guild.id)!, "Reloaded!");
|
||||||
activeReloads.delete(guild.id);
|
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) {
|
onUnload(pluginData) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue