diff --git a/infochannel/infochannel.py b/infochannel/infochannel.py index 23e04de..7b81048 100644 --- a/infochannel/infochannel.py +++ b/infochannel/infochannel.py @@ -7,7 +7,6 @@ from redbot.core.bot import Red Cog: Any = getattr(commands, "Cog", object) listener = getattr(commands.Cog, "listener", None) # Trusty + Sinbad if listener is None: - def listener(name=None): return lambda x: x @@ -45,9 +44,9 @@ class InfoChannel(Cog): def check(m): return ( - m.content.upper() in ["Y", "YES", "N", "NO"] - and m.channel == ctx.channel - and m.author == ctx.author + m.content.upper() in ["Y", "YES", "N", "NO"] + and m.channel == ctx.channel + and m.author == ctx.author ) guild: discord.Guild = ctx.guild @@ -160,8 +159,10 @@ class InfoChannel(Cog): onlinecount = guild_data["online_count"] # Gets count of bots - bots = lambda x: x.bot - num = len([m for m in guild.members if bots(m)]) + # bots = lambda x: x.bot + # def bots(x): return x.bot + + num = len([m for m in guild.members if m.bot]) bot_msg = f"Bots: {num}" # Gets count of online users @@ -188,8 +189,7 @@ class InfoChannel(Cog): if guild_data["member_count"]: name = "{} ".format(human_msg) - - await channel.edit(reason="InfoChannel update", name=name) + await channel.edit(reason="InfoChannel update", name=name) if botcount: name = "{} ".format(bot_msg)