Skip to content

Commit 3be698f

Browse files
committed
Add functionality to update database on guild join
1 parent 64e8052 commit 3be698f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

protobot.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,13 @@ async def on_disconnect():
8585
@bot.event
8686
async def on_guild_join(guild):
8787
"""
88-
Logs a message when bot joins a new guild.
88+
Logs a message when bot joins a new guild and adds all users from that guild to the database.
8989
"""
9090

9191
logging.warning(f"Joined new guild: {guild.name + ' (' + str(guild.id) + ')'}")
9292

93+
add_all_users_from_guild_to_database(guild)
94+
9395

9496
@bot.event
9597
async def on_member_join(member):

0 commit comments

Comments
 (0)