No need for lambda or function
This commit is contained in:
parent
c7dc5eee75
commit
e8cdae4c7a
@ -7,7 +7,6 @@ from redbot.core.bot import Red
|
|||||||
Cog: Any = getattr(commands, "Cog", object)
|
Cog: Any = getattr(commands, "Cog", object)
|
||||||
listener = getattr(commands.Cog, "listener", None) # Trusty + Sinbad
|
listener = getattr(commands.Cog, "listener", None) # Trusty + Sinbad
|
||||||
if listener is None:
|
if listener is None:
|
||||||
|
|
||||||
def listener(name=None):
|
def listener(name=None):
|
||||||
return lambda x: x
|
return lambda x: x
|
||||||
|
|
||||||
@ -160,8 +159,10 @@ class InfoChannel(Cog):
|
|||||||
onlinecount = guild_data["online_count"]
|
onlinecount = guild_data["online_count"]
|
||||||
|
|
||||||
# Gets count of bots
|
# Gets count of bots
|
||||||
bots = lambda x: x.bot
|
# bots = lambda x: x.bot
|
||||||
num = len([m for m in guild.members if bots(m)])
|
# def bots(x): return x.bot
|
||||||
|
|
||||||
|
num = len([m for m in guild.members if m.bot])
|
||||||
bot_msg = f"Bots: {num}"
|
bot_msg = f"Bots: {num}"
|
||||||
|
|
||||||
# Gets count of online users
|
# Gets count of online users
|
||||||
@ -188,7 +189,6 @@ class InfoChannel(Cog):
|
|||||||
|
|
||||||
if guild_data["member_count"]:
|
if guild_data["member_count"]:
|
||||||
name = "{} ".format(human_msg)
|
name = "{} ".format(human_msg)
|
||||||
|
|
||||||
await channel.edit(reason="InfoChannel update", name=name)
|
await channel.edit(reason="InfoChannel update", name=name)
|
||||||
|
|
||||||
if botcount:
|
if botcount:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user