mirror of
https://github.com/RGBCube/minearchy-bot
synced 2025-07-27 08:57:46 +00:00
Add =members
This commit is contained in:
parent
95da9e096b
commit
49cd00fa79
1 changed files with 10 additions and 3 deletions
13
cogs/misc.py
13
cogs/misc.py
|
@ -15,9 +15,9 @@ if TYPE_CHECKING:
|
||||||
from bot import MinearchyBot
|
from bot import MinearchyBot
|
||||||
|
|
||||||
|
|
||||||
class Miscellanious(
|
class Miscellaneous(
|
||||||
commands.Cog,
|
commands.Cog,
|
||||||
name="Miscellanious",
|
name="Miscellaneous",
|
||||||
description="Various utilities.",
|
description="Various utilities.",
|
||||||
):
|
):
|
||||||
def __init__(self, bot: MinearchyBot) -> None:
|
def __init__(self, bot: MinearchyBot) -> None:
|
||||||
|
@ -64,6 +64,13 @@ class Miscellanious(
|
||||||
async def count(self, ctx: commands.Context) -> None:
|
async def count(self, ctx: commands.Context) -> None:
|
||||||
await ctx.reply(f"Currently in `{len(self.bot.guilds)}` servers.")
|
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()
|
@commands.Cog.listener()
|
||||||
async def on_message_delete(self, message: discord.Message) -> None:
|
async def on_message_delete(self, message: discord.Message) -> None:
|
||||||
if not message.guild:
|
if not message.guild:
|
||||||
|
@ -129,4 +136,4 @@ class Miscellanious(
|
||||||
|
|
||||||
|
|
||||||
async def setup(bot: MinearchyBot) -> None:
|
async def setup(bot: MinearchyBot) -> None:
|
||||||
await bot.add_cog(Miscellanious(bot))
|
await bot.add_cog(Miscellaneous(bot))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue