mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 14:38:49 +00:00
fix: update logger for all util
This commit is contained in:
1 parent
57fc1e3ee8
commit
7cb25c5648
10 files changed
+20
-15
No files matched your search
@@ -15,7 +15,7 @@ module.exports = {
|
||||
.setDMPermission(false)
|
||||
.setNSFW(false),
|
||||
execute: async ({ interaction, client, executionId }) => {
|
||||
const uptimeString = await getUptimeFormatted();
|
||||
const uptimeString = await getUptimeFormatted({ executionId });
|
||||
const usedMemoryInMB = Math.ceil((await osu.mem.info()).usedMemMb).toLocaleString('en-US');
|
||||
const cpuUsage = await osu.cpu.usage();
|
||||
const releaseVersion = version;
|
||||
|
||||
@@ -22,7 +22,7 @@ module.exports = {
|
||||
}
|
||||
|
||||
// from normal /status command
|
||||
const uptimeString = await getUptimeFormatted();
|
||||
const uptimeString = await getUptimeFormatted({ executionId });
|
||||
const usedMemoryInMB = Math.ceil((await osu.mem.info()).usedMemMb).toLocaleString('en-US');
|
||||
const cpuUsage = await osu.cpu.usage();
|
||||
const releaseVersion = version;
|
||||
|
||||
@@ -2,9 +2,9 @@ const Discord = require('discord.js');
|
||||
|
||||
exports.createClient = async ({ executionId }) => {
|
||||
const logger = require('../../services/logger').child({
|
||||
source: 'createPlayer.js',
|
||||
source: 'createClient.js',
|
||||
module: 'utilFactory',
|
||||
name: 'createPlayer',
|
||||
name: 'createClient',
|
||||
executionId: executionId,
|
||||
shardId: 'client'
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@ exports.startLoadTest = async ({ client, executionId }) => {
|
||||
const logger = require('../../services/logger').child({
|
||||
source: 'startLoadTest.js',
|
||||
module: 'utilOther',
|
||||
name: 'loadTest',
|
||||
name: 'startLoadTest',
|
||||
executionId: executionId,
|
||||
shardId: client.shard.ids[0]
|
||||
});
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
const logger = require('../../services/logger');
|
||||
exports.getUptimeFormatted = async ({ executionId }) => {
|
||||
const logger = require('../../services/logger').child({
|
||||
source: 'getUptimeFormatted.js',
|
||||
module: 'utilSystem',
|
||||
name: 'getUptimeFormatted',
|
||||
executionId: executionId
|
||||
});
|
||||
|
||||
exports.getUptimeFormatted = async () => {
|
||||
try {
|
||||
let uptimeFormattedString = '';
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ const { EmbedBuilder } = require('discord.js');
|
||||
exports.cannotJoinVoiceOrTalk = async ({ interaction, executionId }) => {
|
||||
const logger = require('../../services/logger').child({
|
||||
source: 'permissionValidator.js',
|
||||
module: 'validator',
|
||||
module: 'utilValidation',
|
||||
name: 'cannotJoinVoiceOrTalk',
|
||||
executionId: executionId,
|
||||
shardId: interaction.guild.shardId,
|
||||
@@ -37,7 +37,7 @@ exports.cannotJoinVoiceOrTalk = async ({ interaction, executionId }) => {
|
||||
exports.cannotSendMessageInChannel = async ({ interaction, executionId }) => {
|
||||
const logger = require('../../services/logger').child({
|
||||
source: 'permissionValidator.js',
|
||||
module: 'validator',
|
||||
module: 'utilValidation',
|
||||
name: 'cannotSendMessageInChannel',
|
||||
executionId: executionId,
|
||||
shardId: interaction.guild.shardId,
|
||||
|
||||
@@ -5,7 +5,7 @@ const { EmbedBuilder } = require('discord.js');
|
||||
exports.queueDoesNotExist = async ({ interaction, queue, executionId }) => {
|
||||
const logger = require('../../services/logger').child({
|
||||
source: 'queueValidator.js',
|
||||
module: 'validator',
|
||||
module: 'utilValidation',
|
||||
name: 'queueDoesNotExist',
|
||||
executionId: executionId,
|
||||
shardId: interaction.guild.shardId,
|
||||
@@ -33,7 +33,7 @@ exports.queueDoesNotExist = async ({ interaction, queue, executionId }) => {
|
||||
exports.queueNoCurrentTrack = async ({ interaction, queue, executionId }) => {
|
||||
const logger = require('../../services/logger').child({
|
||||
source: 'queueValidator.js',
|
||||
module: 'validator',
|
||||
module: 'utilValidation',
|
||||
name: 'queueNoCurrentTrack',
|
||||
executionId: executionId,
|
||||
shardId: interaction.guild.shardId,
|
||||
@@ -61,7 +61,7 @@ exports.queueNoCurrentTrack = async ({ interaction, queue, executionId }) => {
|
||||
exports.queueIsEmpty = async ({ interaction, queue, executionId }) => {
|
||||
const logger = require('../../services/logger').child({
|
||||
source: 'queueValidator.js',
|
||||
module: 'validator',
|
||||
module: 'utilValidation',
|
||||
name: 'queueIsEmpty',
|
||||
executionId: executionId,
|
||||
shardId: interaction.guild.shardId,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
exports.transformQuery = async ({ query, executionId }) => {
|
||||
const logger = require('../../services/logger').child({
|
||||
source: 'searchQueryValidator.js',
|
||||
module: 'validator',
|
||||
module: 'utilValidation',
|
||||
name: 'transformQuery',
|
||||
executionId: executionId
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@ const { EmbedBuilder } = require('discord.js');
|
||||
exports.notValidGuildId = async ({ interaction, executionId }) => {
|
||||
const logger = require('../../services/logger').child({
|
||||
source: 'systemCommandValidator.js',
|
||||
module: 'validator',
|
||||
module: 'utilValidation',
|
||||
name: 'notValidGuildId',
|
||||
executionId: executionId,
|
||||
shardId: interaction.guild.shardId,
|
||||
|
||||
@@ -33,7 +33,7 @@ exports.notInVoiceChannel = async ({ interaction, executionId }) => {
|
||||
exports.notInSameVoiceChannel = async ({ interaction, queue, executionId }) => {
|
||||
const logger = require('../../services/logger').child({
|
||||
source: 'voiceChannelValidator.js',
|
||||
module: 'validator',
|
||||
module: 'utilValidation',
|
||||
name: 'notInSameVoiceChannel',
|
||||
executionId: executionId,
|
||||
shardId: interaction.guild.shardId,
|
||||
|
||||
Reference in new issue
Block a user