aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar wookie184 <[email protected]>2021-06-19 18:53:00 +0100
committerGravatar GitHub <[email protected]>2021-06-19 18:53:00 +0100
commit19c50beceda92a2d3b2a3fff7420aebec7e2e014 (patch)
tree2f4f6a9263bd00275a9cd49df3ffbcd0d47e823b
parentMerge pull request #1649 from python-discord/filters/4200-chars-limit (diff)
Only fetch message counts if in mod channel
Changes to only fetch message counts for the user command if in a mod channel, as they are not displayed otherwise, and so an unnecessary api call.
-rw-r--r--bot/exts/info/information.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/bot/exts/info/information.py b/bot/exts/info/information.py
index 834fee1b4..1b1243118 100644
--- a/bot/exts/info/information.py
+++ b/bot/exts/info/information.py
@@ -241,8 +241,6 @@ class Information(Cog):
if is_set and (emoji := getattr(constants.Emojis, f"badge_{badge}", None)):
badges.append(emoji)
- activity = await self.user_messages(user)
-
if on_server:
joined = time_since(user.joined_at, max_units=3)
roles = ", ".join(role.mention for role in user.roles[1:])
@@ -272,8 +270,7 @@ class Information(Cog):
# Show more verbose output in moderation channels for infractions and nominations
if is_mod_channel(ctx.channel):
- fields.append(activity)
-
+ fields.append(await self.user_messages(user))
fields.append(await self.expanded_user_infraction_counts(user))
fields.append(await self.user_nomination_counts(user))
else: