Swyftey
Explore posts from serversDIAdiscord.js - Imagine an app
•Created by Swyftey on 11/17/2024 in #djs-questions
What is the best way to detect a change in server ownership when the bot happens to be offline?
Hi,
I am using Discord.JS and am trying to figure out how I might change a server in my database's owner_id field when the owner id is found to be different.
Here is an example:
If there isn't a way around this to changing the owner_id, what should I do? I'd rather a user who once owned a server (which is added to my database) not have access to it if they are no longer the owner.
12 replies
DIAdiscord.js - Imagine an app
•Created by Swyftey on 11/2/2024 in #djs-questions
What is the best way to handle components when they've been timed out?
Hi,
I'm sorry, I've probably asked this question a long time ago but have forgotten the answer as it has been a minute.
What is the best way to go about timing buttons/components out? For example, a 60-second collector is started when a command is ran. When the 60 seconds are up, the buttons either disable or (what I'd prefer) have a different custom ID so that an error reply shows if the ID says the button is disabled.
Also, what should be done (if anything) for when let's say the bot goes offline during the time a collector is running, how does the button disable/become timed out then?
Thanks for any help.
5 replies
DIAdiscord.js - Imagine an app
•Created by Swyftey on 10/30/2024 in #djs-questions
Embed Builder Not Defined When Using BroadcastEval
53 replies
DIAdiscord.js - Imagine an app
•Created by Swyftey on 10/24/2024 in #djs-questions
Discord slash command(s) deleting itself. (Sorry closed last post too early)
53 replies
DIAdiscord.js - Imagine an app
•Created by Swyftey on 10/24/2024 in #djs-questions
Why might a slash command delete itself after one use?
19 replies
DIAdiscord.js - Imagine an app
•Created by Swyftey on 10/20/2024 in #djs-questions
Sharding questions.
Hi.
I am building a Discord bot which I can anticipate will eventually be in more than 2500 guilds pretty quick.
I have a few questions about sharding which I am looking to have answered, any help is greatly appreciated:
1. Is it best to prepare and set up sharding for the bot now while I can?
2. Once the sharding manager is created, do I have to go back into my code (such as commands) and change it to work with all shards? Or does that depend on if the command should affect other guilds, for example?
3. What are the main use cases for using commands such as
.broadcastEval()
to communicate to all shards?
Thanks!33 replies
CDCloudflare Developers
•Created by Swyftey on 10/13/2024 in #general-help
CF-Connecting-IP header is missing?
Hi.
I need this header for the IP so that I can secure my Cloudflare worker. Why might I not be seeing this header?
If it helps, I am using nginx proxy manager to host.
The transform setting to remove the header is already disabled.
41 replies
Deno 2.0 displaying red-line errors in my typescript code, but they were non-breaking?
Hi!
I'd like to use Deno for the integrated TypeScript and other useful features, but I had enough of the program (I think it was the vscode extension) showing some of my code as a deno-ts error when the project would run fine.
It's been really weird because I'll try to fix the error, and whether I fix it or not, the red line ends up going away on its own eventually. It's been very iffy.
Also, some types from my needed npm modules do not exist as they do in node.js, how can I solve that?
How can I fix this so I can possibly go back to using deno?
2 replies
CDCloudflare Developers
•Created by Swyftey on 7/29/2024 in #pages-help
I'm in a 'redirect loop' trying to use page domain with nginx.
1 replies
DIAdiscord.js - Imagine an app
•Created by Swyftey on 7/8/2024 in #djs-questions
Can the REST class be used to work with global rate limits (make sure you don't throttle)?
3 replies
DIAdiscord.js - Imagine an app
•Created by Swyftey on 7/8/2024 in #djs-questions
How can I make sure slash commands are only added/registered once?
I was adding and removing my bot from my server once for testing purposes and recently ran into the "Interaction already acknowledged" error.
I fixed it by once again re-adding my bot, but how can I prevent slash commands from being added if they already exist or just prevent this in general?
11 replies
DIAdiscord.js - Imagine an app
•Created by Swyftey on 6/18/2024 in #djs-questions
Just double checking to be extra sure: Do ALL DiscordJS fetch methods check the cache first?
I'm trying to understand if I should still make my own cache module, or if I can (or if it is *okay * to) trust that the cache will be called first before attempting to use discord's API.
For example, just calling
guild.fetchWebhooks()
upon an event that is fired, or checking my own cache module to see if the webhook is found before calling that.3 replies
DIAdiscord.js - Imagine an app
•Created by Swyftey on 6/12/2024 in #djs-questions
Does DiscordJS support activities/activity creation? If not, will it in the future?
Title displays question.
Sorry if this is regularly asked, couldn't find.
10 replies
DIAdiscord.js - Imagine an app
•Created by Swyftey on 6/3/2024 in #djs-questions
Role Select Menu not clearing/refreshing?
I swear it was working before. The input will not clear.
Once the "next-button" is clicked, the message should update and the select menu should not display the previous inputs. The page number is correct and the data to set/display for the role select menu is correct as well.
6 replies
DIAdiscord.js - Imagine an app
•Created by Swyftey on 5/30/2024 in #djs-questions
Is it possible to check if component timed out AFTER it has timed out?
For example, when a message is sent with a select-menu component:
18 replies
DIAdiscord.js - Imagine an app
•Created by Swyftey on 5/29/2024 in #djs-questions
Client.Users.Fetch(UserId) erroring, stating UserId is null when it is not.
2 replies