Lipton
Lipton
DIAdiscord.js - Imagine an app
Created by Lipton on 7/17/2023 in #djs-questions
extremeley weird issue with closing DM's between bot and user
I've been trying to solve this for the past 3 days catuncanny 1. I have a function which makes the bot question the user on DM's 2. In order to prevent having users be questioned about 2 things at once, the function checks for an open DM channel with the user before starting, and also closes the channel with channel.delete() once the questioning process is done 3. I have 2 commands that use this function 4. Command A executes 100% properly 5. Although when i execute command B first, and then try executing A, the function will not fire even though it should have closed the previous DM channel
37 replies
DIAdiscord.js - Imagine an app
Created by Lipton on 3/29/2023 in #djs-questions
closing a DM channel between bot and user
I guess that some context will be in handy here: i have an application bot that goes into peoples DM's, asks them questions and collects the responses. But how may i code it so it doesnt allow the user to trigger an application process twice, resulting in the bot asking them the same questions twice? currently im checking whether a DM channel between the user and the bot exists and if it does - the bot wont let user trigger a new application. The downside here is that if user applies once - he wont be able to trigger another application since technicially a dm between them and the bot already exists
22 replies
DIAdiscord.js - Imagine an app
Created by Lipton on 3/28/2023 in #djs-questions
passing more arguments to slash commands
so how can I make slash commands execute with more parameters than just client? Im using the command and event handler from the discord.js guide and i think i have to change something with the
for (const file of eventFiles) {
const filePath = path.join(eventsPath, file);
const event = require(filePath);
if (event.once) {
client.once(event.name, (...args) => event.execute(...args));
} else {
client.on(event.name, (...args) => event.execute(...args));
}
}
for (const file of eventFiles) {
const filePath = path.join(eventsPath, file);
const event = require(filePath);
if (event.once) {
client.once(event.name, (...args) => event.execute(...args));
} else {
client.on(event.name, (...args) => event.execute(...args));
}
}
part of the code, although trying to add and pass new arguments before ...args resulted in, i assume, the program not being able to acknowledge ...args any help is immensely appreciated
2 replies
DIAdiscord.js - Imagine an app
Created by Lipton on 12/27/2022 in #djs-questions
when will discord.js stop supporting bots that do not use slash-commands?
title^
12 replies