kute
kute
DIAdiscord.js - Imagine an app
Created by kute on 2/21/2024 in #djs-questions
Can't fetch correctly
i guess its because the response time or sum related to that
16 replies
DIAdiscord.js - Imagine an app
Created by kute on 2/21/2024 in #djs-questions
Can't fetch correctly
i know rn its not safe, but currently only i can use it
16 replies
DIAdiscord.js - Imagine an app
Created by kute on 2/21/2024 in #djs-questions
Can't fetch correctly
ill add a check later, dw
16 replies
DIAdiscord.js - Imagine an app
Created by kute on 2/21/2024 in #djs-questions
Can't fetch correctly
the code works when not applied to the bot
16 replies
DIAdiscord.js - Imagine an app
Created by kute on 2/21/2024 in #djs-questions
Can't fetch correctly
lol
16 replies
DIAdiscord.js - Imagine an app
Created by kute on 2/21/2024 in #djs-questions
Can't fetch correctly
?
16 replies
DIAdiscord.js - Imagine an app
Created by kute on 2/21/2024 in #djs-questions
Can't fetch correctly
it is discord.js
16 replies
DIAdiscord.js - Imagine an app
Created by kute on 2/21/2024 in #djs-questions
Can't fetch correctly
client.on('interactionCreate', async interaction => {
if(!interaction.isChatInputCommand()){ return; }
if(interaction.commandName == 'cart'){
const fetchResult = interaction.options.getString('fetch')
const amountResult = interaction.options.getString('amount')
interaction.reply('Adding to the cart... Please wait')
switch(amountResult) {
case '1.000':
loadCart('9NRFP18VHR2F', fetchResult)
sleep(5000)
loadCart('9N6LNP106BP3', fetchResult)
console.log('> works')
break;
client.on('interactionCreate', async interaction => {
if(!interaction.isChatInputCommand()){ return; }
if(interaction.commandName == 'cart'){
const fetchResult = interaction.options.getString('fetch')
const amountResult = interaction.options.getString('amount')
interaction.reply('Adding to the cart... Please wait')
switch(amountResult) {
case '1.000':
loadCart('9NRFP18VHR2F', fetchResult)
sleep(5000)
loadCart('9N6LNP106BP3', fetchResult)
console.log('> works')
break;
16 replies
DIAdiscord.js - Imagine an app
Created by kute on 2/21/2024 in #djs-questions
Can't fetch correctly
function loadCart(id, code){
var regex = /\b[A-Z0-9]{12}\b/;
try{ r = eval(code.replace(regex, id)); console.log(r) }
catch(err) { console.log(err) }
}
function loadCart(id, code){
var regex = /\b[A-Z0-9]{12}\b/;
try{ r = eval(code.replace(regex, id)); console.log(r) }
catch(err) { console.log(err) }
}
16 replies
DIAdiscord.js - Imagine an app
Created by kute on 2/21/2024 in #djs-questions
Can't fetch correctly
it used to work before adding to the bot
16 replies