Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
initialize lvl1 on join
Browse files
app.py
CHANGED
@@ -261,6 +261,12 @@ async def on_member_unban(guild, unbanned_user):
|
|
261 |
async def on_member_join(member):
|
262 |
try:
|
263 |
await asyncio.sleep(5)
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
embed = Embed(color=Color.blue())
|
265 |
avatar_url = member.avatar.url if member.avatar else bot.user.avatar.url
|
266 |
embed.set_author(name=f"{member} ID: {member.id}", icon_url=avatar_url)
|
|
|
261 |
async def on_member_join(member):
|
262 |
try:
|
263 |
await asyncio.sleep(5)
|
264 |
+
# initialize lvl1 on join
|
265 |
+
guild = bot.get_guild(879548962464493619)
|
266 |
+
lvl1 = guild.get_role(1171861537699397733)
|
267 |
+
member2 = guild.get_member(member.id)
|
268 |
+
await member2.add_roles(lvl1)
|
269 |
+
|
270 |
embed = Embed(color=Color.blue())
|
271 |
avatar_url = member.avatar.url if member.avatar else bot.user.avatar.url
|
272 |
embed.set_author(name=f"{member} ID: {member.id}", icon_url=avatar_url)
|