! Murali Anand
! Murali Anand
DIAdiscord.js - Imagine an app
Created by ! Murali Anand on 5/1/2024 in #djs-questions
Direct Message Users Rate Limit
👍
6 replies
DIAdiscord.js - Imagine an app
Created by ! Murali Anand on 9/22/2023 in #djs-questions
HTTPError: Bad Gateway
Thx
10 replies
DIAdiscord.js - Imagine an app
Created by ! Murali Anand on 9/22/2023 in #djs-questions
HTTPError: Bad Gateway
👍
10 replies
DIAdiscord.js - Imagine an app
Created by ! Murali Anand on 9/22/2023 in #djs-questions
HTTPError: Bad Gateway
HTTPError: Bad Gateway
at handleErrors (/home/container/node_modules/@discordjs/rest/dist/index.js:680:11)
at SequentialHandler.runRequest (/home/container/node_modules/@discordjs/rest/dist/index.js:1072:29)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.queueRequest (/home/container/node_modules/@discordjs/rest/dist/index.js:913:14)
at async _REST.request (/home/container/node_modules/@discordjs/rest/dist/index.js:1218:22)
at async GuildChannelManager.edit (/home/container/node_modules/discord.js/src/managers/GuildChannelManager.js:299:21) {
requestBody: {
files: undefined,
json: {
name: 'Total Members: 5817',
type: undefined,
topic: undefined,
nsfw: undefined,
bitrate: 64000,
user_limit: 0,
rtc_region: null,
video_quality_mode: undefined,
parent_id: undefined,
lock_permissions: undefined,
rate_limit_per_user: undefined,
default_auto_archive_duration: undefined,
permission_overwrites: undefined,
available_tags: undefined,
default_reaction_emoji: undefined,
default_thread_rate_limit_per_user: undefined,
flags: undefined,
default_sort_order: undefined,
default_forum_layout: undefined
}
},
status: 502,
method: 'PATCH',
url: 'https://discord.com/api/v10/channels/1106934596890808392'
}
HTTPError: Bad Gateway
at handleErrors (/home/container/node_modules/@discordjs/rest/dist/index.js:680:11)
at SequentialHandler.runRequest (/home/container/node_modules/@discordjs/rest/dist/index.js:1072:29)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.queueRequest (/home/container/node_modules/@discordjs/rest/dist/index.js:913:14)
at async _REST.request (/home/container/node_modules/@discordjs/rest/dist/index.js:1218:22)
at async GuildChannelManager.edit (/home/container/node_modules/discord.js/src/managers/GuildChannelManager.js:299:21) {
requestBody: {
files: undefined,
json: {
name: 'Total Members: 5817',
type: undefined,
topic: undefined,
nsfw: undefined,
bitrate: 64000,
user_limit: 0,
rtc_region: null,
video_quality_mode: undefined,
parent_id: undefined,
lock_permissions: undefined,
rate_limit_per_user: undefined,
default_auto_archive_duration: undefined,
permission_overwrites: undefined,
available_tags: undefined,
default_reaction_emoji: undefined,
default_thread_rate_limit_per_user: undefined,
flags: undefined,
default_sort_order: undefined,
default_forum_layout: undefined
}
},
status: 502,
method: 'PATCH',
url: 'https://discord.com/api/v10/channels/1106934596890808392'
}
10 replies
DIAdiscord.js - Imagine an app
Created by ! Murali Anand on 8/3/2023 in #djs-questions
ComponentType.SelectMenu not working after [email protected]
No error in the console and no reply
6 replies
DIAdiscord.js - Imagine an app
Created by ! Murali Anand on 8/3/2023 in #djs-questions
ComponentType.SelectMenu not working after [email protected]
const collector = await msg.createMessageComponentCollector({
componentType: ComponentType.StringSelect,
time: 30000,
max: 1
});

