Epsilon
Epsilon
DIAdiscord.js - Imagine an app
Created by Epsilon on 10/1/2023 in #djs-questions
Buttons!
const actionRow = new ActionRowBuilder({
components: [
{
const chzburgButton = new ButtonBuilder()
.setLabel("Assemble cheeseburger!")
.setStyle(ButtonStyle.Primary)
.setCustomId("chzburgID")
},
],
});
const actionRow = new ActionRowBuilder({
components: [
{
const chzburgButton = new ButtonBuilder()
.setLabel("Assemble cheeseburger!")
.setStyle(ButtonStyle.Primary)
.setCustomId("chzburgID")
},
],
});
24 replies
DIAdiscord.js - Imagine an app
Created by Epsilon on 10/1/2023 in #djs-questions
Buttons!
24 replies
DIAdiscord.js - Imagine an app
Created by Epsilon on 10/1/2023 in #djs-questions
Buttons!
24 replies
DIAdiscord.js - Imagine an app
Created by Epsilon on 10/1/2023 in #djs-questions
Buttons!
Yikes.
24 replies
DIAdiscord.js - Imagine an app
Created by Epsilon on 10/1/2023 in #djs-questions
Buttons!
const { Client, GatewayIntentBits, EmbedBuilder, ActivityType, ActionRowBuilder, ButtonBuilder, ButtonStyle, Events, ModalBuilder, TextInputBuilder, TextInputStyle } = require('discord.js');
const client = new Client({ intents: [GatewayIntentBits.Guilds] });

const TOKEN = process.env['TOKEN']

client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);

client.user.setPresence({ activities: [{ name: 'over a ton of cheeseburgers.', type: ActivityType.Watching }], status: 'online' })

});
const chzburgButton = new ButtonBuilder()
.setLabel("Assemble cheeseburger!")
.setStyle(ButtonStyle.Primary)
.setCustomID("chzburgID")

const chzburgEmbed = new EmbedBuilder()
.setTitle("Heres your cheeseburger!")
.setDescription("🍞\n 🥬\n 🧀\n 🥓\n 🥩\n 🍞")
.setColor(0x01611F)


client.on('interactionCreate', async interaction => {
if (!interaction.isChatInputCommand()) return;

if (interaction.commandName === 'cheeseburger') {
await interaction.reply ({embeds: [chzburgEmbed], components:[chzburgButton]})

}
});

client.login(TOKEN);
const { Client, GatewayIntentBits, EmbedBuilder, ActivityType, ActionRowBuilder, ButtonBuilder, ButtonStyle, Events, ModalBuilder, TextInputBuilder, TextInputStyle } = require('discord.js');
const client = new Client({ intents: [GatewayIntentBits.Guilds] });

const TOKEN = process.env['TOKEN']

client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);

client.user.setPresence({ activities: [{ name: 'over a ton of cheeseburgers.', type: ActivityType.Watching }], status: 'online' })

});
const chzburgButton = new ButtonBuilder()
.setLabel("Assemble cheeseburger!")
.setStyle(ButtonStyle.Primary)
.setCustomID("chzburgID")

const chzburgEmbed = new EmbedBuilder()
.setTitle("Heres your cheeseburger!")
.setDescription("🍞\n 🥬\n 🧀\n 🥓\n 🥩\n 🍞")
.setColor(0x01611F)


client.on('interactionCreate', async interaction => {
if (!interaction.isChatInputCommand()) return;

if (interaction.commandName === 'cheeseburger') {
await interaction.reply ({embeds: [chzburgEmbed], components:[chzburgButton]})

}
});

client.login(TOKEN);
24 replies
DIAdiscord.js - Imagine an app
Created by Epsilon on 10/1/2023 in #djs-questions
Buttons!
node bot.js
/home/runner/silos-bot-of-wonders/bot.js:15
.setCustomID("chzburgID")
^

TypeError: (intermediate value).setLabel(...).setStyle(...).setCustomID is not a function
at Object.<anonymous> (/home/runner/silos-bot-of-wonders/bot.js:15:3)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47

Node.js v18.16.1
exit status 1
node bot.js
/home/runner/silos-bot-of-wonders/bot.js:15
.setCustomID("chzburgID")
^

TypeError: (intermediate value).setLabel(...).setStyle(...).setCustomID is not a function
at Object.<anonymous> (/home/runner/silos-bot-of-wonders/bot.js:15:3)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47

Node.js v18.16.1
exit status 1
24 replies
DIAdiscord.js - Imagine an app
Created by Epsilon on 10/1/2023 in #djs-questions
Buttons!
node bot.js
/home/runner/silos-bot-of-wonders/bot.js:15
.customID("chzburgID")
^

TypeError: (intermediate value).setLabel(...).setStyle(...).customID is not a function
at Object.<anonymous> (/home/runner/silos-bot-of-wonders/bot.js:15:3)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47

Node.js v18.16.1
exit status 1
node bot.js
/home/runner/silos-bot-of-wonders/bot.js:15
.customID("chzburgID")
^

TypeError: (intermediate value).setLabel(...).setStyle(...).customID is not a function
at Object.<anonymous> (/home/runner/silos-bot-of-wonders/bot.js:15:3)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47

Node.js v18.16.1
exit status 1
24 replies
DIAdiscord.js - Imagine an app
Created by Epsilon on 10/1/2023 in #djs-questions
Buttons!
const { Client, GatewayIntentBits, EmbedBuilder, ActivityType, ActionRowBuilder, ButtonBuilder, ButtonStyle, Events, ModalBuilder, TextInputBuilder, TextInputStyle } = require('discord.js');
const client = new Client({ intents: [GatewayIntentBits.Guilds] });

const TOKEN = process.env['TOKEN']

