Exemplo n.º 1
0
    def guilds_roles_modify(
            self,
            guild,
            role,
            name=None,
            hoist=None,
            color=None,
            permissions=None,
            position=None,
            mentionable=None,
            reason=None):

        r = self.http(
            Routes.GUILDS_ROLES_MODIFY,
            dict(guild=guild, role=role),
            json=optional(
                name=name,
                hoist=hoist,
                color=color,
                permissions=permissions,
                position=position,
                mentionable=mentionable,
            ),
            headers=_reason_header(reason))
        return Role.create(self.client, r.json(), guild_id=guild)
Exemplo n.º 2
0
 def guilds_roles_modify(self, guild, role, **kwargs):
     r = self.http(Routes.GUILDS_ROLES_MODIFY, dict(guild=guild, role=role), json=kwargs)
     return Role.create(self.client, r.json(), guild_id=guild)
Exemplo n.º 3
0
 def guilds_roles_modify_batch(self, guild, roles):
     r = self.http(Routes.GUILDS_ROLES_MODIFY_BATCH, dict(guild=guild), json=roles)
     return Role.create_map(self.client, r.json(), guild_id=guild)
Exemplo n.º 4
0
 def guilds_roles_create(self, guild):
     r = self.http(Routes.GUILDS_ROLES_CREATE, dict(guild=guild))
     return Role.create(self.client, r.json(), guild_id=guild)
Exemplo n.º 5
0
 def guilds_roles_list(self, guild):
     r = self.http(Routes.GUILDS_ROLES_LIST, dict(guild=guild))
     return Role.create_map(self.client, r.json(), guild_id=guild)
Exemplo n.º 6
0
 def guilds_roles_create(self, guild, reason=None):
     r = self.http(Routes.GUILDS_ROLES_CREATE, dict(guild=guild), headers=_reason_header(reason))
     return Role.create(self.client, r.json(), guild_id=guild)