dragonn
dragonn
DIAdiscord.js - Imagine an app
Created by dragonn on 9/16/2023 in #djs-questions
Getting this error a lot on my self host PC
node:internal/process/promises:288 triggerUncaughtException(err, true /* fromPromise */); ^ ConnectTimeoutError: Connect Timeout Error at onConnectTimeout (/home/hk/Disc/dbot.js/dbjs/dbjs/node_modules/undici/lib/core/connect.js:182:24) at /home/hk/Disc/dbot.js/dbjs/dbjs/node_modules/undici/lib/core/connect.js:129:46 at Immediate._onImmediate (/home/hk/Disc/dbot.js/dbjs/dbjs/node_modules/undici/lib/core/connect.js:170:9) at process.processImmediate (node:internal/timers:476:21) { code: 'UND_ERR_CONNECT_TIMEOUT' } idk how to mitigate it
13 replies
DIAdiscord.js - Imagine an app
Created by dragonn on 9/14/2023 in #djs-questions
webhooks again
Hello dear fellow helpers... i would like to ask another question related to it Context A while back I learnt about webhooks and their usage thanks to yall... I had already tried using internet but without the proper implementation and understanding...which became possible thanks to djs community and bots I was able to understand the underlying concept... Previous webhooks convo The concepts i learnt were - Webhooks are given by d.js api for discord interface - You can only send messages to discord but not the opposite (like sending discord messages to another app) Problem This time it is a bit technical and practical... I am running the bot on self host... by due to some unphortunate events...some instances of bot just crashes due to timeout error while others keep working as intended... idk what is the reason of their failure but it caused me some lost db updates... for instance my Xp system crashed due to it and i lost the progress of peeps who Interacted with the bot previously as well as the conversations happened during that time... Mitigation To mitigate this problem I have few other solutions but idk how to implement them or if they are even possible * hosting it on a vps or other commercial hosts thats a NO due to some privacy and development reasons * running another instance of a different bot that will run as backup for the 1st one and synchronise it when one of them gets available * using something as reverse webhooks to log events that happened when the bot was offline so i could update the bot... even tho the time has passed the events would be updated and hence will show the results...after it will come online.. * Logging is another different thing and something that is not related to what i want
17 replies
DIAdiscord.js - Imagine an app
Created by dragonn on 9/11/2023 in #djs-questions
Webhooks
I want to ask what are webhooks...? what is their purpose with djs and outside...? what can webhooks do and their limitations...? can discord webhooks only send messages...? Is there a way i can use webhooks to connect to some other website/app...like making my own app and getting discord messages on my app than on this interface or it is seemingly not possible at all... how is it done then? Tell me like i know nothing about them...
37 replies