Булочка | pasha_boez
Булочка | pasha_boez
DIAdiscord.js - Imagine an app
Created by 𝐀𝐥𝐦𝐚𝐳 on 12/9/2023 in #djs-questions
Hi! I have a problem with roleinfo command
It's an example for this
13 replies
DIAdiscord.js - Imagine an app
Created by 𝐀𝐥𝐦𝐚𝐳 on 12/9/2023 in #djs-questions
Hi! I have a problem with roleinfo command
@! ! </Almaz>
13 replies
DIAdiscord.js - Imagine an app
Created by 𝐀𝐥𝐦𝐚𝐳 on 12/9/2023 in #djs-questions
Hi! I have a problem with roleinfo command
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.length > 0 ? perms.join(', ') : "There are no permissions to display"}`
}
],
type: 'editreply'
}, interaction)
}


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.length > 0 ? perms.join(', ') : "There are no permissions to display"}`
}
],
type: 'editreply'
}, interaction)
}


13 replies
DIAdiscord.js - Imagine an app
Created by 𝐀𝐥𝐦𝐚𝐳 on 12/9/2023 in #djs-questions
Hi! I have a problem with roleinfo command
If it's true, you need to check array's length and enter something if length is 0
13 replies
DIAdiscord.js - Imagine an app
Created by 𝐀𝐥𝐦𝐚𝐳 on 12/9/2023 in #djs-questions
Hi! I have a problem with roleinfo command
Hi. I think, some of your roles don't have permissions to show. You can check this with console.log(perms) before client.embed..., certainly, you get an empty array
13 replies
DIAdiscord.js - Imagine an app
Created by Marianna on 10/28/2023 in #djs-questions
Edit last message
U can check this via <Message>.editable
4 replies
DIAdiscord.js - Imagine an app
Created by Neoproxy on 10/8/2023 in #djs-questions
How to fire guildBanAdd without guildMemberRemove
I think you need to check audit logs
5 replies
DIAdiscord.js - Imagine an app
Created by 𝐀𝐥𝐦𝐚𝐳 on 9/27/2023 in #djs-questions
How can I log slash commands like this:
You're welcome 🙂
65 replies
DIAdiscord.js - Imagine an app
Created by 𝐀𝐥𝐦𝐚𝐳 on 9/27/2023 in #djs-questions
How can I log slash commands like this:
+. Thanks
65 replies
DIAdiscord.js - Imagine an app
Created by 𝐀𝐥𝐦𝐚𝐳 on 9/27/2023 in #djs-questions
How can I log slash commands like this:
🙂
65 replies
DIAdiscord.js - Imagine an app
Created by 𝐀𝐥𝐦𝐚𝐳 on 9/27/2023 in #djs-questions
How can I log slash commands like this:
👍
65 replies
DIAdiscord.js - Imagine an app
Created by 𝐀𝐥𝐦𝐚𝐳 on 9/27/2023 in #djs-questions
How can I log slash commands like this:
Code work?
65 replies
DIAdiscord.js - Imagine an app
Created by 𝐀𝐥𝐦𝐚𝐳 on 9/27/2023 in #djs-questions
How can I log slash commands like this:
Good luck to you with it!
65 replies
DIAdiscord.js - Imagine an app
Created by 𝐀𝐥𝐦𝐚𝐳 on 9/27/2023 in #djs-questions
How can I log slash commands like this:
Want to 😴
65 replies
DIAdiscord.js - Imagine an app
Created by 𝐀𝐥𝐦𝐚𝐳 on 9/27/2023 in #djs-questions
How can I log slash commands like this:
Yeah, sorry
65 replies
DIAdiscord.js - Imagine an app
Created by 𝐀𝐥𝐦𝐚𝐳 on 9/27/2023 in #djs-questions
How can I log slash commands like this:
2
65 replies
DIAdiscord.js - Imagine an app
Created by 𝐀𝐥𝐦𝐚𝐳 on 9/27/2023 in #djs-questions
How can I log slash commands like this:
And twend .
65 replies
DIAdiscord.js - Imagine an app
Created by 𝐀𝐥𝐦𝐚𝐳 on 9/27/2023 in #djs-questions
How can I log slash commands like this:
Remove spaces 🙂 Hard to edit code from mobile
65 replies
DIAdiscord.js - Imagine an app
Created by 𝐀𝐥𝐦𝐚𝐳 on 9/27/2023 in #djs-questions
How can I log slash commands like this:
Where u create content const
65 replies
DIAdiscord.js - Imagine an app
Created by 𝐀𝐥𝐦𝐚𝐳 on 9/27/2023 in #djs-questions
How can I log slash commands like this:
Use .join("\n") instead of .join(" ")
65 replies