Marcus Natrielli
DIAdiscord.js - Imagine an app
•Created by Marcus Natrielli on 7/31/2024 in #djs-questions
How to get Client object from a Shard?
I need to process some async data. So I'm not rellying on discord.js events like message create, but something like and webhook that commmunicates with my bot
I'm using shards, so when I receive the async data, I need to redirect it to the shard that has the proper guild/member info that I need fetched
So, how can I get a Client object of a shard using my ShardManager? Because, with the Client, I can try to perform a search for the data I need
6 replies
DIAdiscord.js - Imagine an app
•Created by Marcus Natrielli on 5/21/2023 in #djs-questions
Update message with images using discord.js REST
I'm trying to add images to a message using discord.js/REST V10, but without success
My code:
I'm can patch the webhook message to change embeds, components and other stuff. But I still can't add files like images to it
Maybe I'm doing it wrong?
15 replies
DIAdiscord.js - Imagine an app
•Created by Marcus Natrielli on 12/9/2022 in #djs-questions
How to debug bot disconnect
Hi, so
I'm hosting a bot using Oracle Cloud. After a random time (1~2 days), bot turns offline, even with the process still running. No errors or warnings in the console
My question is: how can I debug it? Like listening to an websocket event or similar
Because I don't really know how to start to investigate this problem. Or if it's "normal" and I need to handle it in another way
Node version: 18.6
2 replies
DIAdiscord.js - Imagine an app
•Created by Marcus Natrielli on 11/29/2022 in #djs-questions
Filter role options in new RoleSelectMenu
About the new Select Menus, released in v14.7...
I'm trying to use RoleSelectMenu to display some roles that the user can select. But I don't want to show all server roles, just some
I saw that there is no addOptions(). So, there is another way to do this?
7 replies
DIAdiscord.js - Imagine an app
•Created by Marcus Natrielli on 11/18/2022 in #djs-questions
How to multi-select roles in a slash command?
There's an easy way to select multiple roles as arguments of a slash command?
I know that there is an
addRoleOption
, but if I understand it right, it can only select one role at time15 replies