glyde/payload/member

Bodies for the endpoints under /guilds/{g}/members and /guilds/{g}/bans.

Types

PUT /guilds/{g}/bans/{u}.

pub type CreateBan {
  CreateBan(delete_message_seconds: option.Option(Int))
}

Constructors

  • CreateBan(delete_message_seconds: option.Option(Int))

    0 to 604800 seconds, seven days. Deletes the user’s recent messages along with the ban.

PATCH /guilds/{g}/members/@me. Every field clears on null.

pub type EditCurrentMember {
  EditCurrentMember(
    nick: field.Field(String),
    avatar: field.Field(image.ImageData),
    banner: field.Field(image.ImageData),
    bio: field.Field(String),
  )
}

Constructors

PATCH /guilds/{g}/members/{u}.

pub type EditGuildMember {
  EditGuildMember(
    nick: field.Field(String),
    roles: option.Option(List(id.Id(id.Role))),
    mute: option.Option(Bool),
    deaf: option.Option(Bool),
    channel_id: field.Field(id.Id(id.Channel)),
    communication_disabled_until: field.Field(String),
    bypasses_verification: option.Option(Bool),
  )
}

Constructors

  • EditGuildMember(
      nick: field.Field(String),
      roles: option.Option(List(id.Id(id.Role))),
      mute: option.Option(Bool),
      deaf: option.Option(Bool),
      channel_id: field.Field(id.Id(id.Channel)),
      communication_disabled_until: field.Field(String),
      bypasses_verification: option.Option(Bool),
    )

    Arguments

    nick

    Null resets the member to their username.

    roles

    The complete set of roles after the edit, not an addition.

    channel_id

    Null disconnects the member from voice. Either way they have to already be in a voice channel.

    communication_disabled_until

    An ISO-8601 instant up to 28 days out, Null to lift the timeout. A target with ADMINISTRATOR or one that owns the guild is a 403.

    bypasses_verification

    Discord’s member-flags table marks this the only editable one, so it is the whole flags field. DID_REJOIN, COMPLETED_ONBOARDING and IS_GUEST are read-only and cannot be spelled here.

Values

pub fn create_ban() -> CreateBan

A ban that leaves the user’s messages where they are.

pub fn create_ban_body(payload: CreateBan) -> body.Body
pub fn edit_current_member() -> EditCurrentMember
pub fn edit_current_member_body(
  payload: EditCurrentMember,
) -> body.Body
pub fn edit_guild_member() -> EditGuildMember
pub fn edit_guild_member_body(
  payload: EditGuildMember,
) -> body.Body
Search Document