Skip to main content

Question

Remarks

Note that Help Requests are a type of Question.

Raw

QuestionFeedbackSchema

Extends

Implements

Constructors

new Question()

new Question(data?): Question

Creates a new class instance

Parameters

data?: IBaseMessage

Returns

Question

Inherited from

Message.constructor

Source

src/lib/Wrapper.ts:36

new Question()

new Question(client, data?): Question

Parameters

client: Client

data?: IBaseMessage

Returns

Question

Inherited from

Message.constructor

Source

src/lib/Wrapper.ts:37

Properties

answerCount?

optional readonly answerCount: number

Implementation of

IQuestion.answerCount

Source

src/lib/messages/Question.ts:21


answers?

optional readonly answers: Answer[]

Implementation of

IQuestion.answers

Source

src/lib/messages/Question.ts:22


author?

optional readonly author: User

Implementation of

IQuestion.author

Inherited from

Message.author

Source

src/lib/messages/BaseMessage.ts:34


byVideoAuthor?

optional readonly byVideoAuthor: boolean

Raw

FeedbackSchemaBase.fromVideoAuthor

Implementation of

IQuestion.byVideoAuthor

Inherited from

Message.byVideoAuthor

Source

src/lib/messages/BaseMessage.ts:74


client?

optional client: Client

The client that this base was fetched with.

Inherited from

Message.client

Source

src/lib/Wrapper.ts:15


created?

optional readonly created: Date

Raw

FeedbackSchemaBase.date

Implementation of

IQuestion.created

Inherited from

Message.created

Source

src/lib/messages/BaseMessage.ts:39


deleted?

optional readonly deleted: boolean

Raw

FeedbackSchemaBase.appearsAsDeleted

Implementation of

IQuestion.deleted

Inherited from

Message.deleted

Source

src/lib/messages/BaseMessage.ts:53


encryptedKey?

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

Raw

FeedbackSchemaBase.key

Implementation of

IQuestion.encryptedKey

Inherited from

Message.encryptedKey

Source

src/lib/messages/BaseMessage.ts:48


key?

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

Raw

FeedbackSchemaBase.expandKey

Implementation of

IQuestion.key

Inherited from

Message.key

Source

src/lib/messages/BaseMessage.ts:44


locked?

optional readonly locked: boolean

Raw

FeedbackSchemaBase.isLocked

Implementation of

IQuestion.locked

Inherited from

Message.locked

Source

src/lib/messages/BaseMessage.ts:57


old?

optional readonly old: boolean

Raw

QuestionFeedbackSchema.isOld

Implementation of

IQuestion.old

Source

src/lib/messages/Question.ts:26


pinned?

optional readonly pinned: boolean

Raw

FeedbackSchemaBase.isPinned

Implementation of

IQuestion.pinned

Inherited from

Message.pinned

Source

src/lib/messages/BaseMessage.ts:61


program?

optional readonly program: Program

Implementation of

IQuestion.program

Inherited from

Message.program

Source

src/lib/messages/BaseMessage.ts:35


rawData?

optional rawData: RecursivePartial<FeedbackSchemaBase>

The raw base schema data

Remarks

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

Inherited from

Message.rawData

Source

src/lib/Wrapper.ts:22


replies?

optional readonly replies: Reply[]

Implementation of

IQuestion.replies

Inherited from

Message.replies

Source

src/lib/messages/Message.ts:50


replyCount?

optional readonly replyCount: number

Implementation of

IQuestion.replyCount

Inherited from

Message.replyCount

Source

src/lib/messages/Message.ts:49


score?

optional readonly score: number

Raw

FeedbackSchemaBase.lowQualityScore

Implementation of

IQuestion.score

Inherited from

Message.score

Source

src/lib/messages/BaseMessage.ts:69


selfDownvoted?

optional readonly selfDownvoted: boolean

Raw

FeedbackSchemaBase.downVoted

Implementation of

IQuestion.selfDownvoted

Inherited from

Message.selfDownvoted

Source

src/lib/messages/Message.ts:48


selfFlagged?

optional readonly selfFlagged: boolean

Raw

FeedbackSchemaBase.flaggedByUser

Implementation of

IQuestion.selfFlagged

Inherited from

Message.selfFlagged