collector.on('collect', async (i) => {
if (i.user.id === interaction.user.id) {

if (i.values[0] == 'above-18') {

const embed = new EmbedBuilder()
.setColor('Green')
.setImage('https://cdn.discordapp.com/attachments/1097420467532472340/1102470374702190623/18.png')
const button = new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setCustomId('above-button-verify')
.setLabel('18 +')
.setStyle(ButtonStyle.Success)
)

i.reply({ embeds: [embed], components: [button], ephemeral: true });
}

if (i.values[0] == 'below-18') {

const embed = new EmbedBuilder()
.setColor('Green')
.setImage('https://cdn.discordapp.com/attachments/1097420467532472340/1102472300181331978/18-.png')
const button = new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setCustomId('below-button-verify')
.setLabel('18 -')
.setStyle(ButtonStyle.Success)
)

i.reply({ embeds: [embed], components: [button], ephemeral: true });
}
}
});
const collector = await msg.createMessageComponentCollector({
componentType: ComponentType.StringSelect,
time: 30000,
max: 1
});

collector.on('collect', async (i) => {
if (i.user.id === interaction.user.id) {

if (i.values[0] == 'above-18') {

const embed = new EmbedBuilder()
.setColor('Green')
.setImage('https://cdn.discordapp.com/attachments/1097420467532472340/1102470374702190623/18.png')
const button = new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setCustomId('above-button-verify')
.setLabel('18 +')
.setStyle(ButtonStyle.Success)
)

i.reply({ embeds: [embed], components: [button], ephemeral: true });
}

if (i.values[0] == 'below-18') {

const embed = new EmbedBuilder()
.setColor('Green')
.setImage('https://cdn.discordapp.com/attachments/1097420467532472340/1102472300181331978/18-.png')
const button = new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setCustomId('below-button-verify')
.setLabel('18 -')
.setStyle(ButtonStyle.Success)
)

i.reply({ embeds: [embed], components: [button], ephemeral: true });
}
}
});
Still not working for me : (
6 replies
DIAdiscord.js - Imagine an app
Created by ! Murali Anand on 8/3/2023 in #djs-questions
ComponentType.SelectMenu not working after [email protected]
6 replies
DIAdiscord.js - Imagine an app
Created by ! Murali Anand on 7/17/2023 in #djs-questions
Unknown interaction
👍
6 replies
DIAdiscord.js - Imagine an app
Created by ! Murali Anand on 5/24/2023 in #djs-questions
Why I'm unable to send messages in Announcement type channels?
think I think, I gotta use some brain. thx
17 replies
DIAdiscord.js - Imagine an app
Created by ! Murali Anand on 5/24/2023 in #djs-questions
Why I'm unable to send messages in Announcement type channels?
I mean line by line texts
17 replies
DIAdiscord.js - Imagine an app
Created by ! Murali Anand on 5/24/2023 in #djs-questions
Why I'm unable to send messages in Announcement type channels?
but in the slash command "Hello World" I'm unable to type messages like these.
17 replies
DIAdiscord.js - Imagine an app
Created by ! Murali Anand on 5/24/2023 in #djs-questions
Why I'm unable to send messages in Announcement type channels?
is this normal?
17 replies
DIAdiscord.js - Imagine an app
Created by ! Murali Anand on 5/24/2023 in #djs-questions
Why I'm unable to send messages in Announcement type channels?
yes, i've found that message prefix commands doesnt work at announcement type channels
17 replies
DIAdiscord.js - Imagine an app
Created by ! Murali Anand on 5/24/2023 in #djs-questions
Why I'm unable to send messages in Announcement type channels?
this issue only occurs when i try to send message at announcement type channel and works perfectly in normal text type
17 replies
DIAdiscord.js - Imagine an app
Created by ! Murali Anand on 5/24/2023 in #djs-questions
Why I'm unable to send messages in Announcement type channels?
no
17 replies
DIAdiscord.js - Imagine an app
Created by ! Murali Anand on 5/24/2023 in #djs-questions
Why I'm unable to send messages in Announcement type channels?
no errors and bot has the required perms too
17 replies
DIAdiscord.js - Imagine an app
Created by ! Murali Anand on 4/23/2023 in #djs-questions
DiscordAPIError[40060]: Interaction has already been acknowledged.
I.e FiveM Txadmin and My ticket bot
10 replies
DIAdiscord.js - Imagine an app
Created by ! Murali Anand on 4/23/2023 in #djs-questions
DiscordAPIError[40060]: Interaction has already been acknowledged.
I found the issue, I've been running the 2 application using same bot token. Mb
10 replies
DIAdiscord.js - Imagine an app
Created by ! Murali Anand on 4/23/2023 in #djs-questions
DiscordAPIError[40060]: Interaction has already been acknowledged.
10 replies
DIAdiscord.js - Imagine an app
Created by ! Murali Anand on 4/23/2023 in #djs-questions
DiscordAPIError[40060]: Interaction has already been acknowledged.
module.exports = {
data: new SlashCommandBuilder()
.setName('add')
.setDescription('Add someone to the ticket (Ticket Command) ')
.setDMPermission(false)
.addUserOption(option =>
option.setName('target')
.setDescription('Member to add to ticket')
.setRequired(true)),
async execute(interaction, client) {

const ticketDoc = await ticketData.findOne({
ticketGuildID: interaction.guild.id
}).catch(err => console.log(err));

const chan = client.channels.cache.get(interaction.channelId);
const user = interaction.options.getUser('target');
const userID = user.id;

let Support_Role = ticketDoc.ticketSupportID;

if (chan.name.includes('ticket')) {
chan.edit({
permissionOverwrites: [
{
id: userID,
allow: [PermissionFlagsBits.SendMessages, PermissionFlagsBits.ViewChannel],
},
{
id: interaction.guild.roles.everyone,
deny: [PermissionFlagsBits.ViewChannel],
},
{
id: Support_Role,
allow: [PermissionFlagsBits.SendMessages, PermissionFlagsBits.ViewChannel],
},
],
}).then(async () => {
interaction.reply({
content: `<@${user.id}> has been added to the ticket!`
});
});

} else {
const ReplyEmbed = new EmbedBuilder()
.setColor("#ED4245")
.setDescription('You are not in a Ticket!')

await interaction.reply({
embeds: [ReplyEmbed],
ephemeral: true
});
};
},
};
module.exports = {
data: new SlashCommandBuilder()
.setName('add')
.setDescription('Add someone to the ticket (Ticket Command) ')
.setDMPermission(false)
.addUserOption(option =>
option.setName('target')
.setDescription('Member to add to ticket')
.setRequired(true)),
async execute(interaction, client) {

const ticketDoc = await ticketData.findOne({
ticketGuildID: interaction.guild.id
}).catch(err => console.log(err));

const chan = client.channels.cache.get(interaction.channelId);
const user = interaction.options.getUser('target');
const userID = user.id;

let Support_Role = ticketDoc.ticketSupportID;

if (chan.name.includes('ticket')) {
chan.edit({
permissionOverwrites: [
{
id: userID,
allow: [PermissionFlagsBits.SendMessages, PermissionFlagsBits.ViewChannel],
},
{
id: interaction.guild.roles.everyone,
deny: [PermissionFlagsBits.ViewChannel],
},
{
id: Support_Role,
allow: [PermissionFlagsBits.SendMessages, PermissionFlagsBits.ViewChannel],
},
],
}).then(async () => {
interaction.reply({
content: `<@${user.id}> has been added to the ticket!`
});
});

} else {
const ReplyEmbed = new EmbedBuilder()
.setColor("#ED4245")
.setDescription('You are not in a Ticket!')

await interaction.reply({
embeds: [ReplyEmbed],
ephemeral: true
});
};
},
};
10 replies