Skip to content
This repository has been archived by the owner on May 6, 2023. It is now read-only.

Commit

Permalink
guild reporting to private guild
Browse files Browse the repository at this point in the history
  • Loading branch information
SanityZeroPercent committed Jul 16, 2022
1 parent 12f6c85 commit 2b321ae
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions extensions/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ async def meee(self, ctx: InteractionContext):
)
return await paginators.send(ctx)

async def send_guild_stats(self, e, guild):
async def send_guild_stats(self, e, guild, r_channel):
owner = await self.bot.fetch_user(guild._owner_id)
e.add_field(name="Name", value=guild.name)
e.add_field(name="ID", value=guild.id)
Expand All @@ -163,21 +163,21 @@ async def send_guild_stats(self, e, guild):
if guild.me:
e.timestamp = guild.me.joined_at

ch = self.bot.get_channel(993972357414785076)
ch = self.bot.get_channel(r_channel)
await ch.send(embed=e)

@listen()
async def on_guild_join(self, event: GuildJoin):
if self.bot.is_ready:
guild = event.guild
e = Embed(color=0x53DDA4, title="New Guild")
await self.send_guild_stats(e, guild)
e = Embed(color=0x53DDA4, title="Joined a Guild")
await self.send_guild_stats(e, guild, 997921447701921953)

@listen()
async def on_guild_left(self, event: GuildLeft):
guild = event.guild
e = Embed(color=0x53DDA4, title="Left Guild")
await self.send_guild_stats(e, guild)
e = Embed(color=0x53DDA4, title="Left a Guild")
await self.send_guild_stats(e, guild, 997921473861799976)

@Task.create(IntervalTrigger(seconds=30))
async def presence_changes(self):
Expand Down

0 comments on commit 2b321ae

Please sign in to comment.