Булочка | pasha_boez
Булочка | pasha_boez
DIAdiscord.js - Imagine an app
Created by Romain33 on 10/4/2024 in #djs-questions
ChannelSelectMenu
Can you send row, when you imports ChannelType?
11 replies
DIAdiscord.js - Imagine an app
Created by ntb896 on 7/11/2024 in #djs-questions
Avoid commands being sent at the same time
I think the best option would be to create a queue in another file like utils.js and work with them only in the required commands by adding the request to the queue before requesting the file and deleting after request is over.
22 replies
DIAdiscord.js - Imagine an app
Created by ntb896 on 7/11/2024 in #djs-questions
Avoid commands being sent at the same time
@ntb896
22 replies
DIAdiscord.js - Imagine an app
Created by ntb896 on 7/11/2024 in #djs-questions
Avoid commands being sent at the same time
Check for queue length and stop unwanted executions
22 replies
DIAdiscord.js - Imagine an app
Created by ntb896 on 7/11/2024 in #djs-questions
Avoid commands being sent at the same time
Hey. You can use queue packages like "promise-queue" or "@sapphire/async-queue"
22 replies
DIAdiscord.js - Imagine an app
Created by Almaz 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 Almaz 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 Almaz 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 Almaz 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 Almaz 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 Almaz 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 Almaz 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 Almaz on 9/27/2023 in #djs-questions
How can I log slash commands like this:
🙂
65 replies
DIAdiscord.js - Imagine an app
Created by Almaz on 9/27/2023 in #djs-questions
How can I log slash commands like this:
👍
65 replies
DIAdiscord.js - Imagine an app
Created by Almaz 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 Almaz 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 Almaz 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 Almaz on 9/27/2023 in #djs-questions
How can I log slash commands like this:
Yeah, sorry
65 replies