Skip to content

Commit

Permalink
feat: add credits command
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperchupuDev committed Oct 2, 2021
1 parent 51d4151 commit 88d5541
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
18 changes: 18 additions & 0 deletions commands/bot/credits.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
name: 'credits',
description: 'People who helped in the development',
async execute(client, message) {
const developers = (await Promise.all(client.config.developers.map(async id => (await client.users.fetch(id)).tag))).join('\n');
const specialThanksUsers = (await Promise.all(client.config.specialThanksUsers.map(async id => (await client.users.fetch(id)).tag))).join('\n');
message.channel.send({
embeds: [{
title: 'Credits',
fields: [
{ name: '<:VerifiedBotDev:855104541967384616> Developers', value: developers, inline: true },
{ name: '⭐ Special Thanks', value: specialThanksUsers, inline: true }
],
color: client.config.color
}]
});
}
};
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"prefix": "ha!",
"developers": ["478823932913516544", "682617926909427743", "348591272476540928"],
"specialThanksUsers": [],
"specialThanksUsers": ["429935667737264139", "444550944110149633", "528229753258246145", "299921398992994304", "692037827940057129", "603635602809946113"],
"invite": {
"permissions": ["ADD_REACTIONS", "VIEW_CHANNEL", "SEND_MESSAGES", "MANAGE_MESSAGES", "EMBED_LINKS", "ATTACH_FILES", "READ_MESSAGE_HISTORY", "USE_EXTERNAL_EMOJIS", "CHANGE_NICKNAME", "MANAGE_NICKNAMES", "MANAGE_ROLES"],
"scopes": ["bot", "applications.commands"]
Expand Down
17 changes: 17 additions & 0 deletions interactions/commands/credits.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
name: 'credits',
async execute(client, interaction) {
const developers = (await Promise.all(client.config.developers.map(async id => (await client.users.fetch(id)).tag))).join('\n');
const specialThanksUsers = (await Promise.all(client.config.specialThanksUsers.map(async id => (await client.users.fetch(id)).tag))).join('\n');
interaction.reply({
embeds: [{
title: 'Credits',
fields: [
{ name: '<:VerifiedBotDev:855104541967384616> Developers', value: developers, inline: true },
{ name: '⭐ Special Thanks', value: specialThanksUsers, inline: true }
],
color: client.config.color
}]
});
}
};

0 comments on commit 88d5541

Please sign in to comment.