From 6d5acc0c0608304ef88a237c373f0fb40c47dafd Mon Sep 17 00:00:00 2001 From: Johannes Christ Date: Fri, 4 Jan 2019 20:17:19 +0100 Subject: Handle role creation in sync cog. --- bot/cogs/sync/cog.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bot/cogs/sync/cog.py b/bot/cogs/sync/cog.py index be4345df0..6cffe6339 100644 --- a/bot/cogs/sync/cog.py +++ b/bot/cogs/sync/cog.py @@ -39,6 +39,17 @@ class Sync: syncer_name, total_created, total_updated ) + async def on_guild_role_create(self, role: Role): + await self.bot.api_client.post( + 'bot/roles', + json={ + 'colour': role.colour, + 'id': role.id, + 'name': role.name, + 'permissions': role.permissions + } + ) + async def on_guild_role_update(self, before: Role, after: Role): if ( before.name -- cgit v1.2.3