debug: temporarily disable server auto-leaving

This is to avoid any potential funny business during the upcoming server migration.
This commit is contained in:
Dragory 2022-08-06 22:13:07 +03:00
parent 4a5e8ded75
commit f0a96de371
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -17,7 +17,7 @@ async function checkGuild(pluginData: GlobalPluginData<GuildAccessMonitorPluginT
if (!(await pluginData.state.allowedGuilds.isAllowed(guild.id))) { if (!(await pluginData.state.allowedGuilds.isAllowed(guild.id))) {
// tslint:disable-next-line:no-console // tslint:disable-next-line:no-console
console.log(`Non-allowed server ${guild.name} (${guild.id}), leaving`); console.log(`Non-allowed server ${guild.name} (${guild.id}), leaving`);
guild.leave(); // guild.leave();
} }
} }
@ -43,7 +43,7 @@ export const GuildAccessMonitorPlugin = zeppelinGlobalPlugin<GuildAccessMonitorP
const defaultAllowedServers = env.DEFAULT_ALLOWED_SERVERS || []; const defaultAllowedServers = env.DEFAULT_ALLOWED_SERVERS || [];
const configs = new Configs(); const configs = new Configs();
for (const serverId of defaultAllowedServers) { for (const serverId of defaultAllowedServers) {
if (! await pluginData.state.allowedGuilds.isAllowed(serverId)) { if (!(await pluginData.state.allowedGuilds.isAllowed(serverId))) {
// tslint:disable-next-line:no-console // tslint:disable-next-line:no-console
console.log(`Adding allowed-by-default server ${serverId} to the allowed servers`); console.log(`Adding allowed-by-default server ${serverId} to the allowed servers`);
await pluginData.state.allowedGuilds.add(serverId); await pluginData.state.allowedGuilds.add(serverId);