diff options
| author | 2019-01-04 20:17:19 +0100 | |
|---|---|---|
| committer | 2019-01-04 20:17:19 +0100 | |
| commit | 6d5acc0c0608304ef88a237c373f0fb40c47dafd (patch) | |
| tree | a2428fd11ab47ae7369559822c30c8bb87f82a9a | |
| parent | Handle role updates in sync cog. (diff) | |
Handle role creation in sync cog.
| -rw-r--r-- | bot/cogs/sync/cog.py | 11 |
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 |