/RibbonTalkDistance
Created 1 year, 4 months ago...
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
const Discord = require('discord.js');
module.exports = async (client, interaction, args) => {
const role = interaction.options.getRole('role');
const perms = role.permissions.toArray();
if (!role) {
return interaction.reply('Please provide a valid role.');
}
client.embed({
title: `ℹ️・Role information`,
thumbnail: interaction.guild.iconURL({ dynamic: true, size: 1024 }),
desc: `Information about the role ${role}`,
fields: [
{
name: 'Role ID:',
value: `${role.id}`,
inline: true
},
{
name: 'Role Name:',
value: `${role.name}`,
inline: true
},
{
name: 'Mentionable:',
value: `${role.mentionable ? 'Yes' : 'No'}`,
inline: true
},
{
name: 'Role Permissions:',
value: `${perms.join(', ')}`
}
],
type: 'editreply'
}, interaction)
}