Nostrum.Api.modify_guild_member

You're seeing just the function modify_guild_member, go back to Nostrum.Api module for more information.
Link to this function

modify_guild_member(guild_id, user_id, options \\ %{})

View Source

Specs

modify_guild_member(
  Nostrum.Struct.Guild.id(),
  Nostrum.Struct.User.id(),
  options()
) :: error() | {:ok}

Modifies a guild member's attributes.

This endpoint fires the Nostrum.Consumer.guild_member_update/0 event. It situationally requires the MANAGE_NICKNAMES, MANAGE_ROLES, MUTE_MEMBERS, DEAFEN_MEMBERS, and MOVE_MEMBERS permissions.

If successful, returns {:ok}. Otherwise, returns a Nostrum.Api.error/0.

Options

  • :nick (string) - value to set users nickname to
  • :roles (list of Nostrum.Snowflake.t/0) - array of role ids the member is assigned
  • :mute (boolean) - if the user is muted
  • :deaf (boolean) - if the user is deafened
  • :channel_id (Nostrum.Snowflake.t/0) - id of channel to move user to (if they are connected to voice)

Examples

Nostrum.Api.modify_guild_member(41771983423143937, 637162356451, nick: "Nostrum")
{:ok}