discord.py bot can't dm multiple users with a role
11:51 02 Dec 2021

@client.command()
async def eventsoon(ctx):
  role = discord.utils.get(ctx.message.guild.roles, name='Golden God')
  for member in ctx.message.guild.members:
    if role in member.roles:
      await member.send("ur mom")

I want the bot to dm users with golden god role, it doesnt work aand gives no errors

python discord discord.py