export class CommentsCommand extends AbstractCommand {
+ private lastVideoId: number | string
+ private lastThreadId: number
+ private lastReplyId: number
+
listForAdmin (options: OverrideCommandOptions & {
start?: number
count?: number
defaultExpectedStatus: HttpStatusCode.OK_200
}))
+ this.lastThreadId = body.comment.id
+ this.lastVideoId = videoId
+
return body.comment
}
defaultExpectedStatus: HttpStatusCode.OK_200
}))
+ this.lastReplyId = body.comment.id
+
return body.comment
}
+ async addReplyToLastReply (options: OverrideCommandOptions & {
+ text: string
+ }) {
+ return this.addReply({ ...options, videoId: this.lastVideoId, toCommentId: this.lastReplyId })
+ }
+
+ async addReplyToLastThread (options: OverrideCommandOptions & {
+ text: string
+ }) {
+ return this.addReply({ ...options, videoId: this.lastVideoId, toCommentId: this.lastThreadId })
+ }
+
async findCommentId (options: OverrideCommandOptions & {
videoId: number | string
text: string