Nostrum.Api.modify_guild

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

modify_guild(guild_id, options \\ [], reason \\ nil)

View Source

Specs

Modifies a guild's settings.

This endpoint requires the MANAGE_GUILD permission. It fires the Nostrum.Consumer.guild_update/0 event.

An optional reason can be provided for the audit log.

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

Options

  • :name (string) - guild name
  • :region (string) - guild voice region id
  • :verification_level (integer) - verification level
  • :default_message_notifications (integer) - default message notification level
  • :explicit_content_filter (integer) - explicit content filter level
  • :afk_channel_id (Nostrum.Snowflake.t/0) - id for afk channel
  • :afk_timeout (integer) - afk timeout in seconds
  • :icon (base64 data URI) - 128x128 jpeg image for the guild icon
  • :owner_id (Nostrum.Snowflake.t/0) - user id to transfer guild ownership to (must be owner)
  • :splash (base64 data URI) - 128x128 jpeg image for the guild splash (VIP only)
  • :system_channel_id (Nostrum.Snowflake.t/0) - the id of the channel to which system messages are sent
  • :rules_channel_id (Nostrum.Snowflake.t/0) - the id of the channel that is used for rules in public guilds
  • :public_updates_channel_id (Nostrum.Snowflake.t/0) - the id of the channel where admins and moderators receive notices from Discord in public guilds

Examples

Nostrum.Api.modify_guild(451824027976073216, name: "Nose Drum")
{:ok, %Nostrum.Struct.Guild{id: 451824027976073216, name: "Nose Drum", ...}}