mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
Blague больше не используется
В скором времени возможно удалю и Amethyste, пока он тоже не используется
This commit is contained in:
parent
de6942ee57
commit
9d3001eaba
5 changed files with 3 additions and 37 deletions
|
@ -7,7 +7,7 @@ const { Client, Collection, SlashCommandBuilder, ContextMenuCommandBuilder } = r
|
||||||
|
|
||||||
const BaseEvent = require("./BaseEvent.js"),
|
const BaseEvent = require("./BaseEvent.js"),
|
||||||
BaseCommand = require("./BaseCommand.js"),
|
BaseCommand = require("./BaseCommand.js"),
|
||||||
AmeClient = require("amethyste-api"),
|
// AmeClient = require("amethyste-api"),
|
||||||
path = require("path"),
|
path = require("path"),
|
||||||
fs = require("fs").promises,
|
fs = require("fs").promises,
|
||||||
mongoose = require("mongoose"),
|
mongoose = require("mongoose"),
|
||||||
|
@ -47,7 +47,7 @@ class JaBa extends Client {
|
||||||
this.databaseCache.usersReminds = new Collection(); // members with active reminds
|
this.databaseCache.usersReminds = new Collection(); // members with active reminds
|
||||||
this.databaseCache.mutedUsers = new Collection(); // members who are currently muted
|
this.databaseCache.mutedUsers = new Collection(); // members who are currently muted
|
||||||
|
|
||||||
if (this.config.apiKeys.amethyste) this.AmeAPI = new AmeClient(this.config.apiKeys.amethyste);
|
// if (this.config.apiKeys.amethyste) this.AmeAPI = new AmeClient(this.config.apiKeys.amethyste);
|
||||||
|
|
||||||
this.discordTogether = new DiscordTogether(this);
|
this.discordTogether = new DiscordTogether(this);
|
||||||
|
|
||||||
|
|
|
@ -29,18 +29,11 @@ module.exports = {
|
||||||
/* Bot's owner informations */
|
/* Bot's owner informations */
|
||||||
owner: {
|
owner: {
|
||||||
id: "XXXXXXXXXXX", // The ID of the bot's owner
|
id: "XXXXXXXXXXX", // The ID of the bot's owner
|
||||||
name: "@XXXXXXXXXXX#1234" // And the name of the bot's owner
|
name: "XXXXXXXXXXX#1234" // And the name of the bot's owner
|
||||||
},
|
},
|
||||||
/* The API keys that are required for certain commands */
|
/* The API keys that are required for certain commands */
|
||||||
apiKeys: {
|
apiKeys: {
|
||||||
// BLAGUE.XYZ: https://blague.xyz/
|
|
||||||
blagueXYZ: "XXXXXXXXXXX",
|
|
||||||
// AMETHYSTE: https://api.amethyste.moe
|
// AMETHYSTE: https://api.amethyste.moe
|
||||||
amethyste: "XXXXXXXXXXX"
|
amethyste: "XXXXXXXXXXX"
|
||||||
},
|
|
||||||
/* The others utils links */
|
|
||||||
others: {
|
|
||||||
github: "https://github.com/XXXXXXXXXXX", // Founder's github account
|
|
||||||
donate: "https://patreon.com/XXXXXXXXXXX" // Donate link
|
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"DESCRIPTION": "Gets a random FML",
|
|
||||||
"USAGE": "fml",
|
|
||||||
"EXAMPLES": "fml",
|
|
||||||
"FOOTER": "blague.xyz | By Skiz#0001"
|
|
||||||
}
|
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"DESCRIPTION": "Gets a wonderful joke specially made for you!",
|
|
||||||
"USAGE": "joke",
|
|
||||||
"EXAMPLES": "joke",
|
|
||||||
"FOOTER": "blague.xyz | By Skiz#0001"
|
|
||||||
}
|
|
|
@ -79,21 +79,6 @@ const checks = [
|
||||||
success("Valid Amethyste API key");
|
success("Valid Amethyste API key");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!config.apiKeys.blagueXYZ) {
|
|
||||||
ignore("blague.xyz API is not configured, skipping check.");
|
|
||||||
} else {
|
|
||||||
const res = await fetch("https://blague.xyz/api/joke/random", {
|
|
||||||
headers: {
|
|
||||||
Authorization: config.apiKeys.blagueXYZ
|
|
||||||
}
|
|
||||||
});
|
|
||||||
const result = await res.json();
|
|
||||||
if (result.status === 401) {
|
|
||||||
error("Not valid blague.xyz key", "get your key here: https://blague.xyz/");
|
|
||||||
} else {
|
|
||||||
success("Valid blague.xyz key");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue