You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The setRemainingTimeBeforeBloodMoon function is called within a setInterval in the Discord.js bot code. This function is responsible for updating the name of a category channel with the remaining time before a blood moon event. However, it appears that the setName method used inside this function does not consistently resolve or reject promises.
Note: The setInterval in the index.js file repeatedly calls the updateCategoryName function, which in turn calls the setRemainingTimeBeforeBloodMoon function. The inconsistent behavior of the setName method inside setRemainingTimeBeforeBloodMoon leads to occasional failures in updating the category name. This issue may be related to API limitations or other factors.
Please let me know if there are any additional details needed to address this issue effectively.
Code sample
// ... (other code)module.exports=async(client,days)=>{console.log("Is function called");constremainingTimeCategory=awaitclient.channels.fetch(remaining_time_before_BM);constname=time_display_channel_prefix+days+time_display_channel_suffix;// The problematic part - setName method does not consistently resolve or reject promises.remainingTimeCategory.setName(name).then(()=>{console.log("Remaining Time category name updated successfully.");}).catch((err)=>{log(err);console.log("Error updating Remaining Time category name");});}
Versions
Node.js version: 20.5.0
Discord.js version: 12.5.3
Operating System: Windows
Issue priority
Medium (should be fixed soon)
Which partials do you have configured?
Not applicable
Which gateway intents are you subscribing to?
Guilds
I have tested this issue on a development release
No response
The text was updated successfully, but these errors were encountered:
Which package is this bug report for?
discord.js
Issue description
The
setRemainingTimeBeforeBloodMoon
function is called within asetInterval
in the Discord.js bot code. This function is responsible for updating the name of a category channel with the remaining time before a blood moon event. However, it appears that thesetName
method used inside this function does not consistently resolve or reject promises.Note: The
setInterval
in theindex.js
file repeatedly calls theupdateCategoryName
function, which in turn calls thesetRemainingTimeBeforeBloodMoon
function. The inconsistent behavior of thesetName
method insidesetRemainingTimeBeforeBloodMoon
leads to occasional failures in updating the category name. This issue may be related to API limitations or other factors.Please let me know if there are any additional details needed to address this issue effectively.
Code sample
Versions
Issue priority
Medium (should be fixed soon)
Which partials do you have configured?
Not applicable
Which gateway intents are you subscribing to?
Guilds
I have tested this issue on a development release
No response
The text was updated successfully, but these errors were encountered: