Removing unworking membercount command

This commit is contained in:
Ian
2024-04-23 16:08:29 -04:00
parent e94a5458e8
commit b4d059e31e
2 changed files with 22 additions and 19 deletions

View File

@@ -46,10 +46,6 @@ class CoreCog(commands.Cog, name="Core"):
@commands.Cog.listener() @commands.Cog.listener()
async def on_ready(self) -> None: async def on_ready(self) -> None:
print("The News Bot is now ready.") print("The News Bot is now ready.")
# channel = self.bot.get_channel(611922107345141760)
# embed=discord.Embed(title=f"The News Bot is now online!",description="Hello! Please use the below command to summon the embed editor. ```&embed create```", color=0x00FFFF)
# embed.timestamp = datetime.datetime.now()
# await channel.send(embed=embed)
@commands.Cog.listener() @commands.Cog.listener()
async def on_message(self, message: discord.Message) -> None: async def on_message(self, message: discord.Message) -> None:
@@ -84,9 +80,9 @@ class CoreCog(commands.Cog, name="Core"):
title="Info", title="Info",
description="The SC News Bot is a bot created for the r/starcitizen Discord server to help with writing news posts.", description="The SC News Bot is a bot created for the r/starcitizen Discord server to help with writing news posts.",
) )
# embed.add_field( embed.add_field(
# name="Version", value=f"v{self.bot.version}+{self._get_version()}" name="Version", value=f"v{self.bot.version}+{self._get_version()}"
# ) )
embed.add_field( embed.add_field(
name="Library", value=f"discord.py v{discord.__version__}", inline=False name="Library", value=f"discord.py v{discord.__version__}", inline=False
) )

View File

@@ -14,21 +14,28 @@ class RStarCitizen(commands.Cog):
self.bot = bot self.bot = bot
self._last_member = None self._last_member = None
@commands.Cog.listener()
async def on_ready(self) -> None:
for channel_id in MEMBER_COUNT_CHANNELS:
await asyncio.sleep(3)
self.update_member_count.start(channel_id)
@tasks.loop(minutes = 30)
async def update_member_count(self, channel_id: int) -> None:
channel = self.bot.get_channel(channel_id)
member_count = channel.guild.member_count
await channel.edit(name=f"Members: {member_count}")
@commands.command(description='Modmail Close Message') @commands.command(description='Modmail Close Message')
async def mmc(self, ctx): async def mmc(self, ctx):
await ctx.reply("```=aclose Situation resolved, please only reply if there is something else.```") await ctx.reply("```=aclose Situation resolved, please only reply if there is something else.```")
# @commands.Cog.listener()
# async def on_ready(self) -> None:
# for channel_id in MEMBER_COUNT_CHANNELS:
# self.update_member_count.start(channel_id)
# @tasks.loop(hours = 12)
# async def update_member_count(self, channel_id: int) -> None:
# for channel_id in MEMBER_COUNT_CHANNELS:
# channel = self.bot.get_channel(channel_id)
# member_count = channel.guild.member_count
# await channel.edit(name=f"Members: {member_count}")
# @commands.command(description='Update Member Count Channel')
# async def mc(self, channel_id: int):
# for channel_id in MEMBER_COUNT_CHANNELS:
# channel = self.bot.get_channel(channel_id)
# member_count = channel.guild.member_count
# await channel.edit(name=f"Members: {member_count}")
async def setup(bot): async def setup(bot):
await bot.add_cog(RStarCitizen(bot)) await bot.add_cog(RStarCitizen(bot))