Lynx Gian
Lynx Gian
SIASapphire - Imagine a framework
Created by Lynx Gian on 4/7/2024 in #discordjs-support
Help fetching users
I didn't know if this was a sapphire or d.js issue but this line of code im using to fetch the users just isn't returning the right amount of users with the specific role. I've tried just getting all the users then filtering them with the role and it also doesn't work correctly
const supportRoleId = interaction.options.getRole('role', true).id
const logChannelId = interaction.options.getChannel('log-channel', true).id
const guild = interaction.guild
const membersWithRole = guild.roles.cache.get(supportRoleId).members
for (const [memberId, member] of membersWithRole) {
console.log(member.user.username)
}
const supportRoleId = interaction.options.getRole('role', true).id
const logChannelId = interaction.options.getChannel('log-channel', true).id
const guild = interaction.guild
const membersWithRole = guild.roles.cache.get(supportRoleId).members
for (const [memberId, member] of membersWithRole) {
console.log(member.user.username)
}
entire code base: https://srcb.in/tK6WFLMltb
4 replies
SIASapphire - Imagine a framework
Created by Lynx Gian on 4/1/2024 in #sapphire-support
Accessing data in subcommands
I was wondering if there any way of accessing all the data passed in the subcommand without having more than one function for it?
15 replies
SIASapphire - Imagine a framework
Created by Lynx Gian on 3/30/2024 in #sapphire-support
Error when clicking button
error: https://srcb.in/dIL4feMtz6 code: https://srcb.in/MGmSNTYXw6 I tried using Message Component and ButtonType I get this error when trying to interact with a button passed on an embed
18 replies