Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/parser/youtube/LiveChat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { InnertubeError, Platform, u8ToBase64 } from '../../utils/Utils.js';
import { LiveChatContinuation, Parser } from '../index.js';
import SmoothedQueue from './SmoothedQueue.js';

import RunAttestationCommand from '../classes/commands/RunAttestationCommand.js';
import AddChatItemAction from '../classes/livechat/AddChatItemAction.js';
import UpdateDateTextAction from '../classes/livechat/UpdateDateTextAction.js';
import UpdateDescriptionAction from '../classes/livechat/UpdateDescriptionAction.js';
Expand Down Expand Up @@ -251,15 +252,15 @@ export default class LiveChat extends EventEmitter {
* Sends a message.
* @param text - Text to send.
*/
async sendMessage(text: string): Promise<ObservedArray<AddChatItemAction>> {
async sendMessage(text: string): Promise<ObservedArray<AddChatItemAction | RunAttestationCommand>> {
const writer = LiveMessageParams.encode({
params: {
ids: {
videoId: this.#video_id,
channelId: this.#channel_id
}
},
number0: 1,
number0: 1,
number1: 4
});

Expand All @@ -276,7 +277,7 @@ export default class LiveChat extends EventEmitter {
if (!response.actions)
throw new InnertubeError('Unexpected response from send_message', response);

return response.actions.array().as(AddChatItemAction);
return response.actions.array().as(AddChatItemAction, RunAttestationCommand);
}

/**
Expand Down