Skip to content

Commit

Permalink
add dbl
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkempire78 committed Feb 4, 2021
1 parent 001a397 commit 3a8a71a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
__pycache__/
Cogs/__pycache__/
configuration.json
Cogs/topGG.py
configuration.json
2 changes: 1 addition & 1 deletion Cogs/supportInviteGithub.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def __init__(self, bot):
description = "Give a link to join the support server.")
@commands.cooldown(1, 2, commands.BucketType.member)
async def support(self, ctx):
embed=discord.Embed(title="Support server :", description=f"Join the support server : https://discord.gg/FxXQwKvmUY", color=discord.Colour.random())
embed=discord.Embed(title="Support server :", description=f"Join the support server : https://discord.gg/f2UMbk95bv", color=discord.Colour.random())
embed.set_footer(text=f"Requested by {ctx.author} | Open source", icon_url=ctx.author.avatar_url)
await ctx.send(embed=embed)

Expand Down
23 changes: 23 additions & 0 deletions Cogs/topGG.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from discord.ext import commands

import dbl


class TopGG(commands.Cog):

def __init__(self, bot):
self.bot = bot
self.token = self.bot.dblToken
self.dblpy = dbl.DBLClient(self.bot, self.token, autopost=True) # Autopost will post your guild count every 30 minutes

@commands.Cog.listener()
async def on_guild_post(self):
print("Server count posted successfully")

@commands.Cog.listener()
async def on_dbl_vote(data):
print("New vote", data)


def setup(bot):
bot.add_cog(TopGG(bot))
Binary file modified requirements.txt
Binary file not shown.

0 comments on commit 3a8a71a

Please sign in to comment.