mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-25 06:34:58 +05:00
Удалён Sentry (не используется)
This commit is contained in:
parent
afc8dc8671
commit
f1d47c730f
5 changed files with 5 additions and 39 deletions
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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: {
|
||||
|
|
16
index.js
16
index.js
|
@ -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({
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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();
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue