Implementing an Autorole Feature for a Discord Bot in Python

I’m trying to add an autorole feature to my Discord bot, but I want this functionality to apply only to a specific server. I would appreciate your help with this! Below is my current code; however, I overlooked some aspects which I hope to refine:

@client.event
async def on_member_enter(user: discord.Member):
    target_server = user.guild
    assigned_role = target_server.get_role('770262439937048577')
    if target_server.id == '753667215710224574':
        await user.add_roles(assigned_role)
    else:
        await user.send('Not authorized to assign roles.')

I’m focused solely on the autorole part, and I’m open to any suggestions or improvements.