Various bugfixes and change ct.anyId return to Snowflake
This commit is contained in:
parent
c932269b7d
commit
bc1330bf33
7 changed files with 19 additions and 13 deletions
|
@ -18,9 +18,10 @@ export const VoiceStateUpdateAlertEvt = locateUserEvt({
|
|||
|
||||
triggeredAlerts.forEach(alert => {
|
||||
const txtChannel = meta.pluginData.guild.channels.resolve(alert.channel_id as Snowflake) as TextChannel;
|
||||
txtChannel.send(
|
||||
`🔴 <@!${alert.requestor_id}> the user <@!${alert.user_id}> disconnected out of \`<#!${voiceChannel.id}>\``,
|
||||
);
|
||||
txtChannel.send({
|
||||
content: `🔴 <@!${alert.requestor_id}> the user <@!${alert.user_id}> disconnected out of \`${voiceChannel.name}\``,
|
||||
allowedMentions: { users: [alert.requestor_id as Snowflake] },
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
@ -4,7 +4,7 @@ export async function createOrReuseInvite(vc: VoiceChannel) {
|
|||
const existingInvites = await vc.fetchInvites();
|
||||
|
||||
if (existingInvites.size !== 0) {
|
||||
return existingInvites[0];
|
||||
return existingInvites.first()!;
|
||||
} else {
|
||||
return vc.createInvite();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue