mirror of
https://github.com/veganhacktivists/arabot.git
synced 2025-05-19 06:04:16 +02:00
feat(arabot): fix @everyone in roles for role viewer
This commit is contained in:
parent
97d6d14d8a
commit
ad594aa63f
@ -35,7 +35,7 @@ import {
|
||||
ButtonInteraction,
|
||||
ButtonStyle,
|
||||
ActionRowBuilder,
|
||||
EmbedBuilder,
|
||||
EmbedBuilder, Snowflake,
|
||||
} from 'discord.js';
|
||||
import {
|
||||
createVerificationText,
|
||||
@ -90,7 +90,15 @@ export class VerificationJoinVCListener extends Listener {
|
||||
const currentChannel = currentChannelGuild as VoiceChannel;
|
||||
const category = categoryGuild as CategoryChannel;
|
||||
|
||||
const roles = rolesToString(member.roles.cache.map((r) => r.id));
|
||||
const roles: Snowflake[] = [];
|
||||
|
||||
member.roles.cache.forEach((role) => {
|
||||
if (role.id !== guild.id) {
|
||||
roles.push(role.id);
|
||||
}
|
||||
});
|
||||
|
||||
const rolesParsed = rolesToString(roles);
|
||||
|
||||
// Check if a verifier joined a verification VC and update database
|
||||
if (channel.members.size === 2) {
|
||||
@ -167,7 +175,7 @@ export class VerificationJoinVCListener extends Listener {
|
||||
}
|
||||
|
||||
// Send a message that someone wants to be verified
|
||||
const userInfoEmbed = await this.getUserInfo(member, roles);
|
||||
const userInfoEmbed = await this.getUserInfo(member, rolesParsed);
|
||||
const susNotes = await this.getSus(member, guild);
|
||||
await verificationText.send({
|
||||
content: `${member.user} wants to be verified in ${channel}
|
||||
|
Loading…
x
Reference in New Issue
Block a user