Sha256: 4e4f8cf1e1393867feb72530ea90a453dd19e08df4d76f1da054d32f23789070

Contents?: true

Size: 1.55 KB

Versions: 2

Compression:

Stored size: 1.55 KB

Contents

module Discorb
  #
  # Represents a allowed mentions in a message.
  class AllowedMentions
    #
    # Initializes a new instance of the AllowedMentions class.
    #
    # @param [Boolean] everyone Whether to allow @everyone or @here.
    # @param [Boolean, Array<Discorb::Role>] roles The roles to allow, or false to disable.
    # @param [Boolean, Array<Discorb::User>] users The users to allow, or false to disable.
    # @param [Boolean] replied_user Whether to ping the user that sent the message to reply.
    def initialize: (
      ?everyone: bool?,
      ?roles: (bool | ::Array[Discorb::Role])?,
      ?users: (bool | ::Array[Discorb::User])?,
      ?replied_user: bool?
    ) -> void

    def inspect: -> String

    #
    # Converts the object to a hash.
    # @private
    #
    # @param [Discorb::AllowedMentions, nil] other The object to merge.
    #
    # @return [Hash] The hash.
    def to_hash: (?Discorb::AllowedMentions? other) -> ::Hash[untyped, untyped]

    def nil_merge: (*untyped args) -> untyped

    # @return [Boolean] Whether to allow @everyone or @here.
    attr_accessor everyone: bool?

    # @return [Boolean, Array<Discorb::Role>] The roles to allow, or false to disable.
    attr_accessor roles: (bool | ::Array[Discorb::Role])?

    # @return [Boolean, Array<Discorb::User>] The users to allow, or false to disable.
    attr_accessor users: (bool | ::Array[Discorb::User])?

    # @return [Boolean] Whether to ping the user that sent the message to reply.
    attr_accessor replied_user: bool?
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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