Skip to content

Commit

Permalink
Merge pull request #7 from Artivain/unstable
Browse files Browse the repository at this point in the history
Version 1.4.0
  • Loading branch information
GoudronViande24 authored Dec 26, 2021
2 parents 071c526 + 327b09e commit 5e3532b
Show file tree
Hide file tree
Showing 10 changed files with 1,065 additions and 82 deletions.
17 changes: 17 additions & 0 deletions ab-core/events/slashInit.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const { params, devMode, testGuildId } = require("../../config.json");
params.devMode = devMode;
params.testGuildId = testGuildId;

module.exports = {
name: "ready",
once: true,

execute(client) {
// Execute init function of each command if it's defined
client.slashCommands.forEach(command => {
if (typeof command.init === "function") {
command.init(client, params);
};
});
}
}
7 changes: 7 additions & 0 deletions ab-modules/commands/core/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,19 @@ module.exports = {
"[GitHub](https://github.com/Artivain/artibot)"
}

var memberCount = 0;
message.client.guilds.cache.forEach((guild) => {
memberCount += guild.memberCount;
});

let embed = new MessageEmbed()
.setColor(config.embedColor)
.setFooter(config.botName, config.botIcon)
.setTimestamp()
.setTitle("À propos de " + config.botName)
.setDescription(description)
.addField("Nombre de serveurs", message.client.guilds.cache.size + " serveurs", true)
.addField("Nombre d'utilisateurs", memberCount+ " utilisateurs", true)
.addField("Version", botVersion)
.addField("Développeurs", devs, true)
.addField("Donateurs", donators, true);
Expand Down
3 changes: 2 additions & 1 deletion ab-modules/commands/core/reload.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ module.exports = {

// 🎉 Confirmation sent if reloading was successful!
message.channel.send({
content: `La commande \`${newCommand.name}\` a bien été rafraichie!`,
content: `La commande \`${newCommand.name}\` a bien été rafraichie!`
});
console.log(`[Artibot] Commande ${newCommand.name} rafraichie.`);
} catch (error) {
// Catch block executes if there is any error in your code. It logs the error in console and also sends back in discord GUI.

Expand Down
7 changes: 7 additions & 0 deletions ab-modules/slash-commands/core/info.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,19 @@ module.exports = {
"[GitHub](https://github.com/Artivain/artibot)"
}

var memberCount = 0;
interaction.client.guilds.cache.forEach((guild) => {
memberCount += guild.memberCount;
});

let embed = new MessageEmbed()
.setColor(config.embedColor)
.setFooter(config.botName, config.botIcon)
.setTimestamp()
.setTitle("À propos de " + config.botName)
.setDescription(description)
.addField("Nombre de serveurs", interaction.client.guilds.cache.size + " serveurs", true)
.addField("Nombre d'utilisateurs", memberCount+ " utilisateurs", true)
.addField("Version", botVersion)
.addField("Développeurs", devs, true)
.addField("Donateurs", donators, true);
Expand Down
1 change: 1 addition & 0 deletions ab-modules/slash-commands/giveaways/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
data
Loading

0 comments on commit 5e3532b

Please sign in to comment.