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
4 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Lipton
LiptonOP2y ago
could i perhaps check for whether an user has already triggered the exact same application? i guess i could also add a cooldown but idk that doesnt seem optimal to me i already do that the bot wont let you submit a new applicaiton of the same type if it has a record of you submitting it before the problem here is: how do i prevent someone from starting multiple application processes all at once when they have not applied before - thus when there is no record of their applications to refer to yet what is/are modals? oh nevermind i see from what i can see the amount of questions you may ask someone through a modal is limited to 5 the program i made will ask as much is provided you know it would all be much simpler if djs had a way to close a DM channel between a user and a bot its only logical that if you can open a channel - you should also be able to close it
d.js docs
d.js docs2y ago
method DMChannel#delete() Deletes this channel.
Lipton
LiptonOP2y ago
oh someone here told me there is no way no reddit karma for them i guess lol thanks idk from what i recall someone said that you cannot close a DM channel between a bot and a user once you open it anyway my problem has been solved thanks a lot : - )
Want results from more Discord servers?
Add your server