start on Hypixel Stats webhooks
@@ -42,6 +42,8 @@ class Webhooks(commands.Cog):
async def handler(req):
if req.headers.get('Authorization') == self.d.topgg_hooks_auth:
self.bot.dispatch('topgg_event', cj.classify(await req.json()))
+ elif req.headers.get('Authorization') == self.d.hs_hook_auth:
+ self.bot.dispatch('topgg_hs_vote', cj.classify(await req.json()))
else:
return web.Response(status=401)
@@ -90,6 +92,10 @@ class Webhooks(commands.Cog):
await self.reward(int(data.user), amount)
+ @commands.Cog.listener()
+ async def on_topgg_hs_vote(self, data):
+ pass
+
def setup(bot):
bot.add_cog(Webhooks(bot))
