Torrino
Torrino
DIAdiscord.js - Imagine an app
Created by Torrino on 4/27/2024 in #djs-questions
What are the exact differences between a Webhook and a Webhook client?
I've read the page on the discordjs.guide but I'm not sure I really understood the difference between the two.
4 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 4/21/2024 in #djs-questions
All the mentioned users in my GuildMemberAdd logs are suddenly 'unknown-user'
I have a simple logger for the GuildMemberAdd event and it has worked perfectly for the past 2 years. Around two days ago I noticed that all the mentions in all the logging messages, new and old ones are @unknown-user and clicking on them presents me with the message You don't have access to this link. This is for mentions for users that are even still in the guild.
5 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 9/7/2023 in #djs-questions
Why doesn't my bot always properly set/update a GuildMember's roles?
Since I'm developing an RPG bot and a lot of logic also requires guild members to have certain roles. I've had situations where, for example, a guild member needed to receive 1 specific guild role and lose 1 guild role but they would only receive the mentioned role. When I would reran the same exact code, it would execute properly. It's like on discord's side the role simply doesn't get added (or removed). Is it possible that this has something to do with caching? I've been investigating this issue for quite some time and the only reason I could think of why this is happening is because I'm passing around the guildMember object through my code and perhaps the cache is stale and it doesn't properly update? I couldn't even word that properly but I've come to a dead end. This happens randomly and it has been happening for a long time with different parts of my code.
34 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 8/15/2023 in #djs-questions
In the GuildMemberRemove event, are the cached roles of the guild member all there?
Do I have that guarantee that when the GuildMemberRemove event fires that the <GuildMember> from the parameter has all the roles that they had right before leaving? If not, when are their roles cached exactly?
3 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 9/13/2022 in #djs-questions
Any tips for optimizing work on converting all bot commands to slash commmands.
I know it's going to take a lot of manual labor but since my bot has around 130 commands I'm just looking for absolutely any tips on how to go about doing this properly. Cheers!
13 replies
DIAdiscord.js - Imagine an app
Created by Torrino on 7/19/2022 in #djs-questions
How to properly send components with a message?
const myRow = new ActionRowBuilder()
.addComponents(
<ButtonBuilder>,
...
)

<TextChannel>.send({embeds: [randomEmbed], components: [myRow]});
<TextChannel>.send({components: [ActionRowBuilder.from(myRow)]});
const myRow = new ActionRowBuilder()
.addComponents(
<ButtonBuilder>,
...
)

<TextChannel>.send({embeds: [randomEmbed], components: [myRow]});
<TextChannel>.send({components: [ActionRowBuilder.from(myRow)]});
I've tried both of these and I can't seem to get the appropriate type and since the official guide hasn't been updated yet, I'm really struggling with updating my existing code. Would appreciate any pointers in the right direction here. Thanks!
14 replies