client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);

client.user.setPresence({ activities: [{ name: 'over a ton of cheeseburgers.', type: ActivityType.Watching }], status: 'online' })

});
const chzburgButton = new ButtonBuilder()
.setLabel("Assemble cheeseburger!")
.setStyle(ButtonStyle.Primary)
.customID("chzburgID")

const chzburgEmbed = new EmbedBuilder()
.setTitle("Heres your cheeseburger!")
.setDescription("🍞\n 🥬\n 🧀\n 🥓\n 🥩\n 🍞")
.setColor(0x01611F)


client.on('interactionCreate', async interaction => {
if (!interaction.isChatInputCommand()) return;

if (interaction.commandName === 'cheeseburger') {
await interaction.reply ({embeds: [chzburgEmbed], components:[chzburgButton]})

}
});

client.login(TOKEN);
const { Client, GatewayIntentBits, EmbedBuilder, ActivityType, ActionRowBuilder, ButtonBuilder, ButtonStyle, Events, ModalBuilder, TextInputBuilder, TextInputStyle } = require('discord.js');
const client = new Client({ intents: [GatewayIntentBits.Guilds] });

const TOKEN = process.env['TOKEN']

client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);

client.user.setPresence({ activities: [{ name: 'over a ton of cheeseburgers.', type: ActivityType.Watching }], status: 'online' })

});
const chzburgButton = new ButtonBuilder()
.setLabel("Assemble cheeseburger!")
.setStyle(ButtonStyle.Primary)
.customID("chzburgID")

const chzburgEmbed = new EmbedBuilder()
.setTitle("Heres your cheeseburger!")
.setDescription("🍞\n 🥬\n 🧀\n 🥓\n 🥩\n 🍞")
.setColor(0x01611F)


client.on('interactionCreate', async interaction => {
if (!interaction.isChatInputCommand()) return;

if (interaction.commandName === 'cheeseburger') {
await interaction.reply ({embeds: [chzburgEmbed], components:[chzburgButton]})

}
});

client.login(TOKEN);
24 replies
DIAdiscord.js - Imagine an app
Created by Epsilon on 10/1/2023 in #djs-questions
Buttons!
Type error when I add it in.
24 replies
DIAdiscord.js - Imagine an app
Created by Epsilon on 10/1/2023 in #djs-questions
Buttons!
Needed to chop some bits off for message length.
24 replies
DIAdiscord.js - Imagine an app
Created by Epsilon on 10/1/2023 in #djs-questions
Buttons!
node:events:491
throw er; // Unhandled 'error' event
^

DiscordAPIError[50035]: Invalid Form Body
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:394:10)
at process.processTicksAndRejections (node:internal/process/task_queues:84:21) {
requestBody: {
files: [],
json: {
type: 4,
data: {
content: undefined,
tts: false,
nonce: undefined,
embeds: [
{
title: 'Heres your cheeseburger!',
description: '🍞\n 🥬\n 🧀\n 🥓\n 🥩\n 🍞',
color: 90399
}
],
components: [
{
type: 2,
emoji: undefined,
label: 'Assemble cheeseburger!',
style: 1
}
],
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: undefined,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined,
thread_name: undefined
}
}
},
rawError: {
message: 'Invalid Form Body',
code: 50035,
errors: {
data: { components: { '0': { custom_id: [Object] } } }
}
},
code: 50035,
status: 400,
method: 'POST',
url: ''
}

Node.js v18.16.1
exit status 1
node:events:491
throw er; // Unhandled 'error' event
^

DiscordAPIError[50035]: Invalid Form Body
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:394:10)
at process.processTicksAndRejections (node:internal/process/task_queues:84:21) {
requestBody: {
files: [],
json: {
type: 4,
data: {
content: undefined,
tts: false,
nonce: undefined,
embeds: [
{
title: 'Heres your cheeseburger!',
description: '🍞\n 🥬\n 🧀\n 🥓\n 🥩\n 🍞',
color: 90399
}
],
components: [
{
type: 2,
emoji: undefined,
label: 'Assemble cheeseburger!',
style: 1
}
],
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: undefined,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined,
thread_name: undefined
}
}
},
rawError: {
message: 'Invalid Form Body',
code: 50035,
errors: {
data: { components: { '0': { custom_id: [Object] } } }
}
},
code: 50035,
status: 400,
method: 'POST',
url: ''
}

Node.js v18.16.1
exit status 1
24 replies
DIAdiscord.js - Imagine an app
Created by Epsilon on 10/1/2023 in #djs-questions
How to end this argument string? (and how to make the code.. work?)
Thanks a ton!
12 replies
DIAdiscord.js - Imagine an app
Created by Epsilon on 10/1/2023 in #djs-questions
How to end this argument string? (and how to make the code.. work?)
Brand new to discord.js and javascript.
12 replies
DIAdiscord.js - Imagine an app
Created by Epsilon on 10/1/2023 in #djs-questions
How to end this argument string? (and how to make the code.. work?)
Thanks.
12 replies
DIAdiscord.js - Imagine an app
Created by Epsilon on 10/1/2023 in #djs-questions
How to end this argument string? (and how to make the code.. work?)
Oh.
12 replies
DIAdiscord.js - Imagine an app
Created by Epsilon on 10/1/2023 in #djs-questions
How to end this argument string? (and how to make the code.. work?)
No description
12 replies
DIAdiscord.js - Imagine an app
Created by Epsilon on 10/1/2023 in #djs-questions
How to end this argument string? (and how to make the code.. work?)
No description
12 replies
DIAdiscord.js - Imagine an app
Created by Epsilon on 10/1/2023 in #djs-questions
How to end this argument string? (and how to make the code.. work?)
Hmm.
12 replies