As @Lubomyr mentioned. the solution depends on what you want to do.
If you want it to exclude a specific user, and you want to get them dynamically without their user ID beforehand, look into discord.utils.get with ctx.guild.Members.
Example:
member = discord.utils.get(ctx.guild.members, name='Foo')
# member.id -> member's ID if found
To obtain the command author's ID -> ctx.author.id
To obtain the member's ID -> member.id