mirror of
https://github.com/qwerinope/qweribot.git
synced 2025-12-19 08:41:39 +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 */
|
/** Helper function to send a message to the stream */
|
||||||
export const sendMessage = async (message: string, replyParentMessageId?: string) => {
|
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