Skip to main content

Question

Defined in: src/lib/messages/Question.ts:20

Remarks

Note that Help Requests are a type of Question.

Raw

QuestionFeedbackSchema

Extends

Implements

Constructors

new Question()

new Question(data?): Question

Defined in: src/lib/Wrapper.ts:36

Creates a new class instance

Parameters

data?

IBaseMessage

Returns

Question

Inherited from

Message.constructor

new Question()

new Question(client, data?): Question

Defined in: src/lib/Wrapper.ts:37

Parameters

client

Client

data?

IBaseMessage

Returns

Question

Inherited from

Message.constructor

Properties

answerCount?

readonly optional answerCount: number

Defined in: src/lib/messages/Question.ts:21

Implementation of

IQuestion.answerCount


answers?

readonly optional answers: Answer[]

Defined in: src/lib/messages/Question.ts:22

Implementation of

IQuestion.answers


author?

readonly optional author: User

Defined in: src/lib/messages/BaseMessage.ts:34

Implementation of

IQuestion.author

Inherited from

Message.author


byVideoAuthor?

readonly optional byVideoAuthor: boolean

Defined in: src/lib/messages/BaseMessage.ts:74

Raw

FeedbackSchemaBase.fromVideoAuthor

Implementation of

IQuestion.byVideoAuthor

Inherited from

Message.byVideoAuthor


client?

optional client: Client

Defined in: src/lib/Wrapper.ts:15

The client that this base was fetched with.

Inherited from

Message.client


created?

readonly optional created: Date

Defined in: src/lib/messages/BaseMessage.ts:39

Raw

FeedbackSchemaBase.date

Implementation of

IQuestion.created

Inherited from

Message.created


deleted?

readonly optional deleted: boolean

Defined in: src/lib/messages/BaseMessage.ts:53

Raw

FeedbackSchemaBase.appearsAsDeleted

Implementation of

IQuestion.deleted

Inherited from

Message.deleted


encryptedKey?

readonly optional encryptedKey: `kaencrypted_${string}_${string}`

Defined in: src/lib/messages/BaseMessage.ts:48

Raw

FeedbackSchemaBase.key

Implementation of

IQuestion.encryptedKey

Inherited from

Message.encryptedKey


key?

readonly optional key: `ag5zfmtoYW4tYWNhZGVteX${string}CxIIVXNlckRhdGEi${string}thaWRf${string}${string}${string}`

Defined in: src/lib/messages/BaseMessage.ts:44

Raw

FeedbackSchemaBase.expandKey

Implementation of

IQuestion.key

Inherited from

Message.key


locked?

readonly optional locked: boolean

Defined in: src/lib/messages/BaseMessage.ts:57

Raw

FeedbackSchemaBase.isLocked

Implementation of

IQuestion.locked

Inherited from

Message.locked


old?

readonly optional old: boolean

Defined in: src/lib/messages/Question.ts:26

Raw

QuestionFeedbackSchema.isOld

Implementation of

IQuestion.old


pinned?

readonly optional pinned: boolean

Defined in: src/lib/messages/BaseMessage.ts:61

Raw

FeedbackSchemaBase.isPinned

Implementation of

IQuestion.pinned

Inherited from

Message.pinned


program?

readonly optional program: Program

Defined in: src/lib/messages/BaseMessage.ts:35

Implementation of

IQuestion.program

Inherited from

Message.program


rawData?

optional rawData: RecursivePartial<FeedbackSchemaBase>

Defined in: src/lib/Wrapper.ts:22

The raw base schema data

Remarks

Only set if the base was created from a user schema.

Inherited from

Message.rawData


replies?

readonly optional replies: Reply[]

Defined in: src/lib/messages/Message.ts:50

Implementation of

IQuestion.replies

Inherited from

Message.replies


replyCount?

readonly optional replyCount: number

Defined in: src/lib/messages/Message.ts:49

Implementation of

IQuestion.replyCount

Inherited from

Message.replyCount


score?

readonly optional score: number

Defined in: src/lib/messages/BaseMessage.ts:69

Raw

FeedbackSchemaBase.lowQualityScore

Implementation of

IQuestion.score

Inherited from

Message.score


selfDownvoted?

readonly optional selfDownvoted: boolean

Defined in: src/lib/messages/Message.ts:48

Raw

FeedbackSchemaBase.downVoted

Implementation of

IQuestion.selfDownvoted

Inherited from

Message.selfDownvoted


selfFlagged?

readonly optional selfFlagged: boolean

Defined in: src/lib/messages/BaseMessage.ts:79

Raw

FeedbackSchemaBase.flaggedByUser

Implementation of

IQuestion.selfFlagged

Inherited from

Message.selfFlagged


selfUpvoted?

