mirror of
https://github.com/qwerinope/qweribot.git
synced 2025-12-20 05:51:39 +01:00
change sendMessage wrapper, migrate from websocket connection to webhook for EventSub (reverse proxy)
This commit is contained in:
@@ -37,6 +37,6 @@ export { intents };
|
||||
import { singleUserMode, chatterApi, chatterId, streamerId } from "..";
|
||||
|
||||
/** Helper function to send a message to the stream */
|
||||
export const sendMessage = async (message: string, options?: HelixSendChatMessageParams) => {
|
||||
singleUserMode ? await chatterApi.chat.sendChatMessage(streamerId, message, options) : chatterApi.asUser(chatterId, async newapi => newapi.chat.sendChatMessage(streamerId, message, options));
|
||||
export const sendMessage = async (message: string, replyParentMessageId?: string) => {
|
||||
singleUserMode ? await chatterApi.chat.sendChatMessage(streamerId, message, { replyParentMessageId }) : chatterApi.asUser(chatterId, async newapi => newapi.chat.sendChatMessage(streamerId, message, { replyParentMessageId }));
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user