mirror of
https://github.com/boticord/boticordpy.git
synced 2024-11-14 12:27:28 +03:00
24 lines
672 B
Python
24 lines
672 B
Python
|
from discord.ext import commands
|
||
|
|
||
|
from boticordpy import BoticordClient
|
||
|
|
||
|
|
||
|
class BoticordCog(commands.Cog):
|
||
|
def __init__(self, bot):
|
||
|
self.bot = bot
|
||
|
self.boticord = BoticordClient(self.bot, "your-boticord-token")
|
||
|
self.boticord.start_loop()
|
||
|
|
||
|
@commands.command(name="boticord-update")
|
||
|
@commands.is_owner()
|
||
|
async def boticord_update(self, ctx):
|
||
|
"""
|
||
|
This commands can be used by owner to post stats to boticord
|
||
|
"""
|
||
|
stats = {"servers": len(self.bot.guilds), "shards": 0, "users": len(self.bot.users)}
|
||
|
await self.boticord.Bots.postStats(stats)
|
||
|
|
||
|
|
||
|
def setup(bot):
|
||
|
bot.add_cog(BoticordCog(bot))
|