diff options
| author | 2018-02-13 15:07:45 +0000 | |
|---|---|---|
| committer | 2018-02-13 15:07:45 +0000 | |
| commit | 083ed6e11cfbb3d8a30a153e1d05ce409d4b5a98 (patch) | |
| tree | 3b9e3371fca88dd32912ad4a604cf51bf7e0a67d | |
| parent | Use a case-insensitive dict for cogs. (diff) | |
Get user count from server members
Diffstat (limited to '')
| -rw-r--r-- | bot/cogs/bot.py | 4 | ||||
| -rw-r--r-- | bot/constants.py | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/bot/cogs/bot.py b/bot/cogs/bot.py index 3d5b18c63..d5fb486d8 100644 --- a/bot/cogs/bot.py +++ b/bot/cogs/bot.py @@ -4,7 +4,7 @@ from discord.ext.commands import AutoShardedBot, Context, command, group from dulwich.repo import Repo -from bot.constants import VERIFIED_ROLE +from bot.constants import VERIFIED_ROLE, PYTHON_GUILD from bot.decorators import with_role @@ -40,7 +40,7 @@ class Bot: repo = Repo(".") sha = repo[repo.head()].sha().hexdigest() - embed.add_field(name="Total Users", value=str(len(self.bot.users))) + embed.add_field(name="Total Users", value=str(len(self.bot.get_guild(PYTHON_GUILD).members))) embed.add_field(name="Git SHA", value=str(sha)[:7]) embed.set_author( diff --git a/bot/constants.py b/bot/constants.py index 59f500403..e11a625ac 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -1,5 +1,6 @@ # coding=utf-8 +PYTHON_GUILD = 267624335836053506 DEVLOG_CHANNEL = 409308876241108992 VERIFICATION_CHANNEL = 352442727016693763 |