forked from cosmic/scythe
1
0
Fork 0

auto bot role

This commit is contained in:
rainydevzz 2025-03-14 01:04:38 -07:00
parent 9829642916
commit d44014224d
1 changed files with 6 additions and 0 deletions

View File

@ -9,6 +9,12 @@ export class MemberEvents {
await channel.send(
`Welcome to **${member.guild.name}** <@${member.user.id}> ! You are member #${member.guild.memberCount}! Get a color role and Operating System role(s) in the Channels & Roles section if you want and enjoy your stay <3`,
);
if(member.user.bot) {
const botRole = member.guild.roles.cache.get(Bun.env.BOT_ROLE!);
if(botRole) {
await member.roles.add(botRole);
}
}
}
@On({ event: "guildMemberRemove" })
async memberRemove([member]: ArgsOf<"guildMemberRemove">, client: Client) {