JoelHCraft
JoelHCraft
DIAdiscord.js - Imagine an app
Created by JoelHCraft on 5/19/2024 in #djs-questions
@discord/embedded-app-sdk
So I am following the current guide : https://discord.com/developers/docs/activities/building-an-activity#step-4-running-your-app-locally-in-discord On step 6 I put in all the code and for some reason the activity channel text just doesnt show on my activity my end. I have closed the activity etc
3 replies
DIAdiscord.js - Imagine an app
Created by JoelHCraft on 12/20/2023 in #djs-questions
Arrays
So I am using a database to store some punishments for a game. I was wondering if its possible for each thing so Game Ban will be one array of data then server ban will be another if they have more than one if that makes sense. Is it possible to make a new embed field automatically ?
7 replies
DIAdiscord.js - Imagine an app
Created by JoelHCraft on 12/13/2023 in #djs-questions
Option values
So I have this option with choices
{
name: 'punishment-type',
type: ApplicationCommandOptionType.String,
description: 'Type of punishment',
required: true,
choices: [
{
name: 'Game Ban',
value: 'game-ban',
},
{
name: 'Server Ban',
value: 'server-ban',
},
{
name: 'Kick',
value: 'server-kick',
},
{
name: 'Warning',
value: 'server-warning',
},
],
},
{
name: 'punishment-type',
type: ApplicationCommandOptionType.String,
description: 'Type of punishment',
required: true,
choices: [
{
name: 'Game Ban',
value: 'game-ban',
},
{
name: 'Server Ban',
value: 'server-ban',
},
{
name: 'Kick',
value: 'server-kick',
},
{
name: 'Warning',
value: 'server-warning',
},
],
},
And to get the value i use
const punishmentTypeValue = interaction.options.get('punishment-type')?.value || 'No punishment type provided';
const punishmentTypeValue = interaction.options.get('punishment-type')?.value || 'No punishment type provided';
I was wondering instead of the choice value is it possible to get the choice name ? I cannot seem to figure out how..
17 replies
DIAdiscord.js - Imagine an app
Created by JoelHCraft on 12/13/2023 in #djs-questions
Embed editting
Hello all, I have been trying to get an embed field to edit once a button is clicked is this possible ?
19 replies
DIAdiscord.js - Imagine an app
Created by JoelHCraft on 12/12/2023 in #djs-questions
Err | Embed failure / Invalid body form
Hi all, I keep getting this error never seen this before.
TThere was an error: DiscordAPIError[50035]: Invalid Form Body
options[0][UNION_TYPE_CHOICES]: Value of field "type" must be one of (3, 7, 9, 11, 8, 10, 6, 1, 2, 4, 5).
options[1][UNION_TYPE_CHOICES]: Value of field "type" must be one of (3, 7, 9, 11, 8, 10, 6, 1, 2, 4, 5).
There was an error running this command: TypeError: MessageActionRow is not a constructor
TThere was an error: DiscordAPIError[50035]: Invalid Form Body
options[0][UNION_TYPE_CHOICES]: Value of field "type" must be one of (3, 7, 9, 11, 8, 10, 6, 1, 2, 4, 5).
options[1][UNION_TYPE_CHOICES]: Value of field "type" must be one of (3, 7, 9, 11, 8, 10, 6, 1, 2, 4, 5).
There was an error running this command: TypeError: MessageActionRow is not a constructor
16 replies
DIAdiscord.js - Imagine an app
Created by JoelHCraft on 12/9/2023 in #djs-questions
SyntaxError: Unexpected token '{'
I do not know why this is a major error all of sudden is their something i need to update ?
7 replies