deno fmt
This commit is contained in:
parent
5660e08574
commit
1452c7ec44
|
@ -20,7 +20,7 @@ export const updateBotListStatistics = (serverCount: number): void => {
|
||||||
log(LT.INFO, `Posted server count to ${botList.name}. Results: ${JSON.stringify(response)}`);
|
log(LT.INFO, `Posted server count to ${botList.name}. Results: ${JSON.stringify(response)}`);
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
log(LT.ERROR, `Failed to update statistics for ${botList.name} | Error: ${err.name} - ${err.message}`)
|
log(LT.ERROR, `Failed to update statistics for ${botList.name} | Error: ${err.name} - ${err.message}`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
@ -50,7 +50,9 @@ const execute = async (bot: Bot, interaction: Interaction) => {
|
||||||
|
|
||||||
// Log custom event to see if we should add it as a preset
|
// Log custom event to see if we should add it as a preset
|
||||||
if (customAct) {
|
if (customAct) {
|
||||||
dbClient.execute(queries.insertCustomActivity, [interaction.guildId, category, activity.name, activity.maxMembers]).catch((e) => utils.commonLoggers.dbError('step2-finalize.ts@custom', 'insert into', e));
|
dbClient.execute(queries.insertCustomActivity, [interaction.guildId, category, activity.name, activity.maxMembers]).catch((e) =>
|
||||||
|
utils.commonLoggers.dbError('step2-finalize.ts@custom', 'insert into', e)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const rawEventTime = tempDataMap.get(eventTimeId) || '';
|
const rawEventTime = tempDataMap.get(eventTimeId) || '';
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import config from '../../config.ts';
|
import config from '../../config.ts';
|
||||||
import { ApplicationCommandTypes, ApplicationCommandOptionTypes, Bot, Interaction, InteractionResponseTypes, DiscordEmbedField } from '../../deps.ts';
|
import { ApplicationCommandOptionTypes, ApplicationCommandTypes, Bot, DiscordEmbedField, Interaction, InteractionResponseTypes } from '../../deps.ts';
|
||||||
import { infoColor2, infoEmbed, isLFGChannel, somethingWentWrong } from '../commandUtils.ts';
|
import { infoColor2, infoEmbed, isLFGChannel, somethingWentWrong } from '../commandUtils.ts';
|
||||||
import { dbClient, queries } from '../db.ts';
|
import { dbClient, queries } from '../db.ts';
|
||||||
import { CommandDetails } from '../types/commandTypes.ts';
|
import { CommandDetails } from '../types/commandTypes.ts';
|
||||||
|
@ -78,7 +78,7 @@ const execute = async (bot: Bot, interaction: Interaction) => {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
somethingWentWrong(bot, interaction, 'auditMissingData')
|
somethingWentWrong(bot, interaction, 'auditMissingData');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ export const ready = (rawBot: Bot) => {
|
||||||
}, 30000);
|
}, 30000);
|
||||||
|
|
||||||
// Interval to handle updating botList statistics
|
// Interval to handle updating botList statistics
|
||||||
if (botListPosterIntervalId) clearInterval(botListPosterIntervalId)
|
if (botListPosterIntervalId) clearInterval(botListPosterIntervalId);
|
||||||
LOCALMODE ? log(LT.INFO, 'updateListStatistics not running') : botListPosterIntervalId = setInterval(() => {
|
LOCALMODE ? log(LT.INFO, 'updateListStatistics not running') : botListPosterIntervalId = setInterval(() => {
|
||||||
log(LT.LOG, 'Updating all bot lists statistics');
|
log(LT.LOG, 'Updating all bot lists statistics');
|
||||||
updateBotListStatistics(bot.guilds.size + bot.dispatchedGuildIds.size);
|
updateBotListStatistics(bot.guilds.size + bot.dispatchedGuildIds.size);
|
||||||
|
|
Loading…
Reference in New Issue