Sha256: b5d5f660e6ca0c0d2d7cd4a8112c381b91370ee109724a6f4c47f265e168a5e9

Contents?: true

Size: 1.71 KB

Versions: 2

Compression:

Stored size: 1.71 KB

Contents

module Discorb
  #
  # Represents a stage instance of a voice state.
  class StageInstance < Discorb::DiscordModel
    #
    # Initialize a new instance of the StageInstance class.
    # @private
    #
    # @param [Discorb::Client] client The client.
    # @param [Hash] data The data of the stage instance.
    # @param [Boolean] no_cache Whether to disable caching.
    def initialize: (
      Discorb::Client client,
      Discorb::json data,
      ?no_cache: bool
    ) -> void

    def guild: -> untyped

    def channel: -> untyped

    def discoverable?: -> bool

    def public?: -> bool

    def guild_only?: -> bool

    def inspect: -> String

    #
    # Edits the stage instance.
    # @async
    # @macro edit
    #
    # @param [String] topic The new topic of the stage instance.
    # @param [:public, :guild_only] privacy_level The new privacy level of the stage instance.
    # @param [String] reason The reason for editing the stage instance.
    #
    # @return [Async::Task<void>] The task.
    def edit: (
      ?topic: String,
      ?privacy_level: Symbol,
      ?reason: String?
    ) -> Async::Task[void]

    #
    # Deletes the stage instance.
    #
    # @param [String] reason The reason for deleting the stage instance.
    #
    # @return [Async::Task<void>] The task.
    def delete!: (?reason: String?) -> Async::Task[void]

    # @return [Discorb::Snowflake] The ID of the guild this voice state is for.
    attr_reader id: Discorb::Snowflake

    # @return [String] The topic of the stage instance.
    attr_reader topic: String

    # @return [:public, :guild_only] The privacy level of the stage instance.
    attr_reader privacy_level: Symbol
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
discorb-0.18.1 sig/discorb/stage_instance.rbs
discorb-0.18.0 sig/discorb/stage_instance.rbs