forked from Darkempire78/Music-Discord-Bot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
001a397
commit 3a8a71a
Showing
4 changed files
with
25 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
__pycache__/ | ||
Cogs/__pycache__/ | ||
configuration.json | ||
Cogs/topGG.py | ||
configuration.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 not shown.