Skip to content

Commit

Permalink
Update infochannel.py
Browse files Browse the repository at this point in the history
added booster counter as requested on bobloy#185
  • Loading branch information
ScaredDonut committed May 26, 2021
1 parent bc12aa8 commit 7c08a5d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions infochannel/infochannel.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ async def get_channel_counts(category, guild):
online_num = members - offline_num
# Gets count of actual users
human_num = members - bot_num
# count amount of premium subs/nitro subs.
boosters = guild.premium_subscription_count
return {
"members": members,
"humans": human_num,
"boosters": boosters,
"bots": bot_num,
"roles": roles_num,
"channels": channels_num,
Expand Down Expand Up @@ -58,6 +61,7 @@ def __init__(self, bot: Red):
self.default_channel_names = {
"members": "Members: {count}",
"humans": "Humans: {count}",
"boosters": "Boosters: {count}",
"bots": "Bots: {count}",
"roles": "Roles: {count}",
"channels": "Channels: {count}",
Expand Down Expand Up @@ -170,6 +174,7 @@ async def _infochannelset_togglechannel(
Valid Types are:
- `members`: Total members on the server
- `humans`: Total members that aren't bots
- `boosters`: Total amount of boosters
- `bots`: Total bots
- `roles`: Total number of roles
- `channels`: Total number of channels excluding infochannels,
Expand Down Expand Up @@ -224,6 +229,7 @@ async def _infochannelset_name(self, ctx: commands.Context, channel_type: str, *
Valid Types are:
- `members`: Total members on the server
- `humans`: Total members that aren't bots
- `boosters`: Total amount of boosters
- `bots`: Total bots
- `roles`: Total number of roles
- `channels`: Total number of channels excluding infochannels
Expand Down Expand Up @@ -441,6 +447,7 @@ async def update_infochannel(self, guild: discord.Guild, channel_type=None, chan
guild,
members=True,
humans=True,
boosters=True,
bots=True,
roles=True,
channels=True,
Expand Down

0 comments on commit 7c08a5d

Please sign in to comment.