Remove Top.gg integration
This commit is contained in:
parent
3ed65c3c86
commit
1830db6282
6 changed files with 10 additions and 62 deletions
|
@ -31,8 +31,6 @@ STAYVC=false
|
|||
# Set this to true to disable music playback from YouTube
|
||||
YT_DISABLED=false
|
||||
|
||||
# Put DBL/top.gg token here
|
||||
DBL=
|
||||
# Put Tenor API key here (used for obtaining raw tenor GIF urls)
|
||||
TENOR=
|
||||
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
|
||||
esmBot is a free and open-source Discord bot designed to entertain your server. It's made using [Oceanic](https://oceanic.ws) and comes with image, music, and utility commands out of the box.
|
||||
|
||||
[![Top.gg](https://top.gg/api/widget/429305856241172480.svg)](https://top.gg/bot/429305856241172480)
|
||||
|
||||
## Features
|
||||
- Powerful, efficient, and performant image processing powered by [libvips](https://github.com/libvips/libvips)
|
||||
- Lots of image manipulation and processing commands out of the box
|
||||
|
|
|
@ -15,7 +15,6 @@ To make managing environment variables easier, an example `.env` file is include
|
|||
These variables that are not necessarily required for the bot to run, but can greatly enhance its functionality:
|
||||
|
||||
- `STAYVC`: Set this to true if you want the bot to stay in voice chat after playing music/a sound effect. You can make it leave by using the stop command.
|
||||
- `DBL`: An API token from [Top.gg](https://top.gg/). Unnecessary for most users since Top.gg tends to ban forks of bots like esmBot from their list.
|
||||
- `TENOR`: An API token from [Tenor](https://tenor.com/gifapi). This is required for using GIFs from Tenor.
|
||||
- `OUTPUT`: A directory to output the help documentation in Markdown format to. It's recommended to set this to a directory being served by a web server.
|
||||
- `TEMPDIR`: A directory that will store generated images larger than 8MB. It's recommended to set this to a directory being served by a web server.
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
"url": "git+https://github.com/esmBot/esmBot.git"
|
||||
},
|
||||
"dependencies": {
|
||||
"@top-gg/sdk": "^3.1.3",
|
||||
"dotenv": "^16.0.3",
|
||||
"emoji-regex": "^10.2.1",
|
||||
"file-type": "^18.0.0",
|
||||
|
|
|
@ -5,7 +5,6 @@ specifiers:
|
|||
'@babel/eslint-parser': ^7.19.1
|
||||
'@babel/eslint-plugin': ^7.19.1
|
||||
'@babel/plugin-proposal-class-properties': ^7.18.6
|
||||
'@top-gg/sdk': ^3.1.3
|
||||
better-sqlite3: ^7.6.2
|
||||
bufferutil: ^4.0.7
|
||||
cmake-js: ^7.0.0
|
||||
|
@ -33,7 +32,6 @@ specifiers:
|
|||
zlib-sync: ^0.1.7
|
||||
|
||||
dependencies:
|
||||
'@top-gg/sdk': 3.1.3
|
||||
dotenv: 16.0.3
|
||||
emoji-regex: 10.2.1
|
||||
file-type: 18.0.0
|
||||
|
@ -612,15 +610,6 @@ packages:
|
|||
dev: false
|
||||
optional: true
|
||||
|
||||
/@top-gg/sdk/3.1.3:
|
||||
resolution: {integrity: sha512-jvj3jH8BY35AXKFXkap2cJRuFMOz1yBvBvCvNq90gfvplKWDYqGPQKt+nOhT/hdYc+XcKskY/c5OOWDX0xbg2Q==}
|
||||
dependencies:
|
||||
node-fetch: 2.6.7
|
||||
raw-body: 2.5.1
|
||||
transitivePeerDependencies:
|
||||
- encoding
|
||||
dev: false
|
||||
|
||||
/@types/node/18.11.9:
|
||||
resolution: {integrity: sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==}
|
||||
dev: false
|
||||
|
@ -902,6 +891,7 @@ packages:
|
|||
resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==}
|
||||
engines: {node: '>= 0.8'}
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/callsites/3.1.0:
|
||||
resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==}
|
||||
|
@ -1220,6 +1210,7 @@ packages:
|
|||
resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==}
|
||||
engines: {node: '>= 0.8'}
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/detect-libc/2.0.1:
|
||||
resolution: {integrity: sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==}
|
||||
|
@ -1821,6 +1812,7 @@ packages:
|
|||
statuses: 2.0.1
|
||||
toidentifier: 1.0.1
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/http-proxy-agent/4.0.1:
|
||||
resolution: {integrity: sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==}
|
||||
|
@ -1851,6 +1843,7 @@ packages:
|
|||
dependencies:
|
||||
safer-buffer: 2.1.2
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/ieee754/1.2.1:
|
||||
resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==}
|
||||
|
@ -2259,18 +2252,6 @@ packages:
|
|||
lodash: 4.17.21
|
||||
dev: false
|
||||
|
||||
/node-fetch/2.6.7:
|
||||
resolution: {integrity: sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==}
|
||||
engines: {node: 4.x || >=6.0.0}
|
||||
peerDependencies:
|
||||
encoding: ^0.1.0
|
||||
peerDependenciesMeta:
|
||||
encoding:
|
||||
optional: true
|
||||
dependencies:
|
||||
whatwg-url: 5.0.0
|
||||
dev: false
|
||||
|
||||
/node-gyp-build/4.5.0:
|
||||
resolution: {integrity: sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg==}
|
||||
hasBin: true
|
||||
|
@ -2726,6 +2707,7 @@ packages:
|
|||
iconv-lite: 0.4.24
|
||||
unpipe: 1.0.0
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/rc/1.2.8:
|
||||
resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==}
|
||||
|
@ -2879,6 +2861,7 @@ packages:
|
|||
/safer-buffer/2.1.2:
|
||||
resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==}
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/sax/1.2.4:
|
||||
resolution: {integrity: sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==}
|
||||
|
@ -2913,6 +2896,7 @@ packages:
|
|||
/setprototypeof/1.2.0:
|
||||
resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==}
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/sharp/0.31.2:
|
||||
resolution: {integrity: sha512-DUdNVEXgS5A97cTagSLIIp8dUZ/lZtk78iNVZgHdHbx1qnQR7JAHY0BnXnwwH39Iw+VKhO08CTYhIg0p98vQ5Q==}
|
||||
|
@ -3059,6 +3043,7 @@ packages:
|
|||
resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==}
|
||||
engines: {node: '>= 0.8'}
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/streamsearch/1.1.0:
|
||||
resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==}
|
||||
|
@ -3195,6 +3180,7 @@ packages:
|
|||
resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==}
|
||||
engines: {node: '>=0.6'}
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/token-types/5.0.1:
|
||||
resolution: {integrity: sha512-Y2fmSnZjQdDb9W4w4r1tswlMHylzWIeOKpx0aZH9BgGtACHhrk3OkT52AzwcuqTRBZtvvnTjDBh8eynMulu8Vg==}
|
||||
|
@ -3204,10 +3190,6 @@ packages:
|
|||
ieee754: 1.2.1
|
||||
dev: false
|
||||
|
||||
/tr46/0.0.3:
|
||||
resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==}
|
||||
dev: false
|
||||
|
||||
/triple-beam/1.3.0:
|
||||
resolution: {integrity: sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==}
|
||||
dev: false
|
||||
|
@ -3293,6 +3275,7 @@ packages:
|
|||
resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==}
|
||||
engines: {node: '>= 0.8'}
|
||||
dev: false
|
||||
optional: true
|
||||
|
||||
/update-browserslist-db/1.0.10_browserslist@4.21.4:
|
||||
resolution: {integrity: sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==}
|
||||
|
@ -3360,17 +3343,6 @@ packages:
|
|||
dev: false
|
||||
optional: true
|
||||
|
||||
/webidl-conversions/3.0.1:
|
||||
resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==}
|
||||
dev: false
|
||||
|
||||
/whatwg-url/5.0.0:
|
||||
resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==}
|
||||
dependencies:
|
||||
tr46: 0.0.3
|
||||
webidl-conversions: 3.0.1
|
||||
dev: false
|
||||
|
||||
/which-module/2.0.0:
|
||||
resolution: {integrity: sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==}
|
||||
dev: false
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import pm2 from "pm2";
|
||||
import { Api } from "@top-gg/sdk";
|
||||
import winston from "winston";
|
||||
|
||||
// load config from .env file
|
||||
|
@ -16,8 +15,6 @@ import { Client } from "oceanic.js";
|
|||
import database from "../database.js";
|
||||
import { cpus } from "os";
|
||||
|
||||
const dbl = process.env.NODE_ENV === "production" && process.env.DBL ? new Api(process.env.DBL) : null;
|
||||
|
||||
const logger = winston.createLogger({
|
||||
levels: {
|
||||
error: 0,
|
||||
|
@ -111,20 +108,6 @@ function updateStats() {
|
|||
});
|
||||
}
|
||||
|
||||
async function dblPost() {
|
||||
logger.main("Posting stats to Top.gg...");
|
||||
try {
|
||||
//await updateStats();
|
||||
await dbl.postStats({
|
||||
serverCount,
|
||||
shardCount
|
||||
});
|
||||
logger.main("Stats posted.");
|
||||
} catch (e) {
|
||||
logger.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
if (process.env.METRICS && process.env.METRICS !== "") {
|
||||
const servers = [];
|
||||
if (process.env.API_TYPE === "ws") {
|
||||
|
@ -163,7 +146,6 @@ if (process.env.METRICS && process.env.METRICS !== "") {
|
|||
}
|
||||
|
||||
setInterval(updateStats, 300000);
|
||||
if (dbl) setInterval(dblPost, 1800000);
|
||||
|
||||
setTimeout(updateStats, 10000);
|
||||
|
||||
|
|
Loading…
Reference in a new issue