Удалён Sentry (не используется)

This commit is contained in:
JonnyBro 2022-02-13 16:33:21 +05:00
parent afc8dc8671
commit f1d47c730f
5 changed files with 5 additions and 39 deletions

View file

@ -1,8 +1,7 @@
const Command = require("../../base/Command"),
Discord = require("discord.js"),
fetch = require("node-fetch"),
gamedig = require("gamedig"),
Sentry = require("@sentry/node");
gamedig = require("gamedig");
class Minecraft extends Command {
constructor(client) {
@ -48,7 +47,7 @@ class Minecraft extends Command {
await gamedig.query(options).then((res) => {
json = res;
}).catch((err) => {
Sentry.captureException(err);
console.error(err);
});
if (!json) {
@ -56,7 +55,7 @@ class Minecraft extends Command {
await gamedig.query(options).then((res) => {
json = res;
}).catch((err) => {
Sentry.captureException(err);
console.error(err);
});
}

View file

@ -41,9 +41,7 @@ module.exports = {
// DBL: https://discordbots.org/api/docs#mybots
dbl: "XXXXXXXXXXX",
// AMETHYSTE: https://api.amethyste.moe
amethyste: "XXXXXXXXXXX",
// SENTRY: https://sentry.io (this is not required and not recommended - you can delete the field)
sentryDSN: "XXXXXXXXXXX"
amethyste: "XXXXXXXXXXX"
},
/* The others utils links */
others: {

View file

@ -1,25 +1,11 @@
require("./helpers/extenders");
const Sentry = require("@sentry/node"),
util = require("util"),
const util = require("util"),
fs = require("fs"),
readdir = util.promisify(fs.readdir),
mongoose = require("mongoose"),
chalk = require("chalk"),
{ Intents } = require("discord.js");
const config = require("./config");
if (config.apiKeys.sentryDSN) {
try {
Sentry.init({
dsn: config.apiKeys.sentryDSN
});
} catch (e) {
console.log(e);
console.log(chalk.yellow("Looks like your Sentry DSN key is invalid. If you do not intend to use Sentry, please remove the key from the configuration file."));
}
}
// Load JaBa class
const JaBa = require("./base/JaBa");
const client = new JaBa({

View file

@ -19,7 +19,6 @@
"@distube/spotify": "^1.2.1",
"@distube/yt-dlp": "^1.0.2",
"@k3rn31p4nic/google-translate-api": "github:k3rn31p4nic/google-translate-api",
"@sentry/node": "6.3.6",
"@sindresorhus/slugify": "^1.1.0",
"amethyste-api": "github:Androz2091/amethyste-api",
"btoa": "^1.2.1",

View file

@ -7,8 +7,6 @@ const success = (message) => console.log(` ${chalk.green("✓")} ${message}`);
const error = (message, howToFix) => console.log(` ${chalk.red("✗")} ${message}${howToFix ? ` : ${howToFix}` : ""}`);
const ignore = (message) => console.log(` ${chalk.yellow("~")} ${message}`);
const delay = (ms) => new Promise((r) => setTimeout(r, ms));
const checks = [
() => {
console.log("\n\nEnvironnement");
@ -112,20 +110,6 @@ const checks = [
success("Valid DBL key");
}
}
if (!config.apiKeys.sentryDSN) {
ignore("SentryDSN is not configured, key should not be checked.");
} else {
const Sentry = require("@sentry/node");
try {
Sentry.init({
dsn: config.apiKeys.sentryDSN
});
await delay(1000);
success("should be a valid Sentry DSN key");
} catch (e) {
error("valid Sentry DSN key", "Sentry is not recommended, delete the key from the config");
}
}
resolve();
});
},