diff --git a/main.ts b/main.ts index e66640f..2ab8a19 100644 --- a/main.ts +++ b/main.ts @@ -191,13 +191,8 @@ client.on('guildMemberUpdate', async (oldMember, newMember) => { const channel = await newMember.guild.channels.create({ name: `link-${newMember.id}`, parent: await newMember.guild.channels.fetch(Deno.env.get("LINK_CATEGORY")!) as CategoryChannel, - permissionOverwrites: [ - { - id: newMember.id, - allow: [ 'ViewChannel' ] - } - ] }); + await channel.permissionOverwrites.create(newMember, { ViewChannel: true }); await channel.send({ content: `<@${newMember.id}> Looks like you just boosted the server! Unfortunately, you are not linked to your BBN account yet. Please send your Email address to this channel to link your account. Our Team will respond as soon as possible.`, allowedMentions: { users: [ newMember.id ] } }); } }