mirror of
https://github.com/qwerinope/qweribot.git
synced 2025-12-18 15:01:38 +01:00
when cannot reply, send message normally
This commit is contained in:
@@ -68,5 +68,9 @@ import { chatterApi, chatterId, streamerId } from "main";
|
||||
|
||||
/** Helper function to send a message to the stream */
|
||||
export const sendMessage = async (message: string, replyParentMessageId?: string) => {
|
||||
return await chatterApi.chat.sendChatMessageAsApp(chatterId, streamerId, message, { replyParentMessageId })
|
||||
try {
|
||||
return await chatterApi.chat.sendChatMessageAsApp(chatterId, streamerId, message, { replyParentMessageId });
|
||||
} catch (e) {
|
||||
return await chatterApi.chat.sendChatMessageAsApp(chatterId, streamerId, message);
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user