Skip to content

Commit

Permalink
advanced way of creating channels
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlauer-Hax committed Feb 8, 2024
1 parent 2122de3 commit dbe5d86
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 ] } });
}
}
Expand Down

0 comments on commit dbe5d86

Please sign in to comment.