readonly optional selfUpvoted: boolean

Defined in: src/lib/messages/Message.ts:44

Raw

FeedbackSchemaBase.upVoted

Implementation of

IQuestion.selfUpvoted

Inherited from

Message.selfUpvoted


text?

readonly optional text: string

Defined in: src/lib/messages/BaseMessage.ts:33

Raw

FeedbackSchemaBase.content

Implementation of

IQuestion.text

Inherited from

Message.text


verified?

readonly optional verified: boolean

Defined in: src/lib/messages/BaseMessage.ts:65

Raw

FeedbackSchemaBase.definitelyNotSpam

Implementation of

IQuestion.verified

Inherited from

Message.verified


votes?

readonly optional votes: number

Defined in: src/lib/messages/Message.ts:40

Raw

FeedbackSchemaBase.sumVotesIncremented

Implementation of

IQuestion.votes

Inherited from

Message.votes


Type

readonly static Type: typeof MessageType = MessageType

Defined in: src/lib/messages/Message.ts:35

Aliases for the message types.

Inherited from

Message.Type

Accessors

bySelf

Get Signature

get bySelf(): boolean

Defined in: src/lib/messages/BaseMessage.ts:84

Checks if the message was written by the client user

Returns

boolean

Inherited from

Message.bySelf


selfVoted

Get Signature

get selfVoted(): null | 1 | 0 | -1

Defined in: src/lib/messages/Message.ts:59

See
Returns

null | 1 | 0 | -1

1 if the message was upvoted by the user, -1 if it was downvoted, and 0 if it was not voted on. null if the user is not logged in.

Inherited from

Message.selfVoted


url

Get Signature

get url(): null | string

Defined in: src/lib/messages/BaseMessage.ts:88

Returns

null | string

Inherited from

Message.url

Methods

byUser()

byUser(user): boolean

Defined in: src/lib/messages/BaseMessage.ts:138

Checks if the message was written by the given user

Parameters

user

User

Returns

boolean

Inherited from

Message.byUser


copy()

copy(question): Question

Defined in: src/lib/messages/Question.ts:60

Updates data into the class

Parameters

question

IQuestion

Returns

Question

The class instance

Overrides

Message.copy


copyFromSchema()

copyFromSchema(schema): Question

Defined in: src/lib/Wrapper.ts:65

Updates data from a schema into the instance

Parameters

schema

RecursivePartial<FeedbackSchemaBase>

The schema to copy from

Returns

Question

The class instance

Inherited from

Message.copyFromSchema


get()

get(client): Promise<Question>

Defined in: src/lib/messages/Message.ts:109

Gets and updates the instance's data

Parameters

client

Client = ...

The API client to use

Returns

Promise<Question>

Inherited from

Message.get


getAllReplies()

getAllReplies(client): Promise<Question>

Defined in: src/lib/messages/Message.ts:134

Parameters

client

Client = ...

Returns

Promise<Question>

See

Client.getAllMessageReplies

Inherited from

Message.getAllReplies


getReplies()

getReplies(client, limit?): AsyncGenerator<Reply[], Question, unknown>

Defined in: src/lib/messages/Message.ts:118

Parameters

client

Client = ...

limit?

number

Returns

AsyncGenerator<Reply[], Question, unknown>

See

Client.getMessageReplies

Inherited from

Message.getReplies


is()

is(message): boolean

Defined in: src/lib/messages/BaseMessage.ts:145

Checks if the message is the same as the given message

Parameters

message

IBaseMessage | BaseMessage

Returns

boolean

Inherited from

Message.is


isSchema()

isSchema(schema): boolean

Defined in: src/lib/Wrapper.ts:88

Checks if the schema represents the same instance

Parameters

schema

RecursivePartial<FeedbackSchemaBase>

Returns

boolean

Inherited from

Message.isSchema


transformSchema()

transformSchema(schema): IQuestion

Defined in: src/lib/messages/Question.ts:44

Transforms a API schema into an abstracted interface

Parameters

schema

RecursivePartial<QuestionFeedbackSchema>

The schema to transform

Returns

IQuestion

Overrides

Message.transformSchema


fromIdentifier()

static fromIdentifier(identifier): Question

Defined in: src/lib/messages/Question.ts:35

Parameters

identifier

`ag5zfmtoYW4tYWNhZGVteX${string}CxIIVXNlckRhdGEi${string}thaWRf${string}${string}${string}` | `kaencrypted_${string}_${string}`

Returns

Question

Overrides

Message.fromIdentifier


fromSchema()

static fromSchema(schema): Question

Defined in: src/lib/messages/Question.ts:28

Parameters

schema

RecursivePartial<QuestionFeedbackSchema>

Returns

Question

Overrides

Message.fromSchema