Commit dae1642d authored by Morgân von Brylân's avatar Morgân von Brylân

Supprime un peu de redondance dans util_Strun et discordCore, et auth est...

Supprime un peu de redondance dans util_Strun et discordCore, et auth est désormais exporté par discordCore.
parent 752689e8
......@@ -503,3 +503,6 @@ Les commandes >avatar et >icôneServeur donnent désormais un webp plutôt qu'un
Ajoute la commande >uptime.
Améliore la commande getMember.
Corrige les commandes >tg et >parle.
4.3.4 (09/02/2020)
Corrige la gestion des erreurs.
const util = require("./util.js"),
{ client } = require("./discordCore.js"),
{ auth, error, comm } = require("./util_Strun.js"),
{ client, auth } = require("./discordCore.js"),
{ error, comm } = require("./util_Strun.js"),
aides = [],
footer = { text: `🖕🏽 Strun
🎉 Les sympas
......
......@@ -17,21 +17,22 @@ var master;
module.exports = {
tagRegexp: tagRegexp,
tagRegexp,
auth,
getMaster: () => master,
checkMaster: checkMaster,
isAdmin: isAdmin,
jpeuxÉcrire: jpeuxÉcrire,
getUser: getUser,
getUsers: getUsers,
getMember: getMember,
getMembers: getMembers,
getChannel: getChannel,
getChannels: getChannels,
getServer: getServer,
getServers: getServers,
client: client,
exit: exit
checkMaster,
isAdmin,
jpeuxÉcrire,
getUser,
getUsers,
getMember,
getMembers,
getChannel,
getChannels,
getServer,
getServers,
client,
exit
}
client.login(auth.token);
......
{
"name": "strun_bah_couille",
"version": "4.3.3",
"version": "4.3.4",
"description": "Strun Bah Couille le Crisse-Barbe",
"main": "bot.js",
"repository": {
......
const util = require("./util.js"),
Discord = require("discord.js"),
{ client, isAdmin, jpeuxÉcrire, getChannel } = require("./discordCore.js"),
{ auth, comm, error } = require("./util_Strun.js"),
{ auth, client, isAdmin, jpeuxÉcrire, getChannel } = require("./discordCore.js"),
{ comm, error } = require("./util_Strun.js"),
servers = require("./savedData/DataSaver.class.js")("spoy", { channel: null, logEdits: true, logAdmins: false, ignoredChannels: [] }),
deleteIgnore = [];
let myId, master;
......
......@@ -41,17 +41,16 @@ class StrunError extends Error {
}
module.exports = {
crisseBarbes: crisseBarbes,
checkCrisseBarbe: checkCrisseBarbe,
niceJSONDisplay: niceJSONDisplay,
parseParam: parseParam,
insulte: insulte,
insultePluriel: insultePluriel,
voyelles: voyelles,
delayedMsgDelete: delayedMsgDelete,
crisseBarbes,
checkCrisseBarbe,
niceJSONDisplay,
parseParam,
insulte,
insultePluriel,
voyelles,
delayedMsgDelete,
StrunError: StrunError,
error: error,
auth: require("./auth.json"),
error,
init: function(comm, master) {
this.comm = comm;
......
const util = require("./util.js"),
client = require("./discordCore.js").client,
{ auth, client } = require("./discordCore.js"),
{ StrunError, error, comm, auth } = require("./util_Strun.js"),
{ StrunError, error, comm } = require("./util_Strun.js"),
historique = new Map(),
......
const fs = require("fs"),
util = require("./util.js"),
{
client, checkMaster,
auth, client, checkMaster,
getUser, getUsers, getMember, getMembers
} = require("./discordCore.js"),
{
auth, comm, error,
comm, error,
insulte,
voyelles,
niceJSONDisplay
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment