mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 13:14:58 +05:00
Фикс проблем ESLint
This commit is contained in:
parent
65261568ca
commit
8a0217010a
159 changed files with 592 additions and 648 deletions
60
base/JaBa.js
60
base/JaBa.js
|
@ -63,7 +63,7 @@ class JaBa extends Client {
|
||||||
|
|
||||||
this.player
|
this.player
|
||||||
.on("playSong", async (queue, song) => {
|
.on("playSong", async (queue, song) => {
|
||||||
const m = await queue.textChannel.send({ content: this.translate("music/play:NOW_PLAYING", { songName: song.name }) })
|
const m = await queue.textChannel.send({ content: this.translate("music/play:NOW_PLAYING", { songName: song.name }) });
|
||||||
if (!song.isLive) {
|
if (!song.isLive) {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (m.deletable) m.delete();
|
if (m.deletable) m.delete();
|
||||||
|
@ -77,7 +77,7 @@ class JaBa extends Client {
|
||||||
.on("addSong", (queue, song) => queue.textChannel.send({ content: this.translate("music/play:ADDED_QUEUE", { songName: song.name }) }))
|
.on("addSong", (queue, song) => queue.textChannel.send({ content: this.translate("music/play:ADDED_QUEUE", { songName: song.name }) }))
|
||||||
.on("addList", (queue, playlist) => queue.textChannel.send({ content: this.translate("music/play:ADDED_QUEUE_COUNT", { songCount: playlist.songs.length }) }))
|
.on("addList", (queue, playlist) => queue.textChannel.send({ content: this.translate("music/play:ADDED_QUEUE_COUNT", { songCount: playlist.songs.length }) }))
|
||||||
.on("searchResult", (message, result) => {
|
.on("searchResult", (message, result) => {
|
||||||
let i = 0
|
let i = 0;
|
||||||
const embed = new MessageEmbed()
|
const embed = new MessageEmbed()
|
||||||
.setDescription(Util.escapeSpoiler(result.map(song => `**${++i} -** ${song.name}`).join("\n")))
|
.setDescription(Util.escapeSpoiler(result.map(song => `**${++i} -** ${song.name}`).join("\n")))
|
||||||
.setFooter({ text: this.translate("music/play:RESULTS_FOOTER") })
|
.setFooter({ text: this.translate("music/play:RESULTS_FOOTER") })
|
||||||
|
@ -105,11 +105,11 @@ class JaBa extends Client {
|
||||||
reaction: "🎉"
|
reaction: "🎉"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
get defaultLanguage() {
|
get defaultLanguage() {
|
||||||
return this.languages.find(language => language.default).name;
|
return this.languages.find(language => language.default).name;
|
||||||
};
|
}
|
||||||
|
|
||||||
translate(key, args, locale) {
|
translate(key, args, locale) {
|
||||||
if (!locale) locale = this.defaultLanguage;
|
if (!locale) locale = this.defaultLanguage;
|
||||||
|
@ -117,7 +117,7 @@ class JaBa extends Client {
|
||||||
if (!language) throw "Invalid language set in data.";
|
if (!language) throw "Invalid language set in data.";
|
||||||
|
|
||||||
return language(key, args);
|
return language(key, args);
|
||||||
};
|
}
|
||||||
|
|
||||||
printDate(date, format, locale) {
|
printDate(date, format, locale) {
|
||||||
if (!locale) locale = this.defaultLanguage;
|
if (!locale) locale = this.defaultLanguage;
|
||||||
|
@ -127,7 +127,7 @@ class JaBa extends Client {
|
||||||
return moment(new Date(date))
|
return moment(new Date(date))
|
||||||
.locale(languageData.moment)
|
.locale(languageData.moment)
|
||||||
.format(format);
|
.format(format);
|
||||||
};
|
}
|
||||||
|
|
||||||
convertTime(time, type, noPrefix, locale) {
|
convertTime(time, type, noPrefix, locale) {
|
||||||
if (!type) time = "to";
|
if (!type) time = "to";
|
||||||
|
@ -136,7 +136,7 @@ class JaBa extends Client {
|
||||||
const m = moment(time).locale(languageData.moment);
|
const m = moment(time).locale(languageData.moment);
|
||||||
|
|
||||||
return (type === "to" ? m.toNow(noPrefix) : m.fromNow(noPrefix));
|
return (type === "to" ? m.toNow(noPrefix) : m.fromNow(noPrefix));
|
||||||
};
|
}
|
||||||
|
|
||||||
getNoun(number, one, two, five) {
|
getNoun(number, one, two, five) {
|
||||||
let n = Math.abs(number);
|
let n = Math.abs(number);
|
||||||
|
@ -147,7 +147,7 @@ class JaBa extends Client {
|
||||||
if (n >= 2 && n <= 4) return two;
|
if (n >= 2 && n <= 4) return two;
|
||||||
|
|
||||||
return five;
|
return five;
|
||||||
};
|
}
|
||||||
|
|
||||||
// This function is used to load a command and add it to the collection
|
// This function is used to load a command and add it to the collection
|
||||||
loadCommand(commandPath, commandName) {
|
loadCommand(commandPath, commandName) {
|
||||||
|
@ -165,8 +165,8 @@ class JaBa extends Client {
|
||||||
return false;
|
return false;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return `Unable to load command ${commandName}: ${e}`;
|
return `Unable to load command ${commandName}: ${e}`;
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
// This function is used to unload a command (you need to load them again)
|
// This function is used to unload a command (you need to load them again)
|
||||||
async unloadCommand(commandPath, commandName) {
|
async unloadCommand(commandPath, commandName) {
|
||||||
|
@ -180,7 +180,7 @@ class JaBa extends Client {
|
||||||
delete require.cache[require.resolve(`.${commandPath}${path.sep}${commandName}.js`)];
|
delete require.cache[require.resolve(`.${commandPath}${path.sep}${commandName}.js`)];
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
};
|
}
|
||||||
|
|
||||||
// This function is used to find a user data or create it
|
// This function is used to find a user data or create it
|
||||||
async findOrCreateUser({ id: userID }, isLean) {
|
async findOrCreateUser({ id: userID }, isLean) {
|
||||||
|
@ -203,9 +203,9 @@ class JaBa extends Client {
|
||||||
this.databaseCache.users.set(userID, userData);
|
this.databaseCache.users.set(userID, userData);
|
||||||
|
|
||||||
return isLean ? userData.toJSON() : userData;
|
return isLean ? userData.toJSON() : userData;
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
// This function is used to find a member data or create it
|
// This function is used to find a member data or create it
|
||||||
async findOrCreateMember({ id: memberID, guildID }, isLean) {
|
async findOrCreateMember({ id: memberID, guildID }, isLean) {
|
||||||
|
@ -234,13 +234,13 @@ class JaBa extends Client {
|
||||||
if (guild) {
|
if (guild) {
|
||||||
guild.members.push(memberData._id);
|
guild.members.push(memberData._id);
|
||||||
await guild.save();
|
await guild.save();
|
||||||
};
|
}
|
||||||
this.databaseCache.members.set(`${memberID}${guildID}`, memberData);
|
this.databaseCache.members.set(`${memberID}${guildID}`, memberData);
|
||||||
|
|
||||||
return isLean ? memberData.toJSON() : memberData;
|
return isLean ? memberData.toJSON() : memberData;
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
// This function is used to find a guild data or create it
|
// This function is used to find a guild data or create it
|
||||||
async findOrCreateGuild({ id: guildID }, isLean) {
|
async findOrCreateGuild({ id: guildID }, isLean) {
|
||||||
|
@ -263,9 +263,9 @@ class JaBa extends Client {
|
||||||
this.databaseCache.guilds.set(guildID, guildData);
|
this.databaseCache.guilds.set(guildID, guildData);
|
||||||
|
|
||||||
return isLean ? guildData.toJSON() : guildData;
|
return isLean ? guildData.toJSON() : guildData;
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
// This function is used to resolve a user from a string
|
// This function is used to resolve a user from a string
|
||||||
async resolveUser(search) {
|
async resolveUser(search) {
|
||||||
|
@ -277,7 +277,7 @@ class JaBa extends Client {
|
||||||
const id = search.match(/^<@!?(\d+)>$/)[1];
|
const id = search.match(/^<@!?(\d+)>$/)[1];
|
||||||
user = this.users.fetch(id).catch(() => {});
|
user = this.users.fetch(id).catch(() => {});
|
||||||
if (user) return user;
|
if (user) return user;
|
||||||
};
|
}
|
||||||
|
|
||||||
// Try username search
|
// Try username search
|
||||||
if (search.match(/^!?(\w+)#(\d+)$/)) {
|
if (search.match(/^!?(\w+)#(\d+)$/)) {
|
||||||
|
@ -285,11 +285,11 @@ class JaBa extends Client {
|
||||||
const discriminator = search.match(/^!?(\w+)#(\d+)$/)[1];
|
const discriminator = search.match(/^!?(\w+)#(\d+)$/)[1];
|
||||||
user = this.users.find((u) => u.username === username && u.discriminator === discriminator);
|
user = this.users.find((u) => u.username === username && u.discriminator === discriminator);
|
||||||
if (user) return user;
|
if (user) return user;
|
||||||
};
|
}
|
||||||
user = await this.users.fetch(search).catch(() => {});
|
user = await this.users.fetch(search).catch(() => {});
|
||||||
|
|
||||||
return user;
|
return user;
|
||||||
};
|
}
|
||||||
|
|
||||||
async resolveMember(search, guild) {
|
async resolveMember(search, guild) {
|
||||||
let member = null;
|
let member = null;
|
||||||
|
@ -300,18 +300,18 @@ class JaBa extends Client {
|
||||||
const id = search.match(/^<@!?(\d+)>$/)[1];
|
const id = search.match(/^<@!?(\d+)>$/)[1];
|
||||||
member = await guild.members.fetch(id).catch(() => {});
|
member = await guild.members.fetch(id).catch(() => {});
|
||||||
if (member) return member;
|
if (member) return member;
|
||||||
};
|
}
|
||||||
|
|
||||||
// Try username search
|
// Try username search
|
||||||
if (search.match(/^!?(\w+)#(\d+)$/)) {
|
if (search.match(/^!?(\w+)#(\d+)$/)) {
|
||||||
guild = await guild.fetch();
|
guild = await guild.fetch();
|
||||||
member = guild.members.cache.find((m) => m.user.tag === search);
|
member = guild.members.cache.find((m) => m.user.tag === search);
|
||||||
if (member) return member;
|
if (member) return member;
|
||||||
};
|
}
|
||||||
member = await guild.members.fetch(search).catch(() => {});
|
member = await guild.members.fetch(search).catch(() => {});
|
||||||
|
|
||||||
return member;
|
return member;
|
||||||
};
|
}
|
||||||
|
|
||||||
async resolveRole(search, guild) {
|
async resolveRole(search, guild) {
|
||||||
let role = null;
|
let role = null;
|
||||||
|
@ -322,7 +322,7 @@ class JaBa extends Client {
|
||||||
const id = search.match(/^<@&!?(\d+)>$/)[1];
|
const id = search.match(/^<@&!?(\d+)>$/)[1];
|
||||||
role = guild.roles.cache.get(id);
|
role = guild.roles.cache.get(id);
|
||||||
if (role) return role;
|
if (role) return role;
|
||||||
};
|
}
|
||||||
|
|
||||||
// Try name search
|
// Try name search
|
||||||
role = guild.roles.cache.find((r) => search === r.name);
|
role = guild.roles.cache.find((r) => search === r.name);
|
||||||
|
@ -330,7 +330,7 @@ class JaBa extends Client {
|
||||||
role = guild.roles.cache.get(search);
|
role = guild.roles.cache.get(search);
|
||||||
|
|
||||||
return role;
|
return role;
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = JaBa;
|
module.exports = JaBa;
|
|
@ -6,7 +6,7 @@ const genToken = () => {
|
||||||
const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwzy0123456789.-_";
|
const characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwzy0123456789.-_";
|
||||||
for (let i = 0; i < 32; i++) {
|
for (let i = 0; i < 32; i++) {
|
||||||
token += characters.charAt(Math.floor(Math.random() * characters.length));
|
token += characters.charAt(Math.floor(Math.random() * characters.length));
|
||||||
};
|
}
|
||||||
return token;
|
return token;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ userSchema.method("getAchievements", async function() {
|
||||||
for (let i = 0; i < images.length; i++) {
|
for (let i = 0; i < images.length; i++) {
|
||||||
await ctx.drawImage(images[i], dim, 10, 350, 200);
|
await ctx.drawImage(images[i], dim, 10, 350, 200);
|
||||||
dim += 200;
|
dim += 200;
|
||||||
};
|
}
|
||||||
|
|
||||||
return canvas.toBuffer();
|
return canvas.toBuffer();
|
||||||
});
|
});
|
||||||
|
|
|
@ -37,6 +37,6 @@ class Addcommand extends Command {
|
||||||
prefix: data.guild.prefix
|
prefix: data.guild.prefix
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Addcommand;
|
module.exports = Addcommand;
|
|
@ -33,6 +33,6 @@ class Addemoji extends Command {
|
||||||
emojiName: name
|
emojiName: name
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Addemoji;
|
module.exports = Addemoji;
|
|
@ -47,9 +47,9 @@ class Automod extends Command {
|
||||||
data.guild.markModified("plugins.automod");
|
data.guild.markModified("plugins.automod");
|
||||||
data.guild.save();
|
data.guild.save();
|
||||||
message.success("administration/automod:DISABLED");
|
message.success("administration/automod:DISABLED");
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Automod;
|
module.exports = Automod;
|
|
@ -53,8 +53,8 @@ class Autorole extends Command {
|
||||||
message.success("administration/autorole:SUCCESS_DISABLED", {
|
message.success("administration/autorole:SUCCESS_DISABLED", {
|
||||||
prefix: data.guild.prefix
|
prefix: data.guild.prefix
|
||||||
});
|
});
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Autorole;
|
module.exports = Autorole;
|
|
@ -121,8 +121,8 @@ class Backup extends Command {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return message.error("administration/backup:MISSING_STATUS");
|
return message.error("administration/backup:MISSING_STATUS");
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Backup;
|
module.exports = Backup;
|
|
@ -91,6 +91,6 @@ class Configuration extends Command {
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Configuration;
|
module.exports = Configuration;
|
|
@ -28,6 +28,6 @@ class Delcommand extends Command {
|
||||||
commandName: name
|
commandName: name
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Delcommand;
|
module.exports = Delcommand;
|
|
@ -28,8 +28,8 @@ class Deletemod extends Command {
|
||||||
data.guild.autoDeleteModCommands = false;
|
data.guild.autoDeleteModCommands = false;
|
||||||
data.guild.save();
|
data.guild.save();
|
||||||
message.success("administration/deletemod:DISABLED");
|
message.success("administration/deletemod:DISABLED");
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Deletemod;
|
module.exports = Deletemod;
|
|
@ -21,7 +21,7 @@ class Goodbye extends Command {
|
||||||
if (args[0] === "test" && data.guild.plugins.goodbye.enabled) {
|
if (args[0] === "test" && data.guild.plugins.goodbye.enabled) {
|
||||||
this.client.emit("guildMemberRemove", message.member);
|
this.client.emit("guildMemberRemove", message.member);
|
||||||
return message.success("administration/goodbye:TEST_SUCCESS");
|
return message.success("administration/goodbye:TEST_SUCCESS");
|
||||||
};
|
}
|
||||||
|
|
||||||
if ((!args[0] || !["edit", "off"].includes(args[0])) && data.guild.plugins.goodbye.enabled) return message.error("administration/goodbye:MISSING_STATUS");
|
if ((!args[0] || !["edit", "off"].includes(args[0])) && data.guild.plugins.goodbye.enabled) return message.error("administration/goodbye:MISSING_STATUS");
|
||||||
|
|
||||||
|
@ -58,13 +58,10 @@ class Goodbye extends Command {
|
||||||
collector.on("collect", async msg => {
|
collector.on("collect", async msg => {
|
||||||
// If the message is filled, it means the user sent yes or no for the image
|
// If the message is filled, it means the user sent yes or no for the image
|
||||||
if (goodbye.message) {
|
if (goodbye.message) {
|
||||||
if (msg.content.toLowerCase() === message.translate("common:YES").toLowerCase()) {
|
if (msg.content.toLowerCase() === message.translate("common:YES").toLowerCase()) goodbye.withImage = true;
|
||||||
goodbye.withImage = true;
|
else if (msg.content.toLowerCase() === message.translate("common:NO").toLowerCase()) goodbye.withImage = false;
|
||||||
} else if (msg.content.toLowerCase() === message.translate("common:NO").toLowerCase()) {
|
else return message.error("misc:INVALID_YES_NO");
|
||||||
goodbye.withImage = false;
|
|
||||||
} else {
|
|
||||||
return message.error("misc:INVALID_YES_NO");
|
|
||||||
};
|
|
||||||
data.guild.plugins.goodbye = goodbye;
|
data.guild.plugins.goodbye = goodbye;
|
||||||
data.guild.markModified("plugins.goodbye");
|
data.guild.markModified("plugins.goodbye");
|
||||||
await data.guild.save();
|
await data.guild.save();
|
||||||
|
@ -73,16 +70,16 @@ class Goodbye extends Command {
|
||||||
channel: `<#${goodbye.channel}>`
|
channel: `<#${goodbye.channel}>`
|
||||||
});
|
});
|
||||||
return collector.stop();
|
return collector.stop();
|
||||||
};
|
}
|
||||||
|
|
||||||
// If the channel is filled and the message is not, it means the user sent the message
|
// If the channel is filled and the message is not, it means the user sent the message
|
||||||
if (goodbye.channel && !goodbye.message) {
|
if (goodbye.channel && !goodbye.message) {
|
||||||
if (msg.content.length < 1800) {
|
if (msg.content.length < 1800) {
|
||||||
goodbye.message = msg.content;
|
goodbye.message = msg.content;
|
||||||
return message.sendT("administration/goodbye:FORM_3");
|
return message.sendT("administration/goodbye:FORM_3");
|
||||||
};
|
}
|
||||||
return message.error("administration/goodbye:MAX_CHARACT");
|
return message.error("administration/goodbye:MAX_CHARACT");
|
||||||
};
|
}
|
||||||
|
|
||||||
// If the channel is not filled, it means the user sent it
|
// If the channel is not filled, it means the user sent it
|
||||||
if (!goodbye.channel) {
|
if (!goodbye.channel) {
|
||||||
|
@ -98,14 +95,14 @@ class Goodbye extends Command {
|
||||||
author: msg.author.tag,
|
author: msg.author.tag,
|
||||||
memberCount: msg.guild.memberCount
|
memberCount: msg.guild.memberCount
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
collector.on("end", (_, reason) => {
|
collector.on("end", (_, reason) => {
|
||||||
if (reason === "time") return message.error("misc:TIMES_UP");
|
if (reason === "time") return message.error("misc:TIMES_UP");
|
||||||
});
|
});
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Goodbye;
|
module.exports = Goodbye;
|
|
@ -34,8 +34,8 @@ class Ignore extends Command {
|
||||||
return message.success("administration/ignore:IGNORED", {
|
return message.success("administration/ignore:IGNORED", {
|
||||||
channel: channel.toString()
|
channel: channel.toString()
|
||||||
});
|
});
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Ignore;
|
module.exports = Ignore;
|
|
@ -16,7 +16,7 @@ class Set extends Command {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, args, data) {
|
async run(message, args) {
|
||||||
const status = args[0];
|
const status = args[0];
|
||||||
if (!status || !["level", "xp", "credits", "bank"].includes(status)) return message.error("administration/set:NO_STATUS");
|
if (!status || !["level", "xp", "credits", "bank"].includes(status)) return message.error("administration/set:NO_STATUS");
|
||||||
|
|
||||||
|
@ -52,6 +52,6 @@ class Set extends Command {
|
||||||
amount
|
amount
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Set;
|
module.exports = Set;
|
|
@ -38,8 +38,8 @@ class Setbirthdays extends Command {
|
||||||
return message.success("administration/setbirthdays:ENABLED", {
|
return message.success("administration/setbirthdays:ENABLED", {
|
||||||
channel: channel.toString()
|
channel: channel.toString()
|
||||||
});
|
});
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Setbirthdays;
|
module.exports = Setbirthdays;
|
|
@ -28,6 +28,6 @@ class Setlang extends Command {
|
||||||
lang: language.nativeName
|
lang: language.nativeName
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Setlang;
|
module.exports = Setlang;
|
|
@ -38,8 +38,8 @@ class Setmodlogs extends Command {
|
||||||
return message.success("administration/setmodlogs:ENABLED", {
|
return message.success("administration/setmodlogs:ENABLED", {
|
||||||
channel: channel.toString()
|
channel: channel.toString()
|
||||||
});
|
});
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Setmodlogs;
|
module.exports = Setmodlogs;
|
|
@ -28,6 +28,6 @@ class Setprefix extends Command {
|
||||||
prefix
|
prefix
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Setprefix;
|
module.exports = Setprefix;
|
|
@ -38,8 +38,8 @@ class Setreports extends Command {
|
||||||
return message.success("administration/setreports:ENABLED", {
|
return message.success("administration/setreports:ENABLED", {
|
||||||
channel: channel.toString()
|
channel: channel.toString()
|
||||||
});
|
});
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Setreports;
|
module.exports = Setreports;
|
|
@ -38,8 +38,8 @@ class Setsuggests extends Command {
|
||||||
return message.success("administration/setsuggests:ENABLED", {
|
return message.success("administration/setsuggests:ENABLED", {
|
||||||
channel: channel.toString()
|
channel: channel.toString()
|
||||||
});
|
});
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Setsuggests;
|
module.exports = Setsuggests;
|
|
@ -47,8 +47,8 @@ class Slowmode extends Command {
|
||||||
channel: `#${channel.name}`,
|
channel: `#${channel.name}`,
|
||||||
time: this.client.functions.convertTime(message.guild, ms(time))
|
time: this.client.functions.convertTime(message.guild, ms(time))
|
||||||
});
|
});
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Slowmode;
|
module.exports = Slowmode;
|
|
@ -21,7 +21,7 @@ class Welcome extends Command {
|
||||||
if (args[0] === "test" && data.guild.plugins.welcome.enabled) {
|
if (args[0] === "test" && data.guild.plugins.welcome.enabled) {
|
||||||
this.client.emit("guildMemberAdd", message.member);
|
this.client.emit("guildMemberAdd", message.member);
|
||||||
return message.success("administration/welcome:TEST_SUCCESS");
|
return message.success("administration/welcome:TEST_SUCCESS");
|
||||||
};
|
}
|
||||||
|
|
||||||
if ((!args[0] || !["edit", "off"].includes(args[0])) && data.guild.plugins.welcome.enabled) return message.error("administration/welcome:MISSING_STATUS");
|
if ((!args[0] || !["edit", "off"].includes(args[0])) && data.guild.plugins.welcome.enabled) return message.error("administration/welcome:MISSING_STATUS");
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@ class Welcome extends Command {
|
||||||
welcome.withImage = false;
|
welcome.withImage = false;
|
||||||
} else {
|
} else {
|
||||||
return message.error("misc:INVALID_YES_NO");
|
return message.error("misc:INVALID_YES_NO");
|
||||||
};
|
}
|
||||||
data.guild.plugins.welcome = welcome;
|
data.guild.plugins.welcome = welcome;
|
||||||
data.guild.markModified("plugins.welcome");
|
data.guild.markModified("plugins.welcome");
|
||||||
await data.guild.save();
|
await data.guild.save();
|
||||||
|
@ -73,16 +73,16 @@ class Welcome extends Command {
|
||||||
channel: `<#${welcome.channel}>`
|
channel: `<#${welcome.channel}>`
|
||||||
});
|
});
|
||||||
return collector.stop();
|
return collector.stop();
|
||||||
};
|
}
|
||||||
|
|
||||||
// If the channel is filled and the message is not, it means the user sent the message
|
// If the channel is filled and the message is not, it means the user sent the message
|
||||||
if (welcome.channel && !welcome.message) {
|
if (welcome.channel && !welcome.message) {
|
||||||
if (msg.content.length < 1800) {
|
if (msg.content.length < 1800) {
|
||||||
welcome.message = msg.content;
|
welcome.message = msg.content;
|
||||||
return message.sendT("administration/welcome:FORM_3");
|
return message.sendT("administration/welcome:FORM_3");
|
||||||
};
|
}
|
||||||
return message.error("administration/goodbye:MAX_CHARACT");
|
return message.error("administration/goodbye:MAX_CHARACT");
|
||||||
};
|
}
|
||||||
|
|
||||||
// If the channel is not filled, it means the user sent it
|
// If the channel is not filled, it means the user sent it
|
||||||
if (!welcome.channel) {
|
if (!welcome.channel) {
|
||||||
|
@ -98,16 +98,14 @@ class Welcome extends Command {
|
||||||
author: msg.author.tag,
|
author: msg.author.tag,
|
||||||
memberCount: msg.guild.memberCount
|
memberCount: msg.guild.memberCount
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
collector.on("end", (_, reason) => {
|
collector.on("end", (_, reason) => {
|
||||||
if (reason === "time") {
|
if (reason === "time") return message.error("misc:TIMES_UP");
|
||||||
return message.error("misc:TIMES_UP");
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Welcome;
|
module.exports = Welcome;
|
|
@ -75,6 +75,6 @@ class Achievements extends Command {
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Achievements;
|
module.exports = Achievements;
|
|
@ -45,6 +45,6 @@ class Birthdate extends Command {
|
||||||
date: message.printDate(d)
|
date: message.printDate(d)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Birthdate;
|
module.exports = Birthdate;
|
|
@ -26,7 +26,7 @@ class Deposit extends Command {
|
||||||
} else {
|
} else {
|
||||||
if (isNaN(amount) || parseInt(amount, 10) < 1) return message.error("economy/deposit:MISSING_AMOUNT");
|
if (isNaN(amount) || parseInt(amount, 10) < 1) return message.error("economy/deposit:MISSING_AMOUNT");
|
||||||
amount = parseInt(amount, 10);
|
amount = parseInt(amount, 10);
|
||||||
};
|
}
|
||||||
|
|
||||||
if (data.memberData.money < amount) return message.error("economy/deposit:NOT_ENOUGH_CREDIT", { money: `**${amount}** ${message.getNoun(amount, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}` });
|
if (data.memberData.money < amount) return message.error("economy/deposit:NOT_ENOUGH_CREDIT", { money: `**${amount}** ${message.getNoun(amount, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}` });
|
||||||
|
|
||||||
|
@ -47,6 +47,6 @@ class Deposit extends Command {
|
||||||
money: `**${amount}** ${message.getNoun(amount, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`
|
money: `**${amount}** ${message.getNoun(amount, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Deposit;
|
module.exports = Deposit;
|
|
@ -39,6 +39,6 @@ class Divorce extends Command {
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Divorce;
|
module.exports = Divorce;
|
|
@ -83,11 +83,11 @@ class Leaderboard extends Command {
|
||||||
message.channel.send({
|
message.channel.send({
|
||||||
content: "```\n" + newTable.toString() + "```"
|
content: "```\n" + newTable.toString() + "```"
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
if (isOnlyOnMobile) message.sendT("economy/leaderboard:MOBILE");
|
if (isOnlyOnMobile) message.sendT("economy/leaderboard:MOBILE");
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Leaderboard;
|
module.exports = Leaderboard;
|
||||||
|
|
||||||
|
@ -105,4 +105,4 @@ async function fetchUsers(array, table, client) {
|
||||||
});
|
});
|
||||||
resolve(table);
|
resolve(table);
|
||||||
});
|
});
|
||||||
};
|
}
|
|
@ -58,8 +58,8 @@ class Marry extends Command {
|
||||||
firstUsername: member.user.tag,
|
firstUsername: member.user.tag,
|
||||||
secondUsername: user.tag
|
secondUsername: user.tag
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
// Update pending requests
|
// Update pending requests
|
||||||
pendings[message.author.id] = member.id;
|
pendings[message.author.id] = member.id;
|
||||||
|
@ -82,17 +82,13 @@ class Marry extends Command {
|
||||||
return collector.stop(false);
|
return collector.stop(false);
|
||||||
} else {
|
} else {
|
||||||
return message.error("misc:INVALID_YES_NO");
|
return message.error("misc:INVALID_YES_NO");
|
||||||
};
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
collector.on("end", async (_collected, reason) => {
|
collector.on("end", async (_collected, reason) => {
|
||||||
// Delete pending request
|
// Delete pending request
|
||||||
delete pendings[message.author.id];
|
delete pendings[message.author.id];
|
||||||
if (reason === "time") {
|
if (reason === "time") return message.error("economy/marry:TIMEOUT", { username: member.user.toString() });
|
||||||
return message.error("economy/marry:TIMEOUT", {
|
|
||||||
username: member.user.toString()
|
|
||||||
});
|
|
||||||
};
|
|
||||||
if (reason) {
|
if (reason) {
|
||||||
data.userData.lover = member.id;
|
data.userData.lover = member.id;
|
||||||
await data.userData.save();
|
await data.userData.save();
|
||||||
|
@ -113,14 +109,14 @@ class Marry extends Command {
|
||||||
userData.achievements.married.progress.now = 1;
|
userData.achievements.married.progress.now = 1;
|
||||||
userData.markModified("achievements.married");
|
userData.markModified("achievements.married");
|
||||||
userData.save();
|
userData.save();
|
||||||
};
|
}
|
||||||
if (!data.userData.achievements.married.achieved) {
|
if (!data.userData.achievements.married.achieved) {
|
||||||
if (!sent) message.channel.send(messageOptions);
|
if (!sent) message.channel.send(messageOptions);
|
||||||
data.userData.achievements.married.achieved = true;
|
data.userData.achievements.married.achieved = true;
|
||||||
data.userData.achievements.married.progress.now = 1;
|
data.userData.achievements.married.progress.now = 1;
|
||||||
data.userData.markModified("achievements.married");
|
data.userData.markModified("achievements.married");
|
||||||
data.userData.save();
|
data.userData.save();
|
||||||
};
|
}
|
||||||
return message.success("economy/marry:SUCCESS", {
|
return message.success("economy/marry:SUCCESS", {
|
||||||
creator: message.author.toString(),
|
creator: message.author.toString(),
|
||||||
partner: member.user.toString()
|
partner: member.user.toString()
|
||||||
|
@ -130,9 +126,9 @@ class Marry extends Command {
|
||||||
creator: message.author.toString(),
|
creator: message.author.toString(),
|
||||||
partner: member.user.toString()
|
partner: member.user.toString()
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Marry;
|
module.exports = Marry;
|
|
@ -70,6 +70,6 @@ class Money extends Command {
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Money;
|
module.exports = Money;
|
|
@ -54,6 +54,6 @@ class Pay extends Command {
|
||||||
username: member.user.tag
|
username: member.user.tag
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Pay;
|
module.exports = Pay;
|
|
@ -26,7 +26,7 @@ class Profile extends Command {
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, args, data) {
|
async run(message, args, data) {
|
||||||
const arg = args[0] || message.author
|
const arg = args[0] || message.author;
|
||||||
let member = await this.client.resolveMember(arg, message.guild);
|
let member = await this.client.resolveMember(arg, message.guild);
|
||||||
if (!member) member = message.member;
|
if (!member) member = message.member;
|
||||||
if (member.user.bot) return message.error("economy/profile:BOT_USER");
|
if (member.user.bot) return message.error("economy/profile:BOT_USER");
|
||||||
|
@ -92,6 +92,6 @@ class Profile extends Command {
|
||||||
}]
|
}]
|
||||||
}); // Send the embed in the current channel
|
}); // Send the embed in the current channel
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Profile;
|
module.exports = Profile;
|
|
@ -28,7 +28,7 @@ class Rep extends Command {
|
||||||
if (isInCooldown > Date.now()) return message.error("economy/rep:COOLDOWN", {
|
if (isInCooldown > Date.now()) return message.error("economy/rep:COOLDOWN", {
|
||||||
time: message.convertTime(isInCooldown, "to", true)
|
time: message.convertTime(isInCooldown, "to", true)
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
const user = await this.client.resolveUser(args[0]);
|
const user = await this.client.resolveUser(args[0]);
|
||||||
if (!user) return message.error("economy/rep:INVALID_USER");
|
if (!user) return message.error("economy/rep:INVALID_USER");
|
||||||
|
@ -56,15 +56,15 @@ class Rep extends Command {
|
||||||
attachment: "./assets/img/achievements/achievement_unlocked6.png"
|
attachment: "./assets/img/achievements/achievement_unlocked6.png"
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
userData.markModified("achievements.rep");
|
userData.markModified("achievements.rep");
|
||||||
};
|
}
|
||||||
await userData.save();
|
await userData.save();
|
||||||
|
|
||||||
message.success("economy/rep:SUCCESS", {
|
message.success("economy/rep:SUCCESS", {
|
||||||
username: user.username
|
username: user.username
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Rep;
|
module.exports = Rep;
|
|
@ -28,7 +28,7 @@ class Rob extends Command {
|
||||||
const isInCooldown = memberData.cooldowns.rob || 0;
|
const isInCooldown = memberData.cooldowns.rob || 0;
|
||||||
if (isInCooldown) {
|
if (isInCooldown) {
|
||||||
if (isInCooldown > Date.now()) return message.error("economy/rob:COOLDOWN", { username: member.user.tag });
|
if (isInCooldown > Date.now()) return message.error("economy/rob:COOLDOWN", { username: member.user.tag });
|
||||||
};
|
}
|
||||||
|
|
||||||
let amountToRob = args[1];
|
let amountToRob = args[1];
|
||||||
if (!amountToRob || isNaN(amountToRob) || parseInt(amountToRob, 10) <= 0) return message.error("economy/rob:MISSING_AMOUNT", { username: member.user.username });
|
if (!amountToRob || isNaN(amountToRob) || parseInt(amountToRob, 10) <= 0) return message.error("economy/rob:MISSING_AMOUNT", { username: member.user.username });
|
||||||
|
@ -71,8 +71,8 @@ class Rob extends Command {
|
||||||
memberData.money += won;
|
memberData.money += won;
|
||||||
memberData.save();
|
memberData.save();
|
||||||
data.memberData.save();
|
data.memberData.save();
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Rob;
|
module.exports = Rob;
|
|
@ -25,6 +25,6 @@ class Setbio extends Command {
|
||||||
message.success("economy/setbio:SUCCESS");
|
message.success("economy/setbio:SUCCESS");
|
||||||
await data.userData.save();
|
await data.userData.save();
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Setbio;
|
module.exports = Setbio;
|
|
@ -42,7 +42,7 @@ class Slots extends Command {
|
||||||
else if (isJackpot) number = number * 4;
|
else if (isJackpot) number = number * 4;
|
||||||
|
|
||||||
return Math.round(number);
|
return Math.round(number);
|
||||||
};
|
}
|
||||||
|
|
||||||
const tmsg = await message.sendT("misc:PLEASE_WAIT", null, {
|
const tmsg = await message.sendT("misc:PLEASE_WAIT", null, {
|
||||||
prefixEmoji: "loading"
|
prefixEmoji: "loading"
|
||||||
|
@ -105,13 +105,13 @@ class Slots extends Command {
|
||||||
attachment: "./assets/img/achievements/achievement_unlocked4.png"
|
attachment: "./assets/img/achievements/achievement_unlocked4.png"
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
data.userData.markModified("achievements.slots");
|
data.userData.markModified("achievements.slots");
|
||||||
await data.userData.save();
|
await data.userData.save();
|
||||||
};
|
}
|
||||||
await data.memberData.save();
|
await data.memberData.save();
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
|
|
||||||
if (colonnes[0][i2] == colonnes[1][j2] || colonnes[1][j2] == colonnes[2][k2] || colonnes[0][i2] == colonnes[2][k2]) {
|
if (colonnes[0][i2] == colonnes[1][j2] || colonnes[1][j2] == colonnes[2][k2] || colonnes[0][i2] == colonnes[2][k2]) {
|
||||||
msg += "| : : : **" + (message.translate("common:VICTORY").toUpperCase()) + "** : : : |";
|
msg += "| : : : **" + (message.translate("common:VICTORY").toUpperCase()) + "** : : : |";
|
||||||
|
@ -146,13 +146,13 @@ class Slots extends Command {
|
||||||
attachment: "./assets/img/achievements/achievement_unlocked4.png"
|
attachment: "./assets/img/achievements/achievement_unlocked4.png"
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
data.userData.markModified("achievements.slots");
|
data.userData.markModified("achievements.slots");
|
||||||
await data.userData.save();
|
await data.userData.save();
|
||||||
};
|
}
|
||||||
await data.memberData.save();
|
await data.memberData.save();
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
|
|
||||||
msg += "| : : : **" + (message.translate("common:DEFEAT").toUpperCase()) + "** : : : |";
|
msg += "| : : : **" + (message.translate("common:DEFEAT").toUpperCase()) + "** : : : |";
|
||||||
message.channel.send({
|
message.channel.send({
|
||||||
|
@ -176,10 +176,10 @@ class Slots extends Command {
|
||||||
data.userData.achievements.slots.progress.now = 0;
|
data.userData.achievements.slots.progress.now = 0;
|
||||||
data.userData.markModified("achievements.slots");
|
data.userData.markModified("achievements.slots");
|
||||||
await data.userData.save();
|
await data.userData.save();
|
||||||
};
|
}
|
||||||
await data.memberData.save();
|
await data.memberData.save();
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
|
|
||||||
function editMsg() {
|
function editMsg() {
|
||||||
let msg = "[ :slot_machine: | **СЛОТЫ** ]\n------------------\n";
|
let msg = "[ :slot_machine: | **СЛОТЫ** ]\n------------------\n";
|
||||||
|
@ -199,8 +199,8 @@ class Slots extends Command {
|
||||||
msg += colonnes[0][i3] + " : " + colonnes[1][j3] + " : " + colonnes[2][k3] + "\n";
|
msg += colonnes[0][i3] + " : " + colonnes[1][j3] + " : " + colonnes[2][k3] + "\n";
|
||||||
|
|
||||||
tmsg.edit(msg);
|
tmsg.edit(msg);
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Slots;
|
module.exports = Slots;
|
|
@ -24,8 +24,8 @@ class Transactions extends Command {
|
||||||
if (t.date > timestamp) {
|
if (t.date > timestamp) {
|
||||||
const index = transactions.indexOf(t);
|
const index = transactions.indexOf(t);
|
||||||
transactions.splice(index, 1);
|
transactions.splice(index, 1);
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
const embed = new Discord.MessageEmbed()
|
const embed = new Discord.MessageEmbed()
|
||||||
.setAuthor({
|
.setAuthor({
|
||||||
|
@ -54,13 +54,13 @@ class Transactions extends Command {
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
embed.addField(message.translate("economy/transactions:T_GOT"), sortedTransactions[0].join("\n"), true)
|
embed.addField(message.translate("economy/transactions:T_GOT"), sortedTransactions[0].join("\n"), true);
|
||||||
embed.addField(message.translate("economy/transactions:T_SEND"), sortedTransactions[1].join("\n"), true)
|
embed.addField(message.translate("economy/transactions:T_SEND"), sortedTransactions[1].join("\n"), true);
|
||||||
};
|
}
|
||||||
message.channel.send({
|
message.channel.send({
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Transactions;
|
module.exports = Transactions;
|
|
@ -26,7 +26,7 @@ class Withdraw extends Command {
|
||||||
} else {
|
} else {
|
||||||
if (isNaN(amount) || parseInt(amount, 10) < 1) return message.error("economy/withdraw:MISSING_AMOUNT");
|
if (isNaN(amount) || parseInt(amount, 10) < 1) return message.error("economy/withdraw:MISSING_AMOUNT");
|
||||||
amount = parseInt(amount, 10);
|
amount = parseInt(amount, 10);
|
||||||
};
|
}
|
||||||
|
|
||||||
if (data.memberData.bankSold < amount) return message.error("economy/withdraw:NOT_ENOUGH", { money: `**${amount}** ${message.getNoun(amount, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}` });
|
if (data.memberData.bankSold < amount) return message.error("economy/withdraw:NOT_ENOUGH", { money: `**${amount}** ${message.getNoun(amount, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}` });
|
||||||
|
|
||||||
|
@ -47,6 +47,6 @@ class Withdraw extends Command {
|
||||||
money: `**${amount}** ${message.getNoun(amount, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`
|
money: `**${amount}** ${message.getNoun(amount, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Withdraw;
|
module.exports = Withdraw;
|
|
@ -27,7 +27,7 @@ class Work extends Command {
|
||||||
if (isInCooldown > Date.now()) return message.error("economy/work:COOLDOWN", {
|
if (isInCooldown > Date.now()) return message.error("economy/work:COOLDOWN", {
|
||||||
time: message.convertTime(isInCooldown, "to", true)
|
time: message.convertTime(isInCooldown, "to", true)
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
if (Date.now() > data.memberData.cooldowns.work + (24 * 3600000)) data.memberData.workStreak = 0;
|
if (Date.now() > data.memberData.cooldowns.work + (24 * 3600000)) data.memberData.workStreak = 0;
|
||||||
|
|
||||||
|
@ -71,13 +71,13 @@ class Work extends Command {
|
||||||
if (data.memberData.workStreak > i) {
|
if (data.memberData.workStreak > i) {
|
||||||
const letter = Discord.Util.parseEmoji(award[i]).name.split("_")[1];
|
const letter = Discord.Util.parseEmoji(award[i]).name.split("_")[1];
|
||||||
award[i] = `:regional_indicator_${letter.toLowerCase()}:`;
|
award[i] = `:regional_indicator_${letter.toLowerCase()}:`;
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
embed.addField(message.translate("economy/work:SALARY"), message.translate("economy/work:SALARY_CONTENT", {
|
embed.addField(message.translate("economy/work:SALARY"), message.translate("economy/work:SALARY_CONTENT", {
|
||||||
won: `**${won}** ${message.getNoun(won, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`
|
won: `**${won}** ${message.getNoun(won, message.translate("misc:NOUNS:CREDIT:1"), message.translate("misc:NOUNS:CREDIT:2"), message.translate("misc:NOUNS:CREDIT:5"))}`
|
||||||
}))
|
}))
|
||||||
.addField(message.translate("economy/work:STREAK"), award.join(""));
|
.addField(message.translate("economy/work:STREAK"), award.join(""));
|
||||||
};
|
}
|
||||||
|
|
||||||
const info = {
|
const info = {
|
||||||
user: message.translate("economy/work:SALARY"),
|
user: message.translate("economy/work:SALARY"),
|
||||||
|
@ -101,14 +101,14 @@ class Work extends Command {
|
||||||
attachment: "./assets/img/achievements/achievement_unlocked1.png"
|
attachment: "./assets/img/achievements/achievement_unlocked1.png"
|
||||||
}];
|
}];
|
||||||
data.userData.achievements.work.achieved = true;
|
data.userData.achievements.work.achieved = true;
|
||||||
};
|
}
|
||||||
data.userData.markModified("achievements.work");
|
data.userData.markModified("achievements.work");
|
||||||
data.userData.save();
|
data.userData.save();
|
||||||
};
|
}
|
||||||
|
|
||||||
// Send the embed in the current channel
|
// Send the embed in the current channel
|
||||||
message.channel.send(messageOptions);
|
message.channel.send(messageOptions);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Work;
|
module.exports = Work;
|
|
@ -26,6 +26,6 @@ class Eightball extends Command {
|
||||||
content: answer
|
content: answer
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Eightball;
|
module.exports = Eightball;
|
|
@ -29,6 +29,6 @@ class Ascii extends Command {
|
||||||
content: "```" + rendered + "```"
|
content: "```" + rendered + "```"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Ascii;
|
module.exports = Ascii;
|
|
@ -31,6 +31,6 @@ class Choice extends Command {
|
||||||
});
|
});
|
||||||
}, 1500);
|
}, 1500);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Choice;
|
module.exports = Choice;
|
|
@ -41,7 +41,7 @@ class FindWords extends Command {
|
||||||
for (let i = 0; i < nbGames; i++) {
|
for (let i = 0; i < nbGames; i++) {
|
||||||
const result = Math.floor((Math.random() * wordList.length));
|
const result = Math.floor((Math.random() * wordList.length));
|
||||||
words.push(wordList[result].substring(0, 3).toLowerCase());
|
words.push(wordList[result].substring(0, 3).toLowerCase());
|
||||||
};
|
}
|
||||||
|
|
||||||
let i = 0; // Inits i variable to count games
|
let i = 0; // Inits i variable to count games
|
||||||
currentGames[message.guild.id] = true; // Update current game variable
|
currentGames[message.guild.id] = true; // Update current game variable
|
||||||
|
@ -77,18 +77,14 @@ class FindWords extends Command {
|
||||||
});
|
});
|
||||||
|
|
||||||
collector.on("end", async (collected, reason) => {
|
collector.on("end", async (collected, reason) => {
|
||||||
if (reason === "time") {
|
if (reason === "time") message.error("fun/findwords:NO_WINNER");
|
||||||
message.error("fun/findwords:NO_WINNER");
|
else if (reason === "force") return message.error("misc:FORCE_STOP", { user: message.author.toString() });
|
||||||
} else if (reason === "force") {
|
else {
|
||||||
return message.error("misc:FORCE_STOP", {
|
|
||||||
user: message.author.toString()
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
message.success("fun/findwords:WORD_FOUND", {
|
message.success("fun/findwords:WORD_FOUND", {
|
||||||
winner: `<@${reason}>`
|
winner: `<@${reason}>`
|
||||||
});
|
});
|
||||||
winners.push(reason);
|
winners.push(reason);
|
||||||
};
|
}
|
||||||
|
|
||||||
if (i < nbGames - 1) {
|
if (i < nbGames - 1) {
|
||||||
i++;
|
i++;
|
||||||
|
@ -130,11 +126,11 @@ class FindWords extends Command {
|
||||||
|
|
||||||
userdata.money = userdata.money + won;
|
userdata.money = userdata.money + won;
|
||||||
userdata.save();
|
userdata.save();
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
});
|
});
|
||||||
}, delay);
|
}, delay);
|
||||||
};
|
}
|
||||||
|
|
||||||
async function getWinner(array) {
|
async function getWinner(array) {
|
||||||
return new Promise(function (resolve) {
|
return new Promise(function (resolve) {
|
||||||
|
@ -150,12 +146,12 @@ class FindWords extends Command {
|
||||||
if (counts[winner] > compare) {
|
if (counts[winner] > compare) {
|
||||||
compare = counts[winner];
|
compare = counts[winner];
|
||||||
mostFrequent = array[i];
|
mostFrequent = array[i];
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
resolve(mostFrequent);
|
resolve(mostFrequent);
|
||||||
});
|
});
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = FindWords;
|
module.exports = FindWords;
|
|
@ -20,6 +20,6 @@ class Flip extends Command {
|
||||||
const isHeads = Math.random() > 0.5;
|
const isHeads = Math.random() > 0.5;
|
||||||
isHeads ? message.sendT("fun/flip:HEADS") : message.sendT("fun/flip:TAILS");
|
isHeads ? message.sendT("fun/flip:HEADS") : message.sendT("fun/flip:TAILS");
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Flip;
|
module.exports = Flip;
|
|
@ -34,6 +34,6 @@ class Fml extends Command {
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Fml;
|
module.exports = Fml;
|
|
@ -34,6 +34,6 @@ class Joke extends Command {
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Joke;
|
module.exports = Joke;
|
|
@ -25,6 +25,6 @@ class Lmg extends Command {
|
||||||
});
|
});
|
||||||
message.delete().catch(() => {});
|
message.delete().catch(() => {});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Lmg;
|
module.exports = Lmg;
|
|
@ -54,6 +54,6 @@ class Lovecalc extends Command {
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Lovecalc;
|
module.exports = Lovecalc;
|
|
@ -79,27 +79,20 @@ class Number extends Command {
|
||||||
|
|
||||||
userdata.money = userdata.money + won;
|
userdata.money = userdata.money + won;
|
||||||
userdata.save();
|
userdata.save();
|
||||||
};
|
}
|
||||||
|
|
||||||
collector.stop();
|
collector.stop();
|
||||||
};
|
}
|
||||||
if (parseInt(msg.content) < number) message.error("fun/number:BIG", { user: msg.author.toString(), number: parsedNumber });
|
if (parseInt(msg.content) < number) message.error("fun/number:BIG", { user: msg.author.toString(), number: parsedNumber });
|
||||||
if (parseInt(msg.content) > number) message.error("fun/number:SMALL", { user: msg.author.toString(), number: parsedNumber });
|
if (parseInt(msg.content) > number) message.error("fun/number:SMALL", { user: msg.author.toString(), number: parsedNumber });
|
||||||
});
|
});
|
||||||
|
|
||||||
collector.on("end", (_collected, reason) => {
|
collector.on("end", (_collected, reason) => {
|
||||||
delete currentGames[message.guild.id];
|
delete currentGames[message.guild.id];
|
||||||
if (reason === "time") {
|
if (reason === "time") return message.error("fun/number:DEFEAT", { number });
|
||||||
return message.error("fun/number:DEFEAT", {
|
else if (reason === "force") return message.error("misc:FORCE_STOP", { user: message.author.toString() });
|
||||||
number
|
|
||||||
});
|
|
||||||
} else if (reason === "force") {
|
|
||||||
return message.error("misc:FORCE_STOP", {
|
|
||||||
user: message.author.toString()
|
|
||||||
});
|
|
||||||
};
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Number;
|
module.exports = Number;
|
|
@ -17,8 +17,8 @@ class TicTacToe extends Command {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async run(message, args) {
|
async run(message) {
|
||||||
const game = new TTT({ language: "ru" })
|
const game = new TTT({ language: "ru" });
|
||||||
game.handleMessage(message);
|
game.handleMessage(message);
|
||||||
|
|
||||||
game.on("win", async (data) => {
|
game.on("win", async (data) => {
|
||||||
|
@ -46,6 +46,6 @@ class TicTacToe extends Command {
|
||||||
userdata.save();
|
userdata.save();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = TicTacToe;
|
module.exports = TicTacToe;
|
|
@ -37,7 +37,7 @@ class Activity extends Command {
|
||||||
.setFooter({
|
.setFooter({
|
||||||
text: message.translate("general/activity:FOOTER")
|
text: message.translate("general/activity:FOOTER")
|
||||||
})
|
})
|
||||||
.setTimestamp()
|
.setTimestamp();
|
||||||
return message.channel.send({
|
return message.channel.send({
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
|
@ -53,7 +53,7 @@ class Activity extends Command {
|
||||||
.setFooter({
|
.setFooter({
|
||||||
text: message.translate("general/activity:FOOTER")
|
text: message.translate("general/activity:FOOTER")
|
||||||
})
|
})
|
||||||
.setTimestamp()
|
.setTimestamp();
|
||||||
return message.channel.send({
|
return message.channel.send({
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
|
@ -69,7 +69,7 @@ class Activity extends Command {
|
||||||
.setFooter({
|
.setFooter({
|
||||||
text: message.translate("general/activity:FOOTER")
|
text: message.translate("general/activity:FOOTER")
|
||||||
})
|
})
|
||||||
.setTimestamp()
|
.setTimestamp();
|
||||||
return message.channel.send({
|
return message.channel.send({
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
|
@ -85,7 +85,7 @@ class Activity extends Command {
|
||||||
.setFooter({
|
.setFooter({
|
||||||
text: message.translate("general/activity:FOOTER")
|
text: message.translate("general/activity:FOOTER")
|
||||||
})
|
})
|
||||||
.setTimestamp()
|
.setTimestamp();
|
||||||
return message.channel.send({
|
return message.channel.send({
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
|
@ -101,7 +101,7 @@ class Activity extends Command {
|
||||||
.setFooter({
|
.setFooter({
|
||||||
text: message.translate("general/activity:FOOTER")
|
text: message.translate("general/activity:FOOTER")
|
||||||
})
|
})
|
||||||
.setTimestamp()
|
.setTimestamp();
|
||||||
return message.channel.send({
|
return message.channel.send({
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
|
@ -117,7 +117,7 @@ class Activity extends Command {
|
||||||
.setFooter({
|
.setFooter({
|
||||||
text: message.translate("general/activity:FOOTER")
|
text: message.translate("general/activity:FOOTER")
|
||||||
})
|
})
|
||||||
.setTimestamp()
|
.setTimestamp();
|
||||||
return message.channel.send({
|
return message.channel.send({
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
|
@ -133,7 +133,7 @@ class Activity extends Command {
|
||||||
.setFooter({
|
.setFooter({
|
||||||
text: message.translate("general/activity:FOOTER")
|
text: message.translate("general/activity:FOOTER")
|
||||||
})
|
})
|
||||||
.setTimestamp()
|
.setTimestamp();
|
||||||
return message.channel.send({
|
return message.channel.send({
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
|
@ -149,7 +149,7 @@ class Activity extends Command {
|
||||||
.setFooter({
|
.setFooter({
|
||||||
text: message.translate("general/activity:FOOTER")
|
text: message.translate("general/activity:FOOTER")
|
||||||
})
|
})
|
||||||
.setTimestamp()
|
.setTimestamp();
|
||||||
return message.channel.send({
|
return message.channel.send({
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
|
@ -165,7 +165,7 @@ class Activity extends Command {
|
||||||
.setFooter({
|
.setFooter({
|
||||||
text: message.translate("general/activity:FOOTER")
|
text: message.translate("general/activity:FOOTER")
|
||||||
})
|
})
|
||||||
.setTimestamp()
|
.setTimestamp();
|
||||||
return message.channel.send({
|
return message.channel.send({
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
|
@ -181,7 +181,7 @@ class Activity extends Command {
|
||||||
.setFooter({
|
.setFooter({
|
||||||
text: message.translate("general/activity:FOOTER")
|
text: message.translate("general/activity:FOOTER")
|
||||||
})
|
})
|
||||||
.setTimestamp()
|
.setTimestamp();
|
||||||
return message.channel.send({
|
return message.channel.send({
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
|
@ -197,7 +197,7 @@ class Activity extends Command {
|
||||||
.setFooter({
|
.setFooter({
|
||||||
text: message.translate("general/activity:FOOTER")
|
text: message.translate("general/activity:FOOTER")
|
||||||
})
|
})
|
||||||
.setTimestamp()
|
.setTimestamp();
|
||||||
return message.channel.send({
|
return message.channel.send({
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
|
@ -213,14 +213,14 @@ class Activity extends Command {
|
||||||
.setFooter({
|
.setFooter({
|
||||||
text: message.translate("general/activity:FOOTER")
|
text: message.translate("general/activity:FOOTER")
|
||||||
})
|
})
|
||||||
.setTimestamp()
|
.setTimestamp();
|
||||||
return message.channel.send({
|
return message.channel.send({
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default: {
|
||||||
const embed = new Discord.MessageEmbed()
|
const embed = new Discord.MessageEmbed()
|
||||||
.setTitle(message.translate("general/activity:TITLE"))
|
.setTitle(message.translate("general/activity:TITLE"))
|
||||||
.setDescription(activities.join("\n"))
|
.setDescription(activities.join("\n"))
|
||||||
|
@ -228,13 +228,13 @@ class Activity extends Command {
|
||||||
.setFooter({
|
.setFooter({
|
||||||
text: message.translate("general/activity:FOOTER")
|
text: message.translate("general/activity:FOOTER")
|
||||||
})
|
})
|
||||||
.setTimestamp()
|
.setTimestamp();
|
||||||
message.channel.send({
|
message.channel.send({
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
break;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Activity;
|
module.exports = Activity;
|
|
@ -47,6 +47,6 @@ class Github extends Command {
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Github;
|
module.exports = Github;
|
|
@ -47,8 +47,8 @@ class Hastebin extends Command {
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
message.error("misc:ERR_OCCURRED");
|
message.error("misc:ERR_OCCURRED");
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Hastebin;
|
module.exports = Hastebin;
|
|
@ -30,7 +30,7 @@ class Help extends Command {
|
||||||
return message.error("general/help:NOT_FOUND", {
|
return message.error("general/help:NOT_FOUND", {
|
||||||
search: args[0]
|
search: args[0]
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
const description = message.translate(`${cmd.help.category.toLowerCase()}/${cmd.help.name}:DESCRIPTION`);
|
const description = message.translate(`${cmd.help.category.toLowerCase()}/${cmd.help.name}:DESCRIPTION`);
|
||||||
const usage = message.translate(`${cmd.help.category.toLowerCase()}/${cmd.help.name}:USAGE`, {
|
const usage = message.translate(`${cmd.help.category.toLowerCase()}/${cmd.help.name}:USAGE`, {
|
||||||
|
@ -59,7 +59,7 @@ class Help extends Command {
|
||||||
return message.channel.send({
|
return message.channel.send({
|
||||||
embeds: [groupEmbed]
|
embeds: [groupEmbed]
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
const categories = [];
|
const categories = [];
|
||||||
const commands = this.client.commands;
|
const commands = this.client.commands;
|
||||||
|
@ -68,7 +68,7 @@ class Help extends Command {
|
||||||
if (!categories.includes(command.help.category)) {
|
if (!categories.includes(command.help.category)) {
|
||||||
if (command.help.category === "Owner" && message.author.id !== this.client.config.owner.id) return;
|
if (command.help.category === "Owner" && message.author.id !== this.client.config.owner.id) return;
|
||||||
categories.push(command.help.category);
|
categories.push(command.help.category);
|
||||||
};
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const emojis = this.client.customEmojis;
|
const emojis = this.client.customEmojis;
|
||||||
|
@ -88,7 +88,7 @@ class Help extends Command {
|
||||||
|
|
||||||
if (message.guild) {
|
if (message.guild) {
|
||||||
if (data.guild.customCommands.length > 0) embed.addField(`${emojis.categories.custom} ${message.guild.name} | ${message.translate("general/help:CUSTOM_COMMANDS")} - (${data.guild.customCommands.length})`, data.guild.customCommands.map((cmd) => `\`${cmd.name}\``).join(", "));
|
if (data.guild.customCommands.length > 0) embed.addField(`${emojis.categories.custom} ${message.guild.name} | ${message.translate("general/help:CUSTOM_COMMANDS")} - (${data.guild.customCommands.length})`, data.guild.customCommands.map((cmd) => `\`${cmd.name}\``).join(", "));
|
||||||
};
|
}
|
||||||
|
|
||||||
embed.addField("\u200B", message.translate("misc:STATS_FOOTER", {
|
embed.addField("\u200B", message.translate("misc:STATS_FOOTER", {
|
||||||
dashboardLink: "https://jaba.pp.ua/",
|
dashboardLink: "https://jaba.pp.ua/",
|
||||||
|
@ -111,6 +111,6 @@ class Help extends Command {
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Help;
|
module.exports = Help;
|
|
@ -33,8 +33,8 @@ class Invitations extends Command {
|
||||||
return message.error("general/invitations:NOBODY_MEMBER", {
|
return message.error("general/invitations:NOBODY_MEMBER", {
|
||||||
member: member.user.tag
|
member: member.user.tag
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
const content = memberInvites.map((i) => {
|
const content = memberInvites.map((i) => {
|
||||||
return message.translate("general/invitations:CODE", {
|
return message.translate("general/invitations:CODE", {
|
||||||
|
@ -67,6 +67,6 @@ class Invitations extends Command {
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Invitations;
|
module.exports = Invitations;
|
|
@ -48,6 +48,6 @@ class Invite extends Command {
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Invite;
|
module.exports = Invite;
|
|
@ -37,7 +37,7 @@ class Minecraft extends Command {
|
||||||
host: ip[0],
|
host: ip[0],
|
||||||
port: ip[1]
|
port: ip[1]
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
|
||||||
const m = await message.sendT("misc:PLEASE_WAIT", null, {
|
const m = await message.sendT("misc:PLEASE_WAIT", null, {
|
||||||
prefixEmoji: "loading"
|
prefixEmoji: "loading"
|
||||||
|
@ -58,7 +58,7 @@ class Minecraft extends Command {
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
Sentry.captureException(err);
|
Sentry.captureException(err);
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
if (!json) return m.error("general/minecraft:FAILED", null, { edit: true });
|
if (!json) return m.error("general/minecraft:FAILED", null, { edit: true });
|
||||||
|
|
||||||
|
@ -92,6 +92,6 @@ class Minecraft extends Command {
|
||||||
files: [imgAttachment]
|
files: [imgAttachment]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Minecraft;
|
module.exports = Minecraft;
|
|
@ -34,13 +34,13 @@ class Permissions extends Command {
|
||||||
} else {
|
} else {
|
||||||
text += `${perm} ✅\n`;
|
text += `${perm} ✅\n`;
|
||||||
total.allowed++;
|
total.allowed++;
|
||||||
};
|
}
|
||||||
});
|
});
|
||||||
text += `\n${total.allowed} ✅ | ${total.denied} ❌` + "\n```";
|
text += `\n${total.allowed} ✅ | ${total.denied} ❌` + "\n```";
|
||||||
message.channel.send({
|
message.channel.send({
|
||||||
content: text
|
content: text
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Permissions;
|
module.exports = Permissions;
|
|
@ -25,6 +25,6 @@ class Ping extends Command {
|
||||||
}, { edit: true });
|
}, { edit: true });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Ping;
|
module.exports = Ping;
|
|
@ -36,7 +36,7 @@ class Quote extends Command {
|
||||||
.setTimestamp(m.createdTimestamp);
|
.setTimestamp(m.createdTimestamp);
|
||||||
if (m.attachments.size > 0) embed.setImage(m.attachments.first().url);
|
if (m.attachments.size > 0) embed.setImage(m.attachments.first().url);
|
||||||
return embed;
|
return embed;
|
||||||
};
|
}
|
||||||
|
|
||||||
const msgID = args[0];
|
const msgID = args[0];
|
||||||
if (isNaN(msgID)) {
|
if (isNaN(msgID)) {
|
||||||
|
@ -48,7 +48,7 @@ class Quote extends Command {
|
||||||
message.error("misc:CANNOT_DM");
|
message.error("misc:CANNOT_DM");
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
|
|
||||||
let channel = args[1];
|
let channel = args[1];
|
||||||
if (args[1]) {
|
if (args[1]) {
|
||||||
|
@ -57,18 +57,18 @@ class Quote extends Command {
|
||||||
message.author.send(message.translate("general/quote:NO_MESSAGE_ID")).then(() => {
|
message.author.send(message.translate("general/quote:NO_MESSAGE_ID")).then(() => {
|
||||||
message.delete();
|
message.delete();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
message.error("misc:CANNOT_DM")
|
message.error("misc:CANNOT_DM");
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
if (!channel) {
|
if (!channel) {
|
||||||
message.channel.messages.fetch(msgID).catch(() => {
|
message.channel.messages.fetch(msgID).catch(() => {
|
||||||
message.author.send((message.translate("general/quote:NO_MESSAGE_ID"))).then(() => {
|
message.author.send((message.translate("general/quote:NO_MESSAGE_ID"))).then(() => {
|
||||||
message.delete();
|
message.delete();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
message.error("misc:CANNOT_DM")
|
message.error("misc:CANNOT_DM");
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}).then((msg) => {
|
}).then((msg) => {
|
||||||
|
@ -82,7 +82,7 @@ class Quote extends Command {
|
||||||
message.author.send(message.translate("general/quote:NO_MESSAGE_ID")).then(() => {
|
message.author.send(message.translate("general/quote:NO_MESSAGE_ID")).then(() => {
|
||||||
message.delete();
|
message.delete();
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
message.error("misc:CANNOT_DM")
|
message.error("misc:CANNOT_DM");
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}).then((msg) => {
|
}).then((msg) => {
|
||||||
|
@ -91,8 +91,8 @@ class Quote extends Command {
|
||||||
embeds: [embed(msg)]
|
embeds: [embed(msg)]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Quote;
|
module.exports = Quote;
|
|
@ -40,6 +40,6 @@ class Remindme extends Command {
|
||||||
|
|
||||||
message.success("general/remindme:SAVED");
|
message.success("general/remindme:SAVED");
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Remindme;
|
module.exports = Remindme;
|
|
@ -64,6 +64,6 @@ class Report extends Command {
|
||||||
channel: repChannel.toString()
|
channel: repChannel.toString()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Report;
|
module.exports = Report;
|
|
@ -25,8 +25,8 @@ class Serverinfo extends Command {
|
||||||
if (!found) {
|
if (!found) {
|
||||||
found = this.client.guilds.cache.find(g => g.name.includes(args.join(" ")) || g.id === args[0]);
|
found = this.client.guilds.cache.find(g => g.name.includes(args.join(" ")) || g.id === args[0]);
|
||||||
if (found) guild = found;
|
if (found) guild = found;
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
await guild.members.fetch();
|
await guild.members.fetch();
|
||||||
const owner = await guild.fetchOwner();
|
const owner = await guild.fetchOwner();
|
||||||
|
@ -65,6 +65,6 @@ class Serverinfo extends Command {
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Serverinfo;
|
module.exports = Serverinfo;
|
|
@ -28,7 +28,7 @@ class Setafk extends Command {
|
||||||
return message.sendT("general/setafk:DELETED", {
|
return message.sendT("general/setafk:DELETED", {
|
||||||
username: message.author.username
|
username: message.author.username
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
} else {
|
} else {
|
||||||
data.userData.afk = reason;
|
data.userData.afk = reason;
|
||||||
data.userData.save();
|
data.userData.save();
|
||||||
|
@ -42,8 +42,8 @@ class Setafk extends Command {
|
||||||
if (m.deletable) m.delete();
|
if (m.deletable) m.delete();
|
||||||
if (message.deletable) message.delete();
|
if (message.deletable) message.delete();
|
||||||
}, 10 * 1000);
|
}, 10 * 1000);
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Setafk;
|
module.exports = Setafk;
|
|
@ -37,6 +37,6 @@ class ShortURL extends Command {
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = ShortURL;
|
module.exports = ShortURL;
|
|
@ -34,6 +34,6 @@ class Someone extends Command {
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Someone;
|
module.exports = Someone;
|
|
@ -37,6 +37,6 @@ class Staff extends Command {
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Staff;
|
module.exports = Staff;
|
|
@ -58,6 +58,6 @@ class Stats extends Command {
|
||||||
embeds: [statsEmbed]
|
embeds: [statsEmbed]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Stats;
|
module.exports = Stats;
|
|
@ -59,6 +59,6 @@ class Suggest extends Command {
|
||||||
channel: suggChannel.toString()
|
channel: suggChannel.toString()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Suggest;
|
module.exports = Suggest;
|
|
@ -29,7 +29,7 @@ class Translate extends Command {
|
||||||
message.error("misc:CANNOT_DM");
|
message.error("misc:CANNOT_DM");
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
};
|
}
|
||||||
|
|
||||||
const pWait = await message.sendT("misc:PLEASE_WAIT", null, {
|
const pWait = await message.sendT("misc:PLEASE_WAIT", null, {
|
||||||
prefixEmoji: "loading"
|
prefixEmoji: "loading"
|
||||||
|
@ -67,6 +67,6 @@ class Translate extends Command {
|
||||||
embeds: [resEmbed]
|
embeds: [resEmbed]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Translate;
|
module.exports = Translate;
|
|
@ -32,8 +32,8 @@ class Userinfo extends Command {
|
||||||
if (!user) {
|
if (!user) {
|
||||||
user = await this.client.users.fetch(args[0], true).catch(() => {});
|
user = await this.client.users.fetch(args[0], true).catch(() => {});
|
||||||
displayPresence = false;
|
displayPresence = false;
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
if (!user) return message.error("general/userinfo:INVALID_USER");
|
if (!user) return message.error("general/userinfo:INVALID_USER");
|
||||||
|
|
||||||
|
@ -68,23 +68,23 @@ class Userinfo extends Command {
|
||||||
|
|
||||||
if (displayPresence) {
|
if (displayPresence) {
|
||||||
if (member.presence.activities[0].name === "Custom Status") {
|
if (member.presence.activities[0].name === "Custom Status") {
|
||||||
embed.addField(this.client.customEmojis.games + " " + message.translate("common:GAME"), (member.presence.activities[0] ? `Пользовательский статус\n${member.presence.activities[0].state || message.translate("common:NOT_DEFINED")}` : message.translate("general/userinfo:NO_GAME")), true)
|
embed.addField(this.client.customEmojis.games + " " + message.translate("common:GAME"), (member.presence.activities[0] ? `Пользовательский статус\n${member.presence.activities[0].state || message.translate("common:NOT_DEFINED")}` : message.translate("general/userinfo:NO_GAME")), true);
|
||||||
embed.addField(this.client.customEmojis.status[member.presence.status] + " " + message.translate("common:STATUS"), message.translate("common:STATUS_" + (member.presence.status.toUpperCase())), true);
|
embed.addField(this.client.customEmojis.status[member.presence.status] + " " + message.translate("common:STATUS"), message.translate("common:STATUS_" + (member.presence.status.toUpperCase())), true);
|
||||||
} else {
|
} else {
|
||||||
embed.addField(this.client.customEmojis.games + " " + message.translate("common:GAME"), (member.presence.activities[0] ? `${member.presence.activities[0].name}\n${member.presence.activities[0].details}\n${member.presence.activities[0].state}` : message.translate("general/userinfo:NO_GAME")), true)
|
embed.addField(this.client.customEmojis.games + " " + message.translate("common:GAME"), (member.presence.activities[0] ? `${member.presence.activities[0].name}\n${member.presence.activities[0].details}\n${member.presence.activities[0].state}` : message.translate("general/userinfo:NO_GAME")), true);
|
||||||
embed.addField(this.client.customEmojis.status[member.presence.status] + " " + message.translate("common:STATUS"), message.translate("common:STATUS_" + (member.presence.status.toUpperCase())), true);
|
embed.addField(this.client.customEmojis.status[member.presence.status] + " " + message.translate("common:STATUS"), message.translate("common:STATUS_" + (member.presence.status.toUpperCase())), true);
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
if (member) {
|
if (member) {
|
||||||
// embed.addField(this.client.customEmojis.up + " " + message.translate("general/userinfo:ROLE"), (member.roles.highest ? member.roles.highest : message.translate("general/userinfo:NO_ROLE")), true)
|
// embed.addField(this.client.customEmojis.up + " " + message.translate("general/userinfo:ROLE"), (member.roles.highest ? member.roles.highest : message.translate("general/userinfo:NO_ROLE")), true)
|
||||||
embed.addField(this.client.customEmojis.calendar2 + " " + message.translate("common:JOIN"), message.printDate(member.joinedAt), true)
|
embed.addField(this.client.customEmojis.calendar2 + " " + message.translate("common:JOIN"), message.printDate(member.joinedAt), true);
|
||||||
embed.addField(this.client.customEmojis.color + " " + message.translate("common:COLOR"), member.displayHexColor, true)
|
embed.addField(this.client.customEmojis.color + " " + message.translate("common:COLOR"), member.displayHexColor, true);
|
||||||
embed.addField(this.client.customEmojis.pencil + " " + message.translate("common:NICKNAME"), (member.nickname ? member.nickname : message.translate("general/userinfo:NO_NICKNAME")), true)
|
embed.addField(this.client.customEmojis.pencil + " " + message.translate("common:NICKNAME"), (member.nickname ? member.nickname : message.translate("general/userinfo:NO_NICKNAME")), true);
|
||||||
embed.addField(this.client.customEmojis.roles + " " + message.translate("common:ROLES"), (member.roles.size > 10 ? member.roles.cache.map((r) => r).slice(0, 9).join(", ") + " " + message.translate("general/userinfo:MORE_ROLES", {
|
embed.addField(this.client.customEmojis.roles + " " + message.translate("common:ROLES"), (member.roles.size > 10 ? member.roles.cache.map((r) => r).slice(0, 9).join(", ") + " " + message.translate("general/userinfo:MORE_ROLES", {
|
||||||
count: member.roles.cache.size - 10
|
count: member.roles.cache.size - 10
|
||||||
}) : (member.roles.cache.size < 1) ? message.translate("general/userinfo:NO_ROLE") : member.roles.cache.map((r) => r).join(", ")));
|
}) : (member.roles.cache.size < 1) ? message.translate("general/userinfo:NO_ROLE") : member.roles.cache.map((r) => r).join(", ")));
|
||||||
};
|
}
|
||||||
|
|
||||||
if (user.bot && this.client.config.apiKeys.dbl && (this.client.config.apiKeys.dbl !== "")) {
|
if (user.bot && this.client.config.apiKeys.dbl && (this.client.config.apiKeys.dbl !== "")) {
|
||||||
const res = await fetch("https://discordbots.org/api/bots/" + user.id, {
|
const res = await fetch("https://discordbots.org/api/bots/" + user.id, {
|
||||||
|
@ -102,13 +102,13 @@ class Userinfo extends Command {
|
||||||
lib: data.lib || "unknown"
|
lib: data.lib || "unknown"
|
||||||
}), true)
|
}), true)
|
||||||
.addField(this.client.customEmojis.link + " " + message.translate("common:LINKS"), `${data.support ? `[${message.translate("common:SUPPORT")}](${data.support}) | ` : ""}${data.invite ? `[${message.translate("common:INVITE")}](${data.invite}) | ` : ""}${data.github ? `[GitHub](${data.github}) | ` : ""}${data.website ? `[${message.translate("common:WEBSITE")}](${data.website})` : ""}`, true);
|
.addField(this.client.customEmojis.link + " " + message.translate("common:LINKS"), `${data.support ? `[${message.translate("common:SUPPORT")}](${data.support}) | ` : ""}${data.invite ? `[${message.translate("common:INVITE")}](${data.invite}) | ` : ""}${data.github ? `[GitHub](${data.github}) | ` : ""}${data.website ? `[${message.translate("common:WEBSITE")}](${data.website})` : ""}`, true);
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
message.channel.send({
|
message.channel.send({
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Userinfo;
|
module.exports = Userinfo;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js");
|
||||||
Discord = require("discord.js");
|
|
||||||
|
|
||||||
class Approved extends Command {
|
class Approved extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -13,7 +12,7 @@ class Approved extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +35,6 @@ class Approved extends Command {
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Approved;
|
module.exports = Approved;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js");
|
||||||
Discord = require("discord.js");
|
|
||||||
|
|
||||||
class Avatar extends Command {
|
class Avatar extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -13,7 +12,7 @@ class Avatar extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,6 +33,6 @@ class Avatar extends Command {
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Avatar;
|
module.exports = Avatar;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js");
|
||||||
Discord = require("discord.js");
|
|
||||||
|
|
||||||
class BatSlap extends Command {
|
class BatSlap extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -13,7 +12,7 @@ class BatSlap extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +42,6 @@ class BatSlap extends Command {
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = BatSlap;
|
module.exports = BatSlap;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js");
|
||||||
Discord = require("discord.js");
|
|
||||||
|
|
||||||
class Beautiful extends Command {
|
class Beautiful extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -13,7 +12,7 @@ class Beautiful extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +35,6 @@ class Beautiful extends Command {
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Beautiful;
|
module.exports = Beautiful;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js"),
|
||||||
Discord = require("discord.js"),
|
|
||||||
canvacord = require("canvacord");
|
canvacord = require("canvacord");
|
||||||
|
|
||||||
class Bed extends Command {
|
class Bed extends Command {
|
||||||
|
@ -14,7 +13,7 @@ class Bed extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,8 +44,8 @@ class Bed extends Command {
|
||||||
m.error("misc:ERROR_OCCURRED", null, {
|
m.error("misc:ERROR_OCCURRED", null, {
|
||||||
edit: true
|
edit: true
|
||||||
});
|
});
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Bed;
|
module.exports = Bed;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js");
|
||||||
Discord = require("discord.js");
|
|
||||||
|
|
||||||
class Brazzers extends Command {
|
class Brazzers extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -13,7 +12,7 @@ class Brazzers extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +35,6 @@ class Brazzers extends Command {
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Brazzers;
|
module.exports = Brazzers;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js");
|
||||||
Discord = require("discord.js");
|
|
||||||
|
|
||||||
class Burn extends Command {
|
class Burn extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -13,7 +12,7 @@ class Burn extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +35,6 @@ class Burn extends Command {
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Burn;
|
module.exports = Burn;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js"),
|
||||||
Discord = require("discord.js"),
|
|
||||||
fetch = require("node-fetch");
|
fetch = require("node-fetch");
|
||||||
|
|
||||||
class Captcha extends Command {
|
class Captcha extends Command {
|
||||||
|
@ -14,7 +13,7 @@ class Captcha extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,8 +37,8 @@ class Captcha extends Command {
|
||||||
m.error("misc:ERR_OCCURRED", null, {
|
m.error("misc:ERR_OCCURRED", null, {
|
||||||
edit: true
|
edit: true
|
||||||
});
|
});
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Captcha;
|
module.exports = Captcha;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js");
|
||||||
Discord = require("discord.js");
|
|
||||||
|
|
||||||
class Challenger extends Command {
|
class Challenger extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -13,7 +12,7 @@ class Challenger extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +35,6 @@ class Challenger extends Command {
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Challenger;
|
module.exports = Challenger;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js"),
|
||||||
Discord = require("discord.js"),
|
|
||||||
fetch = require("node-fetch");
|
fetch = require("node-fetch");
|
||||||
|
|
||||||
class Clyde extends Command {
|
class Clyde extends Command {
|
||||||
|
@ -14,7 +13,7 @@ class Clyde extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,8 +39,8 @@ class Clyde extends Command {
|
||||||
m.error("misc:ERROR_OCCURRED", null, {
|
m.error("misc:ERROR_OCCURRED", null, {
|
||||||
edit: true
|
edit: true
|
||||||
});
|
});
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Clyde;
|
module.exports = Clyde;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js");
|
||||||
Discord = require("discord.js");
|
|
||||||
|
|
||||||
class Dictator extends Command {
|
class Dictator extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -13,7 +12,7 @@ class Dictator extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +35,6 @@ class Dictator extends Command {
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Dictator;
|
module.exports = Dictator;
|
|
@ -1,6 +1,5 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js"),
|
||||||
Canvas = require("canvas"),
|
Canvas = require("canvas");
|
||||||
Discord = require("discord.js");
|
|
||||||
|
|
||||||
class Facepalm extends Command {
|
class Facepalm extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -14,7 +13,7 @@ class Facepalm extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,6 +49,6 @@ class Facepalm extends Command {
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Facepalm;
|
module.exports = Facepalm;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js");
|
||||||
Discord = require("discord.js");
|
|
||||||
|
|
||||||
class Fire extends Command {
|
class Fire extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -13,7 +12,7 @@ class Fire extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +35,6 @@ class Fire extends Command {
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Fire;
|
module.exports = Fire;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js");
|
||||||
Discord = require("discord.js");
|
|
||||||
|
|
||||||
class Jail extends Command {
|
class Jail extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -13,7 +12,7 @@ class Jail extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +35,6 @@ class Jail extends Command {
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Jail;
|
module.exports = Jail;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js"),
|
||||||
Discord = require("discord.js"),
|
|
||||||
fetch = require("node-fetch");
|
fetch = require("node-fetch");
|
||||||
|
|
||||||
class Love extends Command {
|
class Love extends Command {
|
||||||
|
@ -14,7 +13,7 @@ class Love extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,8 +40,8 @@ class Love extends Command {
|
||||||
m.error("misc:ERROR_OCCURRED", null, {
|
m.error("misc:ERROR_OCCURRED", null, {
|
||||||
edit: true
|
edit: true
|
||||||
});
|
});
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Love;
|
module.exports = Love;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js");
|
||||||
Discord = require("discord.js");
|
|
||||||
|
|
||||||
class Mission extends Command {
|
class Mission extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -13,7 +12,7 @@ class Mission extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +35,6 @@ class Mission extends Command {
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Mission;
|
module.exports = Mission;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js"),
|
||||||
Discord = require("discord.js"),
|
|
||||||
canvacord = require("canvacord");
|
canvacord = require("canvacord");
|
||||||
|
|
||||||
class Phcomment extends Command {
|
class Phcomment extends Command {
|
||||||
|
@ -14,7 +13,7 @@ class Phcomment extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,17 +21,15 @@ class Phcomment extends Command {
|
||||||
let user = await this.client.resolveUser(args[0]);
|
let user = await this.client.resolveUser(args[0]);
|
||||||
let text = args.join(" ");
|
let text = args.join(" ");
|
||||||
|
|
||||||
if (user) {
|
if (user) text = args.slice(1).join(" ");
|
||||||
text = args.slice(1).join(" ");
|
else user = message.author;
|
||||||
} else {
|
|
||||||
user = message.author;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!text) return message.error("images/phcomment:MISSING_TEXT");
|
if (!text) return message.error("images/phcomment:MISSING_TEXT");
|
||||||
|
|
||||||
const m = await message.sendT("misc:PLEASE_WAIT", null, {
|
const m = await message.sendT("misc:PLEASE_WAIT", null, {
|
||||||
prefixEmoji: "loading"
|
prefixEmoji: "loading"
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const buffer = await canvacord.Canvas.phub({
|
const buffer = await canvacord.Canvas.phub({
|
||||||
username: user.username,
|
username: user.username,
|
||||||
|
@ -53,8 +50,8 @@ class Phcomment extends Command {
|
||||||
m.error("misc:ERROR_OCCURRED", null, {
|
m.error("misc:ERROR_OCCURRED", null, {
|
||||||
edit: true
|
edit: true
|
||||||
});
|
});
|
||||||
};
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = Phcomment;
|
module.exports = Phcomment;
|
|
@ -33,8 +33,7 @@ class Qrcode extends Command {
|
||||||
content: message.translate("images/qrcode:SUCCESS"),
|
content: message.translate("images/qrcode:SUCCESS"),
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Qrcode;
|
module.exports = Qrcode;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js");
|
||||||
Discord = require("discord.js");
|
|
||||||
|
|
||||||
class Rip extends Command {
|
class Rip extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -13,7 +12,7 @@ class Rip extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +35,6 @@ class Rip extends Command {
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Rip;
|
module.exports = Rip;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js");
|
||||||
Discord = require("discord.js");
|
|
||||||
|
|
||||||
class Scary extends Command {
|
class Scary extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -13,7 +12,7 @@ class Scary extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +35,6 @@ class Scary extends Command {
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Scary;
|
module.exports = Scary;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js");
|
||||||
Discord = require("discord.js");
|
|
||||||
|
|
||||||
class Tobecontinued extends Command {
|
class Tobecontinued extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -13,7 +12,7 @@ class Tobecontinued extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +35,6 @@ class Tobecontinued extends Command {
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Tobecontinued;
|
module.exports = Tobecontinued;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js"),
|
||||||
Discord = require("discord.js"),
|
|
||||||
canvacord = require("canvacord");
|
canvacord = require("canvacord");
|
||||||
|
|
||||||
class Trash extends Command {
|
class Trash extends Command {
|
||||||
|
@ -14,7 +13,7 @@ class Trash extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +34,6 @@ class Trash extends Command {
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Trash;
|
module.exports = Trash;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js");
|
||||||
Discord = require("discord.js");
|
|
||||||
|
|
||||||
class Triggered extends Command {
|
class Triggered extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -13,7 +12,7 @@ class Triggered extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +37,6 @@ class Triggered extends Command {
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Triggered;
|
module.exports = Triggered;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js");
|
||||||
Discord = require("discord.js");
|
|
||||||
|
|
||||||
class Tweet extends Command {
|
class Tweet extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -13,7 +12,7 @@ class Tweet extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,6 +46,6 @@ class Tweet extends Command {
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Tweet;
|
module.exports = Tweet;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js");
|
||||||
Discord = require("discord.js");
|
|
||||||
|
|
||||||
class Wanted extends Command {
|
class Wanted extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -13,7 +12,7 @@ class Wanted extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +35,6 @@ class Wanted extends Command {
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Wanted;
|
module.exports = Wanted;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js");
|
||||||
Discord = require("discord.js");
|
|
||||||
|
|
||||||
class Wasted extends Command {
|
class Wasted extends Command {
|
||||||
constructor(client) {
|
constructor(client) {
|
||||||
|
@ -13,7 +12,7 @@ class Wasted extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +35,6 @@ class Wasted extends Command {
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Wasted;
|
module.exports = Wasted;
|
|
@ -1,5 +1,4 @@
|
||||||
const Command = require("../../base/Command.js"),
|
const Command = require("../../base/Command.js"),
|
||||||
Discord = require("discord.js"),
|
|
||||||
canvacord = require("canvacord");
|
canvacord = require("canvacord");
|
||||||
|
|
||||||
class YouTubeComment extends Command {
|
class YouTubeComment extends Command {
|
||||||
|
@ -14,7 +13,7 @@ class YouTubeComment extends Command {
|
||||||
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
botPermissions: ["SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"],
|
||||||
nsfw: false,
|
nsfw: false,
|
||||||
ownerOnly: false,
|
ownerOnly: false,
|
||||||
cooldown: 5000
|
cooldown: 3000
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,11 +21,8 @@ class YouTubeComment extends Command {
|
||||||
let user = await this.client.resolveUser(args[0]);
|
let user = await this.client.resolveUser(args[0]);
|
||||||
let text = args.join(" ");
|
let text = args.join(" ");
|
||||||
|
|
||||||
if (user) {
|
if (user) text = args.slice(1).join(" ");
|
||||||
text = args.slice(1).join(" ");
|
else user = message.author;
|
||||||
} else {
|
|
||||||
user = message.author;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!text) return message.error("images/phcomment:MISSING_TEXT"); // same text as phcomment
|
if (!text) return message.error("images/phcomment:MISSING_TEXT"); // same text as phcomment
|
||||||
|
|
||||||
|
@ -48,6 +44,6 @@ class YouTubeComment extends Command {
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = YouTubeComment;
|
module.exports = YouTubeComment;
|
|
@ -38,7 +38,7 @@ class Announcement extends Command {
|
||||||
tmsg.delete();
|
tmsg.delete();
|
||||||
msg.delete();
|
msg.delete();
|
||||||
collector.stop(true);
|
collector.stop(true);
|
||||||
};
|
}
|
||||||
|
|
||||||
if (tmsg.content.toLowerCase() === message.translate("common:YES").toLowerCase()) {
|
if (tmsg.content.toLowerCase() === message.translate("common:YES").toLowerCase()) {
|
||||||
tmsg.delete();
|
tmsg.delete();
|
||||||
|
@ -63,12 +63,12 @@ class Announcement extends Command {
|
||||||
m.delete();
|
m.delete();
|
||||||
collector.stop(true);
|
collector.stop(true);
|
||||||
c.stop(true);
|
c.stop(true);
|
||||||
};
|
}
|
||||||
});
|
});
|
||||||
c.on("end", (collected, reason) => {
|
c.on("end", (collected, reason) => {
|
||||||
if (reason === "time") return message.error("misc:TIMES_UP");
|
if (reason === "time") return message.error("misc:TIMES_UP");
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
collector.on("end", (collected, reason) => {
|
collector.on("end", (collected, reason) => {
|
||||||
|
@ -91,6 +91,6 @@ class Announcement extends Command {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Announcement;
|
module.exports = Announcement;
|
|
@ -44,7 +44,7 @@ class Ban extends Command {
|
||||||
const moderationPosition = message.member.roles.highest.position;
|
const moderationPosition = message.member.roles.highest.position;
|
||||||
if (message.member.ownerId !== message.author.id && !(moderationPosition > memberPosition)) return message.error("moderation/ban:SUPERIOR");
|
if (message.member.ownerId !== message.author.id && !(moderationPosition > memberPosition)) return message.error("moderation/ban:SUPERIOR");
|
||||||
if (!member.bannable) return message.error("moderation/ban:MISSING_PERM");
|
if (!member.bannable) return message.error("moderation/ban:MISSING_PERM");
|
||||||
};
|
}
|
||||||
|
|
||||||
await user.send(message.translate("moderation/ban:BANNED_DM", {
|
await user.send(message.translate("moderation/ban:BANNED_DM", {
|
||||||
username: user.tag,
|
username: user.tag,
|
||||||
|
@ -77,7 +77,7 @@ class Ban extends Command {
|
||||||
if (memberData) {
|
if (memberData) {
|
||||||
memberData.sanctions.push(caseInfo);
|
memberData.sanctions.push(caseInfo);
|
||||||
memberData.save();
|
memberData.save();
|
||||||
};
|
}
|
||||||
|
|
||||||
data.guild.casesCount++;
|
data.guild.casesCount++;
|
||||||
data.guild.save();
|
data.guild.save();
|
||||||
|
@ -98,13 +98,13 @@ class Ban extends Command {
|
||||||
channel.send({
|
channel.send({
|
||||||
embeds: [embed]
|
embeds: [embed]
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
return message.error("moderation/ban:MISSING_PERM");
|
return message.error("moderation/ban:MISSING_PERM");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Ban;
|
module.exports = Ban;
|
|
@ -33,7 +33,7 @@ class Clear extends Command {
|
||||||
return newChannel.send({
|
return newChannel.send({
|
||||||
content: message.translate("moderation/clear:CHANNEL_CLEARED")
|
content: message.translate("moderation/clear:CHANNEL_CLEARED")
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
let amount = args[0];
|
let amount = args[0];
|
||||||
if (!amount || isNaN(amount) || parseInt(amount) < 1) return message.error("moderation/clear:MISSING_AMOUNT");
|
if (!amount || isNaN(amount) || parseInt(amount) < 1) return message.error("moderation/clear:MISSING_AMOUNT");
|
||||||
|
@ -64,12 +64,12 @@ class Clear extends Command {
|
||||||
toDelete = await message.success("moderation/clear:CLEARED", {
|
toDelete = await message.success("moderation/clear:CLEARED", {
|
||||||
amount: `${--amount} ${message.getNoun(--amount, message.translate("misc:NOUNS:MESSAGES:1"), message.translate("misc:NOUNS:MESSAGES:2"), message.translate("misc:NOUNS:MESSAGES:5"))}`
|
amount: `${--amount} ${message.getNoun(--amount, message.translate("misc:NOUNS:MESSAGES:1"), message.translate("misc:NOUNS:MESSAGES:2"), message.translate("misc:NOUNS:MESSAGES:5"))}`
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
toDelete.delete();
|
toDelete.delete();
|
||||||
}, 2000);
|
}, 2000);
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Clear;
|
module.exports = Clear;
|
|
@ -30,6 +30,6 @@ class Clearwarns extends Command {
|
||||||
username: member.user.tag
|
username: member.user.tag
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
module.exports = Clearwarns;
|
module.exports = Clearwarns;
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue