aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Johannes Christ <[email protected]>2019-01-04 20:17:19 +0100
committerGravatar Johannes Christ <[email protected]>2019-01-04 20:17:19 +0100
commit6d5acc0c0608304ef88a237c373f0fb40c47dafd (patch)
treea2428fd11ab47ae7369559822c30c8bb87f82a9a
parentHandle role updates in sync cog. (diff)
Handle role creation in sync cog.
-rw-r--r--bot/cogs/sync/cog.py11
1 files changed, 11 insertions, 0 deletions
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