Kiɾʌ Kenjiɾø
Explore posts from serversDIAdiscord.js - Imagine an app
•Created by Kiɾʌ Kenjiɾø on 5/10/2024 in #djs-questions
Odd issue with client not being detected.
So I'm running into an issue with a function I made to check the permission of a user in a guild. It says the client is undefined in the permissionHandler.js
I'm really not sure why it's happening as it's just been working in other files. (P.s. Github is down for me to idk why I can't up it to a repo)
11 replies
DIAdiscord.js - Imagine an app
•Created by Kiɾʌ Kenjiɾø on 1/28/2024 in #djs-questions
Value undefined after SQL database initiation
I may be going crazy, But joinMessage.id is undefined anywhere after I open the database. Anyone whose fucked around with sql Is there some reason thats happening?
7 replies
DIAdiscord.js - Imagine an app
•Created by Kiɾʌ Kenjiɾø on 1/4/2024 in #djs-questions
Interaction already deferred.
https://github.com/KiraKenjiro/bot
The bot at the moment works almost perfectly. qj's been a saviour and helped me with it but i am struggling with once thing. as the model embed is sent, (via clicking on the modalsEmbed button that was sent in the embed command) there is a 5 minute timer that is started. After 5 minutes has elapsed, if the user hasn’t filled in the consent form (checked by ckecing if there is a value in the consent field in the (i think) accounts table).
(at the moment it's set to i think 45 seconds just for testing. e.g. 0.45 * 60 * 1000)
But when the timer elapsed I got this error. (Provided half log)
I think... It's talking about this section of code from lines 81 to 89 in the file modalsEmbed.js
(There is an issue where i forgot to update it with the right description but, you get the idea it would update it to something like, oops, form timed out)
I'm not entirely too sure whats happening but it may be due to the embed being sent at 102 to 106 as, i have a slight feeling thats the interaction i want to update and im trying to update the interaction before. This is just a guess but i'd love a second opinion on this <3
--- Edit: I'm pretty sure im trying to edit the interaction before the interaction i want to edit. not too sure if thats worded right but alas
6 replies
DIAdiscord.js - Imagine an app
•Created by Kiɾʌ Kenjiɾø on 12/31/2023 in #djs-questions
Editing button to be enabled after user completed modal.
Essentially, I have an embedded message featuring three buttons, with two of them currently in a disabled state. When the user completes the first modal, my aim is to activate the second button, deactivate the first button, and, concurrently, upon completion of the second form, enable the consent button while disabling the second button. I don't know if this would be possible due to the interaction timing out but i'd appreciate a second eye. (Yes i am aware that my token is in this repo, As a matter of fact, Idc i'll just reset it.)
https://github.com/KiraKenjiro/TempRepo
10 replies
DIAdiscord.js - Imagine an app
•Created by Kiɾʌ Kenjiɾø on 12/29/2023 in #djs-questions
Query about Modals
Quick query, I'm using the short style in modals to collect demographic data and I'm not too sure where it is but.
I'm getting this error
Do short style modals have a set length value?
I'll provide my code if needed but to keep the chat clean i'll upload it as a txt document
17 replies
DIAdiscord.js - Imagine an app
•Created by Kiɾʌ Kenjiɾø on 12/24/2023 in #djs-questions
Adding SubCommand to commands.
I'm using this snippet to load my slash commands.
Here is an example of a command in that ./command file
How would i add a SubCommand and other arguments to that command? I can't figure it out 💜
Also feel free to ping me! :D
8 replies
DIAdiscord.js - Imagine an app
•Created by Kiɾʌ Kenjiɾø on 12/5/2023 in #djs-questions
Support with using client in separate files.
15 replies
DIAdiscord.js - Imagine an app
•Created by Kiɾʌ Kenjiɾø on 11/16/2023 in #djs-questions
Waiting for user message in DM.
I've been trying to get the bot to wait for a message but it keeps logging this error
Here is my code.
I'd love a few pointers of where im going wrong <3
15 replies
DIAdiscord.js - Imagine an app
•Created by Kiɾʌ Kenjiɾø on 10/31/2023 in #djs-questions
TypeError: fs.existsSync is not a function
Could anyone help me with this, I'm a little confused about why it's not working but.
There is the full error, In vieCaptcha.js is this line
Here’s the Git of the full repo. But i just can't figure out why it's not working.
https://github.com/KiraKenjiro/Temp
3 replies
DIAdiscord.js - Imagine an app
•Created by Kiɾʌ Kenjiɾø on 10/28/2023 in #djs-questions
Removing last embed.
So i've got this lil snippet from my bot. What it does is it requests a png image of a captcha code to be made then the function will reply with the image location. It sends an embed empheral and so on.
I wanted it so that there can only be one active captcha image per user. And hey ho! It works, Untill i realised that the bot will just.. carry on making embed messages without removing the old ones... I have a lastEphemeralMessageID var, But. I'm not too sure if my code is right as, It's not removing the old ones, And it's just returning an error message so, Just came for some help! xD
5 replies
DIAdiscord.js - Imagine an app
•Created by Kiɾʌ Kenjiɾø on 10/27/2023 in #djs-questions
Program can't locate file.
55 replies
DIAdiscord.js - Imagine an app
•Created by Kiɾʌ Kenjiɾø on 10/27/2023 in #djs-questions
Attaching local file in embed.
So i'm using this code.
The variable captcha.filePath like its name hold the file path to a png image.
When the button is clicked this error is passed.
Could someone advice me on what i'm doing wrong, Does the .setImage only take URL/URIs?
10 replies
DIAdiscord.js - Imagine an app
•Created by Kiɾʌ Kenjiɾø on 10/22/2023 in #djs-questions
API not returning data
https://gist.github.com/KiraKenjiro/de1460359c1b33dc5f2d55763eae95a2
Inside the Gist, there's a bot that retrieves user information based on their ID. The bot command is functional, so if you use "!info {userid}" in a chat, it will provide you with all the relevant information. However, when I attempt to request the API, it doesn't return any data.
Data returned by command:
Data returned by API:
Can anyone help or run your eyes over this to see if i'm doing anything wrong, I can't unpick it xD
20 replies
DIAdiscord.js - Imagine an app
•Created by Kiɾʌ Kenjiɾø on 10/22/2023 in #djs-questions
Getting Banner URL
GIST: https://gist.github.com/KiraKenjiro/de1460359c1b33dc5f2d55763eae95a2
That code returns this value,
Is there something i'm doing wrong to get the banner?
10 replies
DIAdiscord.js - Imagine an app
•Created by Kiɾʌ Kenjiɾø on 8/30/2023 in #djs-questions
Accessing handle functions globally.
I've been working on creating a Discord boilerplate for myself. One of my goals was to develop a handler function capable of producing a captcha SVG file. This function would not only return the file's location but also the content of the captcha. This could be used for verification and other similar tasks.
However, I've discovered a limitation: the handler function can only be used within the index.js file. It seems that this restriction is due to how I've set up the handler registration process in the index.js file. You can find the progress of my boilerplate in this GitHub repository: Github Repo
Here's the code snippet where I register the handlers:
This registration method limits the usage of handler functions. For instance, I'm able to use the GenerateCaptcha function from generateCaptchaHandler.js in the main.js file. However, I'm unable to employ it in a command.js file due to the registration constraints.
I'm a bit uncertain about the approach to enable the handler files for usage throughout the entire program structure. If there are any suggestions or ideas from anyone, I would greatly appreciate the assistance.
11 replies