Class: WhopSDK::Models::Message

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/whop_sdk/models/message.rb

Defined Under Namespace

Classes: Poll, PollVote, ReactionCount, User

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(count:, emoji:) ⇒ Object

Represents a reaction count for a feed post

Parameters:

  • count (Integer)

    The number of users who reacted

  • emoji (String, nil)

    The emoji that was used in shortcode format (:heart:)



# File 'lib/whop_sdk/models/message.rb', line 106

Instance Attribute Details

#contentString?

The message content formatted as Markdown. Null if the message has no text content.

Returns:

  • (String, nil)


21
# File 'lib/whop_sdk/models/message.rb', line 21

required :content, String, nil?: true

#created_atTime

The timestamp when this message was originally created.

Returns:

  • (Time)


27
# File 'lib/whop_sdk/models/message.rb', line 27

required :created_at, Time

#idString

Represents a unique identifier that is Base64 obfuscated. It is often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as ‘“VXNlci0xMA==”`) or integer (such as `4`) input value will be accepted as an ID.

Returns:

  • (String)


14
# File 'lib/whop_sdk/models/message.rb', line 14

required :id, String

#is_editedBoolean

Whether the message content has been edited after it was originally sent.

Returns:

  • (Boolean)


33
# File 'lib/whop_sdk/models/message.rb', line 33

required :is_edited, WhopSDK::Internal::Type::Boolean

#is_pinnedBoolean

Whether this message is pinned to the top of the channel for easy access.

Returns:

  • (Boolean)


39
# File 'lib/whop_sdk/models/message.rb', line 39

required :is_pinned, WhopSDK::Internal::Type::Boolean

#mentionsArray<String>

A list of user IDs that are explicitly mentioned in this message.

Returns:

  • (Array<String>)


45
# File 'lib/whop_sdk/models/message.rb', line 45

required :mentions, WhopSDK::Internal::Type::ArrayOf[String]

#mentions_everyoneBoolean

Whether the message includes an @everyone mention that notifies all channel members.

Returns:

  • (Boolean)


52
# File 'lib/whop_sdk/models/message.rb', line 52

required :mentions_everyone, WhopSDK::Internal::Type::Boolean

#message_typeSymbol, WhopSDK::Models::DmsPostTypes

The classification of this message: regular, system, or automated.

Returns:



58
# File 'lib/whop_sdk/models/message.rb', line 58

required :message_type, enum: -> { WhopSDK::DmsPostTypes }

#pollWhopSDK::Models::Message::Poll?

A poll attached to this message. Null if the message does not contain a poll.



64
# File 'lib/whop_sdk/models/message.rb', line 64

required :poll, -> { WhopSDK::Message::Poll }, nil?: true

#poll_votesArray<WhopSDK::Models::Message::PollVote>

Aggregated reaction counts on this message, filtered to a specific reaction type.



71
# File 'lib/whop_sdk/models/message.rb', line 71

required :poll_votes, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Message::PollVote] }

#reaction_countsArray<WhopSDK::Models::Message::ReactionCount>

Aggregated reaction counts on this message, filtered to a specific reaction type.



78
# File 'lib/whop_sdk/models/message.rb', line 78

required :reaction_counts, -> { WhopSDK::Internal::Type::ArrayOf[WhopSDK::Message::ReactionCount] }

#replying_to_message_idString?

The unique identifier of the message this post is replying to. Null if this is not a reply.

Returns:

  • (String, nil)


85
# File 'lib/whop_sdk/models/message.rb', line 85

required :replying_to_message_id, String, nil?: true

#updated_atTime

The timestamp when this message was last modified.

Returns:

  • (Time)


91
# File 'lib/whop_sdk/models/message.rb', line 91

required :updated_at, Time

#userWhopSDK::Models::Message::User

The user who authored this message.



97
# File 'lib/whop_sdk/models/message.rb', line 97

required :user, -> { WhopSDK::Message::User }

#view_countInteger?

The number of unique views this message has received. Null if view tracking is not enabled for this channel.

Returns:

  • (Integer, nil)


104
# File 'lib/whop_sdk/models/message.rb', line 104

required :view_count, Integer, nil?: true