[General] Fix streaming count in serverinfo command. (#3680)

* [General] Fix streaming count on serverinfo command.

* Update general.py

* Update general.py

* is
This commit is contained in:
PredaaA 2020-03-21 22:23:56 +01:00 committed by GitHub
parent b9f07e8684
commit a88b2af4a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -301,11 +301,13 @@ class General(commands.Cog):
online_stats = { online_stats = {
_("Humans: "): lambda x: not x.bot, _("Humans: "): lambda x: not x.bot,
_(" • Bots: "): lambda x: x.bot, _(" • Bots: "): lambda x: x.bot,
"\N{LARGE GREEN CIRCLE}": lambda x: x.status == discord.Status.online, "\N{LARGE GREEN CIRCLE}": lambda x: x.status is discord.Status.online,
"\N{LARGE ORANGE CIRCLE}": lambda x: x.status == discord.Status.idle, "\N{LARGE ORANGE CIRCLE}": lambda x: x.status is discord.Status.idle,
"\N{LARGE RED CIRCLE}": lambda x: x.status == discord.Status.do_not_disturb, "\N{LARGE RED CIRCLE}": lambda x: x.status is discord.Status.do_not_disturb,
"\N{MEDIUM WHITE CIRCLE}": lambda x: x.status == discord.Status.offline, "\N{MEDIUM WHITE CIRCLE}": lambda x: x.status is discord.Status.offline,
"\N{LARGE PURPLE CIRCLE}": lambda x: x.activity == discord.Streaming, "\N{LARGE PURPLE CIRCLE}": lambda x: (
x.activity is not None and x.activity.type is discord.ActivityType.streaming
),
"\N{MOBILE PHONE}": lambda x: x.is_on_mobile(), "\N{MOBILE PHONE}": lambda x: x.is_on_mobile(),
} }
member_msg = _("Users online: **{online}/{total_users}**\n").format( member_msg = _("Users online: **{online}/{total_users}**\n").format(