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_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.º 4
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)