2021-02-12 22:47:00 +00:00
|
|
|
from discord.ext import commands
|
|
|
|
from discord.ext.commands import Cog
|
|
|
|
|
|
|
|
|
|
|
|
class BasicReswitched(Cog):
|
|
|
|
def __init__(self, bot):
|
|
|
|
self.bot = bot
|
|
|
|
|
|
|
|
@commands.guild_only()
|
|
|
|
@commands.command()
|
|
|
|
async def communitycount(self, ctx):
|
|
|
|
"""Prints the community member count of the server."""
|
2023-04-05 10:10:18 +00:00
|
|
|
community = ctx.guild.get_role(self.bot.config.named_roles["community"])
|
2021-02-12 22:47:00 +00:00
|
|
|
await ctx.send(
|
|
|
|
f"{ctx.guild.name} has {len(community.members)} community members!"
|
|
|
|
)
|
|
|
|
|
|
|
|
@commands.guild_only()
|
|
|
|
@commands.command()
|
|
|
|
async def hackercount(self, ctx):
|
|
|
|
"""Prints the hacker member count of the server."""
|
2023-04-05 10:10:18 +00:00
|
|
|
h4x0r = ctx.guild.get_role(self.bot.config.named_roles["hacker"])
|
2021-02-12 22:47:00 +00:00
|
|
|
await ctx.send(
|
|
|
|
f"{ctx.guild.name} has {len(h4x0r.members)} people with hacker role!"
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2022-05-24 18:35:42 +00:00
|
|
|
async def setup(bot):
|
|
|
|
await bot.add_cog(BasicReswitched(bot))
|