From 49cd00fa7989925def79fd9438e938d90512e770 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Mon, 25 Jul 2022 15:19:23 +0300 Subject: [PATCH] Add =members --- cogs/misc.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/cogs/misc.py b/cogs/misc.py index 4be4fed..2087ff0 100644 --- a/cogs/misc.py +++ b/cogs/misc.py @@ -15,9 +15,9 @@ if TYPE_CHECKING: from bot import MinearchyBot -class Miscellanious( +class Miscellaneous( commands.Cog, - name="Miscellanious", + name="Miscellaneous", description="Various utilities.", ): def __init__(self, bot: MinearchyBot) -> None: @@ -64,6 +64,13 @@ class Miscellanious( async def count(self, ctx: commands.Context) -> None: await ctx.reply(f"Currently in `{len(self.bot.guilds)}` servers.") + @commands.command( + brief="Sends the total members in the server.", + help="Sends the total members in the server.", + ) + async def members(self, ctx: commands.Context) -> None: + await ctx.reply(f"There are `{ctx.guild.member_count}` users in this server.") + @commands.Cog.listener() async def on_message_delete(self, message: discord.Message) -> None: if not message.guild: @@ -129,4 +136,4 @@ class Miscellanious( async def setup(bot: MinearchyBot) -> None: - await bot.add_cog(Miscellanious(bot)) + await bot.add_cog(Miscellaneous(bot))