auto: ignore bots

This commit is contained in:
Amazed 2020-09-25 12:38:08 +02:00
parent b5372d6ae0
commit 37584dee99

View File

@ -442,7 +442,7 @@ class WynncraftCog(commands.Cog):
try: try:
guild_name = await self.config.guild(guild).guild_name() guild_name = await self.config.guild(guild).guild_name()
if not guild_name: if not guild_name:
members = [a.display_name for a in guild.members] members = [a.display_name for a in guild.members if not a.bot]
else: else:
r = requests.get("https://api.wynncraft.com/public_api.php?action=guildStats&command=%s" % guild_name).json() r = requests.get("https://api.wynncraft.com/public_api.php?action=guildStats&command=%s" % guild_name).json()
members = [a["name"] for a in r["members"]] members = [a["name"] for a in r["members"]]