From 1791b72f459327dff731f8c366c25d4d18a1bd5a Mon Sep 17 00:00:00 2001 From: iDutchy Date: Sun, 13 Sep 2020 01:17:35 +0000 Subject: [PATCH] Add support for Guild.bots and Guild.humans --- discord/guild.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/discord/guild.py b/discord/guild.py index 4c6013a3..15731363 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -511,6 +511,16 @@ class Guild(Hashable): """List[:class:`Member`]: A list of members that belong to this guild.""" return list(self._members.values()) + @property + def bots(self): + """List[:class:`Member`]: A list of bots that belong to this guild.""" + return list(m for m in self._members.values() if m.bot) + + @property + def humans(self): + """List[:class:`Member`]: A list of humans that belong to this guild.""" + return list(m for m in self._members.values() if not m.bot) + def get_member(self, user_id): """Returns a member with the given ID.