Strange error 10 min after running command?

https://gist.github.com/DudeThatsErin/21e9fc7bce56dade272fd4b10a783697 I was able to get the suggestion to add to the DB but now when I try to mark a suggestion as completed, it times out. No errors in console. I'm not sure where it is having the issue as nothing seems to happen BUT it does get updated in the DB when I look at the DB. So, the update is happening but nothing gets sent and the thread doesn't get locked or anything. Error: https://gist.github.com/DudeThatsErin/dbfdba65ae363a280427d629b46c4bed
20 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
MrMythical
MrMythical2y ago
you are importing a module that isn't installed this is not discord.js related #useful-servers <#869652447881207858>
Erin
ErinOP2y ago
Sorry that was the wrong error I updated The error I added is DJS related
d.js docs
d.js docs2y ago
Fetching members can time out on large guilds, as they arrive in chunks through the websocket connections. • You can specify the time option in FetchMembersOptions to specify how long you want to wait. • Make sure you have the required GuildMembers gateway intent enabled
Erin
ErinOP2y ago
So you are saying this is the thing timing out? const aut = await interaction.guild.members.fetch(OGauthor);
MrMythical
MrMythical2y ago
most likely OGAuthor must not be what you think
Erin
ErinOP2y ago
It is the author's ID. I'm looking at it in the database
MrMythical
MrMythical2y ago
but what about in your code
Erin
ErinOP2y ago
I don't know what you mean?
MrMythical
MrMythical2y ago
OGauthor log it
Erin
ErinOP2y ago
That fixed my issue. Now it isn't locking the thread though.
const thread = channel.threads.cache.find(x => x.name === `Suggestion ${suggNo}`); //works
await thread.setLocked(true);
const thread = channel.threads.cache.find(x => x.name === `Suggestion ${suggNo}`); //works
await thread.setLocked(true);
It finds it, tested it by logging it but no errors in console (yet) and embed updated but this is the only thing that didn't happen.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Erin
ErinOP2y ago
So setClosed?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Erin
ErinOP2y ago
I didn’t see that on the guide
Erin
ErinOP2y ago
discord.js Guide
Imagine a guide... that explores the many possibilities for your discord.js bot.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Erin
ErinOP2y ago
It does. But threads aren’t locking
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Erin
ErinOP2y ago
How? Did you read above? It isn’t in the guide I understand it is Close & Lock but I don’t know the code to close a thread. setClosed doesn’t appear to be a thing Close = archive? Then why do they use both? Discord is annoying Lol Confusing for no reason Alright Ty!
Want results from more Discord servers?
Add your server