LunarRage | DNA
LunarRage | DNA
DIAdiscord.js - Imagine an app
Created by LunarRage | DNA on 11/15/2023 in #djs-questions
Issue with Fetching User Details from Reactions in Discord.js
Ah I see what happened, My issue was to iterate over the Collection<string,User> I assume I could just log the full object to the console. This works

if(users){
logger.info(`users found ${users.map((user)=>user.username)}`);
}


if(users){
logger.info(`users found ${users.map((user)=>user.username)}`);
}

16 replies
DIAdiscord.js - Imagine an app
Created by LunarRage | DNA on 11/15/2023 in #djs-questions
Issue with Fetching User Details from Reactions in Discord.js
This is on the MessageReaction object.
users: {
"reaction": {
"messageId": "Hidden-ID",
"me": false,
"users": [],
"count": 1,
"emojiId": {
"animated": null,
"name": "🔥",
"id": null,
"reaction": "🔥",
"identifier": "%F0%9F%94%A5"
}
}
}
users: {
"reaction": {
"messageId": "Hidden-ID",
"me": false,
"users": [],
"count": 1,
"emojiId": {
"animated": null,
"name": "🔥",
"id": null,
"reaction": "🔥",
"identifier": "%F0%9F%94%A5"
}
}
}
16 replies
DIAdiscord.js - Imagine an app
Created by LunarRage | DNA on 11/15/2023 in #djs-questions
Issue with Fetching User Details from Reactions in Discord.js
Currently using pino.
16 replies
DIAdiscord.js - Imagine an app
Created by LunarRage | DNA on 11/15/2023 in #djs-questions
Issue with Fetching User Details from Reactions in Discord.js
export async function fetchReactionUsers(reaction: MessageReaction): Promise<User[]> {
let result: User[] = [];
try {
let users = await reaction.users.fetch();
for (const user of users.values()) {
result.push(user);
}
return result;
} catch (error) {
logger.error(error, `Error fetching reaction users`);
return result;
}
}
export async function fetchReactionUsers(reaction: MessageReaction): Promise<User[]> {
let result: User[] = [];
try {
let users = await reaction.users.fetch();
for (const user of users.values()) {
result.push(user);
}
return result;
} catch (error) {
logger.error(error, `Error fetching reaction users`);
return result;
}
}
16 replies
DIAdiscord.js - Imagine an app
Created by LunarRage | DNA on 11/15/2023 in #djs-questions
Issue with Fetching User Details from Reactions in Discord.js
Oh did I post it incorrectly? I have it broken down in the original post. I essentially logged the contents of the fetchReactionUsers to the logger
16 replies
DIAdiscord.js - Imagine an app
Created by LunarRage | DNA on 11/15/2023 in #djs-questions
Issue with Fetching User Details from Reactions in Discord.js
I assumed fetching them manually would populate that array but, still empty
16 replies
DIAdiscord.js - Imagine an app
Created by LunarRage | DNA on 11/15/2023 in #djs-questions
Issue with Fetching User Details from Reactions in Discord.js
I can see emoji details and the message id but user array is empty
16 replies
DIAdiscord.js - Imagine an app
Created by LunarRage | DNA on 11/15/2023 in #djs-questions
Issue with Fetching User Details from Reactions in Discord.js
yea
16 replies
DIAdiscord.js - Imagine an app
Created by LunarRage | DNA on 11/15/2023 in #djs-questions
Issue with Fetching User Details from Reactions in Discord.js
I was expecting to get users who utilized the reaction.
16 replies
DIAdiscord.js - Imagine an app
Created by LunarRage | DNA on 10/30/2023 in #djs-questions
🐛 Issue: Permission Error (50013) When Deleting a Role with Discord Bot
No need for the condescending tone. I apologize if I misunderstood something. Thank you for helping me understand the situation. I'm uncertain about the best event to use for the 'Clean up'. I had assumed I could proceed with this particular event before the bot was removed.
10 replies
DIAdiscord.js - Imagine an app
Created by LunarRage | DNA on 10/30/2023 in #djs-questions
🐛 Issue: Permission Error (50013) When Deleting a Role with Discord Bot
When I run the role.delete in my interaction command it will remove without any problems but if I run it in my guildDelete Event handler it has permission issues.
10 replies
DIAdiscord.js - Imagine an app
Created by LunarRage | DNA on 10/30/2023 in #djs-questions
🐛 Issue: Permission Error (50013) When Deleting a Role with Discord Bot
INFO [14:58:40.420] (170105): Managed Role Managed: false
INFO [14:58:40.420] (170105): Role Compare Position To: -2
INFO [14:58:40.420] (170105): Managed Role Managed: false
INFO [14:58:40.420] (170105): Role Compare Position To: -2
10 replies
DIAdiscord.js - Imagine an app
Created by LunarRage | DNA on 10/30/2023 in #djs-questions
🐛 Issue: Permission Error (50013) When Deleting a Role with Discord Bot
INFO [14:17:04.263] (99644): Managed Roles: @everyone, admin, botify, Mavis Bot Admin, Mavis Oracle
INFO [14:17:04.263] (99644): Role Position: 1 Highest Role Position: 3
INFO [14:17:04.263] (99644): Found 3 members with the "Mavis Bot Admin" role.
INFO [14:17:04.263] (99644): Managed Roles: @everyone, admin, botify, Mavis Bot Admin, Mavis Oracle
INFO [14:17:04.263] (99644): Role Position: 1 Highest Role Position: 3
INFO [14:17:04.263] (99644): Found 3 members with the "Mavis Bot Admin" role.
10 replies
DIAdiscord.js - Imagine an app
Created by LunarRage | DNA on 10/26/2023 in #djs-questions
private message
Sorry about that!
6 replies