Source

src/lib/messages/BaseMessage.ts:79


selfUpvoted?

optional readonly selfUpvoted: boolean

Raw

FeedbackSchemaBase.upVoted

Implementation of

IQuestion.selfUpvoted

Inherited from

Message.selfUpvoted

Source

src/lib/messages/Message.ts:44


text?

optional readonly text: string

Raw

FeedbackSchemaBase.content

Implementation of

IQuestion.text

Inherited from

Message.text

Source

src/lib/messages/BaseMessage.ts:33


verified?

optional readonly verified: boolean

Raw

FeedbackSchemaBase.definitelyNotSpam

Implementation of

IQuestion.verified

Inherited from

Message.verified

Source

src/lib/messages/BaseMessage.ts:65


votes?

optional readonly votes: number

Raw

FeedbackSchemaBase.sumVotesIncremented

Implementation of

IQuestion.votes

Inherited from

Message.votes

Source

src/lib/messages/Message.ts:40


Type

static readonly Type: typeof MessageType = MessageType

Aliases for the message types.

Inherited from

Message.Type

Source

src/lib/messages/Message.ts:35

Accessors

bySelf

get bySelf(): boolean

Checks if the message was written by the client user

Returns

boolean

Source

src/lib/messages/BaseMessage.ts:84


selfVoted

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

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.

Source

src/lib/messages/Message.ts:59


url

get url(): null | string

Returns

null | string

Source

src/lib/messages/BaseMessage.ts:88

Methods

#resolveIdentifier()

private #resolveIdentifier(): `ag5zfmtoYW4tYWNhZGVteX${string}CxIIVXNlckRhdGEi${string}thaWRf${string}${string}${string}` | `kaencrypted_${string}_${string}`

Returns

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

Inherited from

Message.#resolveIdentifier

Source

src/lib/messages/Message.ts:84


byUser()

byUser(user): boolean

Checks if the message was written by the given user

Parameters

user: User

Returns

boolean

Inherited from

Message.byUser

Source

src/lib/messages/BaseMessage.ts:138


copy()

copy(question): Question

Updates data into the class

Parameters

question: IQuestion

The data to copy from

Returns

Question

The class instance

Overrides

Message.copy

Source

src/lib/messages/Question.ts:60


copyFromSchema()

copyFromSchema(schema): Question

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

Source

src/lib/Wrapper.ts:65


get()

get(client): Promise<Question>

Gets and updates the instance's data

Parameters

client: Client= undefined

The API client to use

Returns

Promise<Question>

Inherited from

Message.get

Source

src/lib/messages/Message.ts:109


getAllReplies()

getAllReplies(client): Promise<Question>

Parameters

client: Client= undefined

Returns

Promise<Question>

Inherited from

Message.getAllReplies

See

Client.getAllMessageReplies

Source

src/lib/messages/Message.ts:134


getReplies()

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

Parameters

client: Client= undefined

limit?: number

Returns

AsyncGenerator<Reply[], Question, unknown>

Inherited from

Message.getReplies

See

Client.getMessageReplies

Source

src/lib/messages/Message.ts:118


is()

is(message): boolean

Checks if the message is the same as the given message

Parameters

message: IBaseMessage | BaseMessage

Returns

boolean

Inherited from

Message.is

Source

src/lib/messages/BaseMessage.ts:145


isSchema()

isSchema(schema): boolean

Checks if the schema represents the same instance

Parameters

schema: RecursivePartial<FeedbackSchemaBase>

Returns

boolean

Inherited from

Message.isSchema

Source

src/lib/Wrapper.ts:88


transformSchema()

transformSchema(schema): IQuestion

Parameters

schema: RecursivePartial<QuestionFeedbackSchema>

Returns

IQuestion

Overrides

Message.transformSchema

Source

src/lib/messages/Question.ts:44


fromIdentifier()

static fromIdentifier(identifier): Question

Parameters

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

Returns

Question

Overrides

Message.fromIdentifier

Source

src/lib/messages/Question.ts:35


fromSchema()

static fromSchema(schema): Question

Parameters

schema: RecursivePartial<QuestionFeedbackSchema>

Returns

Question

Overrides

Message.fromSchema

Source

src/lib/messages/Question.ts:28