Skip to content

Commit

Permalink
BETA VERSION 0.66.3 (#1728)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mittelblut9 authored Oct 10, 2023
2 parents 6c02003 + 1ee05c0 commit 443939e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 9 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ DC_WARN=
DC_RECONNECT=
DC_SCAMMANAGE=
DC_BUGREPORTS=
DC_DEBUGLOGS=

# DATABASE
DB_DEBUG=false
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mittelbot",
"version": "0.66.2",
"version": "0.66.3",
"description": "A Discord Bot written in Node.js",
"main": "bot/core/shard.js",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion src/slash_commands/_config/admin/welcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports.welcomeSettingsConfig = new SlashCommandBuilder()
.addSubcommand((subcommand) =>
subcommand
.setName('add')
.setDescription('Remove the welcome message and channel.')
.setDescription('Add or update the welcome message and channel.')
.addChannelOption((channel) =>
channel
.setName('channel')
Expand Down
19 changes: 14 additions & 5 deletions utils/functions/errorhandler/errorhandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ const callerId = require('caller-id');
const Sentry = require('@sentry/node');
const { getSession, removeSession } = require('~src/assets/js/sessionID');
const { debug_log } = require('./debugLogs');
const { EmbedBuilder } = require('discord.js');

module.exports.errorhandler = ({ err = null, message = null, fatal = true, id = null }) => {
const caller = callerId.getData();
Expand All @@ -27,9 +28,17 @@ module.exports.errorhandler = ({ err = null, message = null, fatal = true, id =
}

if (message === null) message = err;
debug_log.info(
`${new Date().toLocaleDateString('de-DE')} ${new Date().toLocaleTimeString(
'de-DE'
)} || ${id} - ${message}`
);

const debugMessage = `${new Date().toLocaleDateString('de-DE')} ${new Date().toLocaleTimeString(
'de-DE'
)} || ${id} - ${message}`;

debug_log.info(debugMessage);

global.bot.channels.cache
.get(process.env.DC_DEBUGLOGS)
.send({
embeds: [new EmbedBuilder().setDescription(debugMessage).setTimestamp()],
})
.catch(() => null);
};

0 comments on commit 443939e

Please sign in to comment.