discord.py: Error for getting list of online players

Summary

I run it and it gives an error

Reproduction Steps

def notify(msg, role: discord.Role): guild = client.get_guild(*************) for member in guild.members: if role in member.roles: pass notify(‘hi’,‘lol’)

Run it. It gives error 59200D02-1B5C-45FD-BA6E-C08419FE0193

Minimal Reproducible Code

def notify(msg, role: discord.Role):
  guild = client.get_guild(************)
  for member in guild.members:
    if role in member.roles:
      pass
notify('hi','lol')

Expected Results

It to pass every time it finds someone with the role “lol”

Actual Results

It gave the error 0138FA08-8A7B-43BE-903B-7C1AFD06F2AD

Intents

?? I’m new, idk what this means

System Information

0DDBEBDF-3C7E-47DF-82FD-A75471A5570C

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

Additional Context

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 27

Most upvoted comments

idk than