Add .communitycount

This commit is contained in:
leo60228 2019-03-03 12:23:11 -05:00
parent e984551966
commit 65fad27253

View file

@ -13,6 +13,14 @@ class Basic(Cog):
"""Says hello. Duh.""" """Says hello. Duh."""
await ctx.send(f"Hello {ctx.author.mention}!") await ctx.send(f"Hello {ctx.author.mention}!")
@commands.guild_only()
@commands.command()
async def communitycount(self, ctx):
"""Prints the community member count of the server."""
community = ctx.guild.get_role(config.named_roles["community"])
await ctx.send(f"{ctx.guild.name} has "
f"{len(community.members)} community members!")
@commands.guild_only() @commands.guild_only()
@commands.command() @commands.command()
async def membercount(self, ctx): async def membercount(self, ctx):