aa battery
aa battery
Explore posts from servers
CC#
Created by aa battery on 11/2/2023 in #help
❔ Just got started with leetcode after a year of learning, I need some help...
and ig the array copy made it even more complicated idk
25 replies
CC#
Created by aa battery on 11/2/2023 in #help
❔ Just got started with leetcode after a year of learning, I need some help...
i think i over complicated it by using a foreach which made me use indexof
25 replies
CC#
Created by aa battery on 11/2/2023 in #help
❔ Just got started with leetcode after a year of learning, I need some help...
oh i see
25 replies
DIAdiscord.js - Imagine a boo! πŸ‘»
Created by aa battery on 9/16/2023 in #djs-questions
Cannot edit interaction after modal input
as well as that so thank u very much
52 replies
DIAdiscord.js - Imagine a boo! πŸ‘»
Created by aa battery on 9/16/2023 in #djs-questions
Cannot edit interaction after modal input
in the end it was some problems with the classes for embeds i was using
52 replies
DIAdiscord.js - Imagine a boo! πŸ‘»
Created by aa battery on 9/16/2023 in #djs-questions
Cannot edit interaction after modal input
im so sorry
52 replies
DIAdiscord.js - Imagine a boo! πŸ‘»
Created by aa battery on 9/16/2023 in #djs-questions
Cannot edit interaction after modal input
omg i did not realise that
52 replies
DIAdiscord.js - Imagine a boo! πŸ‘»
Created by aa battery on 9/16/2023 in #djs-questions
Cannot edit interaction after modal input
OH RIGHT
52 replies
DIAdiscord.js - Imagine a boo! πŸ‘»
Created by aa battery on 9/16/2023 in #djs-questions
Cannot edit interaction after modal input
but then i cant modify a const....
52 replies
DIAdiscord.js - Imagine a boo! πŸ‘»
Created by aa battery on 9/16/2023 in #djs-questions
Cannot edit interaction after modal input
No description
52 replies
DIAdiscord.js - Imagine a boo! πŸ‘»
Created by aa battery on 9/16/2023 in #djs-questions
Cannot edit interaction after modal input
No description
52 replies
DIAdiscord.js - Imagine a boo! πŸ‘»
Created by aa battery on 9/16/2023 in #djs-questions
Cannot edit interaction after modal input
No description
52 replies
DIAdiscord.js - Imagine a boo! πŸ‘»
Created by aa battery on 9/16/2023 in #djs-questions
Cannot edit interaction after modal input
alright wait a min
52 replies
DIAdiscord.js - Imagine a boo! πŸ‘»
Created by aa battery on 9/16/2023 in #djs-questions
Cannot edit interaction after modal input
but same thing happens anyway
52 replies
DIAdiscord.js - Imagine a boo! πŸ‘»
Created by aa battery on 9/16/2023 in #djs-questions
Cannot edit interaction after modal input
oh wait that was supposd to be updateMessage i changed that to uh test some stuff
52 replies
DIAdiscord.js - Imagine a boo! πŸ‘»
Created by aa battery on 9/16/2023 in #djs-questions
Cannot edit interaction after modal input
no thats where i handled the submission this is the modal sending part
if (interaction.data.custom_id === "cookieButton") {
await api.interactions.createModal(interaction.id, interaction.token, loginEmbeds.cookieModal);
}
if (interaction.data.custom_id === "cookieButton") {
await api.interactions.createModal(interaction.id, interaction.token, loginEmbeds.cookieModal);
}
52 replies
DIAdiscord.js - Imagine a boo! πŸ‘»
Created by aa battery on 9/16/2023 in #djs-questions
Cannot edit interaction after modal input
i see, so what should i do?
52 replies
DIAdiscord.js - Imagine a boo! πŸ‘»
Created by aa battery on 9/16/2023 in #djs-questions
Cannot edit interaction after modal input
async runModal(interaction, api) {
if (interaction.data.custom_id === "cookieMenu") {
const AMERICA = new StringSelectMenuOptionBuilder({ label: "American server", value: "1", emoji: { id: undefined, name: "πŸ‡ΊπŸ‡Έ" } });
const EUROPE = new StringSelectMenuOptionBuilder({ label: "Europian server", value: "2", emoji: { id: undefined, name: "πŸ‡ͺπŸ‡Ί" } });
const ASIA = new StringSelectMenuOptionBuilder({ label: "Asian server", value: "3", emoji: { id: undefined, name: "🏳️" } });
const CHT = new StringSelectMenuOptionBuilder({ label: "HW/TW/MO server", value: "4", emoji: { id: undefined, name: "πŸ‘Ž" } });

const cookieString = interaction.data.components[0].components[0].value;

const uids = await initialiser.getUids(cookieString);

if (uids.length > 1) {
var selectActionRow = loginEmbeds.serverField;
for (const item of uids) {
switch (item.region) {
case "os_usa":
selectActionRow.components[0].addOptions(AMERICA);
break;
case "os_euro":
selectActionRow.components[0].addOptions(EUROPE);
break;
case "os_asia":
selectActionRow.components[0].addOptions(ASIA);
break;
case "os_cht":
selectActionRow.components[0].addOptions(CHT);
}
}
await api.interactions.reply(interaction.id, interaction.token, { content: "", embeds: [loginEmbeds.moreThanOneUid], components: [selectActionRow]});
return;
}
async runModal(interaction, api) {
if (interaction.data.custom_id === "cookieMenu") {
const AMERICA = new StringSelectMenuOptionBuilder({ label: "American server", value: "1", emoji: { id: undefined, name: "πŸ‡ΊπŸ‡Έ" } });
const EUROPE = new StringSelectMenuOptionBuilder({ label: "Europian server", value: "2", emoji: { id: undefined, name: "πŸ‡ͺπŸ‡Ί" } });
const ASIA = new StringSelectMenuOptionBuilder({ label: "Asian server", value: "3", emoji: { id: undefined, name: "🏳️" } });
const CHT = new StringSelectMenuOptionBuilder({ label: "HW/TW/MO server", value: "4", emoji: { id: undefined, name: "πŸ‘Ž" } });

const cookieString = interaction.data.components[0].components[0].value;

const uids = await initialiser.getUids(cookieString);

if (uids.length > 1) {
var selectActionRow = loginEmbeds.serverField;
for (const item of uids) {
switch (item.region) {
case "os_usa":
selectActionRow.components[0].addOptions(AMERICA);
break;
case "os_euro":
selectActionRow.components[0].addOptions(EUROPE);
break;
case "os_asia":
selectActionRow.components[0].addOptions(ASIA);
break;
case "os_cht":
selectActionRow.components[0].addOptions(CHT);
}
}
await api.interactions.reply(interaction.id, interaction.token, { content: "", embeds: [loginEmbeds.moreThanOneUid], components: [selectActionRow]});
return;
}
the important stuff is at the end
52 replies
DIAdiscord.js - Imagine a boo! πŸ‘»
Created by aa battery on 9/16/2023 in #djs-questions
Cannot edit interaction after modal input
so basically i use followUp() instead?
52 replies
DIAdiscord.js - Imagine a boo! πŸ‘»
Created by aa battery on 9/16/2023 in #djs-questions
Cannot edit interaction after modal input
No description
52 replies