Skip to content
This repository has been archived by the owner on Dec 4, 2022. It is now read-only.

Commit

Permalink
forgot update
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMoksej authored Nov 23, 2020
1 parent 7f471a0 commit ef16479
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cogs/dbl.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ async def on_dbl_vote(self, data):
e.set_thumbnail(url="https://cdn.discordapp.com/attachments/638902095520464908/659611283443941376/upvote.png")
e.set_footer(text=f'User ID: {user.id}')
await channel.send(embed=e)

@tasks.loop(minutes=30.0)
async def update_stats(self):
"""This function runs every 30 minutes to automatically update your server count"""
print('Attempting to post server count')
try:
await self.dblpy.post_guild_count()
print('Posted server count ({})'.format(self.dblpy.guild_count()))
except Exception as e:
print('Failed to post server count\n{}: {}'.format(type(e).__name__, e))

@commands.Cog.listener()
async def on_guild_post():
Expand Down

0 comments on commit ef16479

Please sign in to comment.