위원장님
위원장님
DIAdiscord.js - Imagine an app
Created by 위원장님 on 9/4/2023 in #djs-questions
Modal input types
How many types of inputs can we have in Discord modals? I know of short and paragraph text inputs. But can we have dropdown/select inputs, checkmarks, radios etc. like we can in HTML forms? How or why not?
6 replies
DIAdiscord.js - Imagine an app
Created by 위원장님 on 8/26/2023 in #djs-questions
Cannot schedule event in the past
I gave this argument when creating my scheduled event:
scheduledStartTime: timestamp
scheduledStartTime: timestamp
The bot wrote this date in the message in my guild:
Saturday, 26 August 2023 15:00
Saturday, 26 August 2023 15:00
That is in a few minutes for me in my timezone, so it should be in the future. However, in my console, a completely wrong date is being sent to the API:
scheduled_start_time: '1970-01-20T14:17:34.800Z'
scheduled_start_time: '1970-01-20T14:17:34.800Z'
And thus I'm getting the following error:
scheduled_start_time[GUILD_SCHEDULED_EVENT_SCHEDULE_PAST]: Cannot schedule event in the past.
scheduled_start_time[GUILD_SCHEDULED_EVENT_SCHEDULE_PAST]: Cannot schedule event in the past.
13 replies
DIAdiscord.js - Imagine an app
Created by 위원장님 on 8/26/2023 in #djs-questions
Message.startThread: Missing Access
I'm doing something like this:
const client = new Client({
intents: [
// How many flags do I need to start a new thread and attach it to the startmessage it's branching off of?
IntentsBitField.Flags.Guilds,
IntentsBitField.Flags.GuildMembers,
IntentsBitField.Flags.GuildMessages,
IntentsBitField.Flags.GuildMessageTyping,
IntentsBitField.Flags.GuildMessageReactions,
IntentsBitField.Flags.MessageContent,
IntentsBitField.Flags.GuildIntegrations,x
],
});

client.on('interactionCreate', async (interaction) => {
const announcement = await interaction.reply({
content: `## Announcement`,
fetchReply: true,
});

const thread = await announcement.startThread({
name: 'Announcement',
});
});
const client = new Client({
intents: [
// How many flags do I need to start a new thread and attach it to the startmessage it's branching off of?
IntentsBitField.Flags.Guilds,
IntentsBitField.Flags.GuildMembers,
IntentsBitField.Flags.GuildMessages,
IntentsBitField.Flags.GuildMessageTyping,
IntentsBitField.Flags.GuildMessageReactions,
IntentsBitField.Flags.MessageContent,
IntentsBitField.Flags.GuildIntegrations,x
],
});

client.on('interactionCreate', async (interaction) => {
const announcement = await interaction.reply({
content: `## Announcement`,
fetchReply: true,
});

const thread = await announcement.startThread({
name: 'Announcement',
});
});
And I'm getting a response like this:
DiscordAPIError[50001]: Missing Access
at ... {
requestBody: {
files: undefined,
json: {
name: 'Announcement',
auto_archive_duration: undefined,
type: 11,
invitable: undefined,
rate_limit_per_user: undefined
}
},
rawError: { message: 'Missing Access', code: 50001 },
code: 50001,
status: 403,
method: 'POST',
url: 'https://discord.com/api/v10/channels/.../messages/.../threads'
}
DiscordAPIError[50001]: Missing Access
at ... {
requestBody: {
files: undefined,
json: {
name: 'Announcement',
auto_archive_duration: undefined,
type: 11,
invitable: undefined,
rate_limit_per_user: undefined
}
},
rawError: { message: 'Missing Access', code: 50001 },
code: 50001,
status: 403,
method: 'POST',
url: 'https://discord.com/api/v10/channels/.../messages/.../threads'
}
My PermissionsBitField looks like this:
PermissionsBitField { bitfield: 560750900276855n }
PermissionsBitField { bitfield: 560750900276855n }
6 replies
DIAdiscord.js - Imagine an app
Created by 위원장님 on 8/23/2023 in #djs-questions
Detect replies and edit own message
Can I make my bot detect when a user is replying to it and then update the message that was replied to? I have a bot that writes messages. And I want the ability to tell it to correct a message if I'm replying to it.
8 replies