3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 12:25:02 +00:00

chore: resolve eslint issues

This commit is contained in:
Dragory 2021-11-03 16:59:08 +02:00
parent 09125956a0
commit 673ec7b09a
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
19 changed files with 35 additions and 2 deletions

View file

@ -17,6 +17,8 @@ export const CleanAction = automodAction({
}
if (messageIdsToDeleteByChannelId.get(context.message.channel_id)!.includes(context.message.id)) {
// FIXME: Debug
// tslint:disable-next-line:no-console
console.warn(`Message ID to delete was already present: ${pluginData.guild.name}, rule ${ruleName}`);
continue;
}

View file

@ -13,6 +13,7 @@ interface GuildAccessMonitorPluginType extends BasePluginType {
async function checkGuild(pluginData: GlobalPluginData<GuildAccessMonitorPluginType>, guild: Guild) {
if (!(await pluginData.state.allowedGuilds.isAllowed(guild.id))) {
// tslint:disable-next-line:no-console
console.log(`Non-allowed server ${guild.name} (${guild.id}), leaving`);
guild.leave();
}

View file

@ -13,6 +13,7 @@ export async function reloadChangedGuilds(pluginData: GlobalPluginData<GuildConf
if (!item.key.startsWith("guild-")) continue;
const guildId = item.key.slice("guild-".length) as Snowflake;
// tslint:disable-next-line:no-console
console.log(`Config changed, reloading guild ${guildId}`);
await pluginData.getKnubInstance().reloadGuild(guildId);

View file

@ -35,6 +35,7 @@ export async function getOrCreateWebhookForChannel(
});
return [webhook.id, webhook.token!];
} catch (err) {
// tslint:disable-next-line:no-console
console.warn(`Error when trying to create webhook for ${pluginData.guild.id}/${channel.id}: ${err.message}`);
if (isDiscordAPIError(err) && err.code === 50013) {

View file

@ -71,7 +71,8 @@ export async function actualMuteUserCmd(
} else {
logger.error(`Failed to mute user ${user.id}: ${e.stack}`);
if (user.id == null) {
// tslint-disable-next-line:no-console
// FIXME: Debug
// tslint:disable-next-line:no-console
console.trace("[DEBUG] Null user.id for mute");
}
sendErrorMessage(pluginData, msg.channel as TextChannel, "Could not mute the user");

View file

@ -32,6 +32,7 @@ export async function postReminder(pluginData: GuildPluginData<RemindersPluginTy
}
} catch (err) {
// If we were unable to post the reminder, we'll try again later
// tslint:disable-next-line:no-console
console.warn(`Error when posting reminder for ${reminder.user_id} in guild ${reminder.guild_id}: ${String(err)}`);
return;
}