X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Ftwitch-bot%2FControls.js;h=394f5464c6369ec4049d342861a287396bb468f1;hb=f0d1a566f5afd76ab7a56b295b71d5756dfd2bc3;hp=9c5701ef8fb5336eb246ad089a991eed6b45567f;hpb=13ffde5b2abcf831af9c794044350737066c5933;p=alttp.git diff --git a/resources/js/components/twitch-bot/Controls.js b/resources/js/components/twitch-bot/Controls.js index 9c5701e..394f546 100644 --- a/resources/js/components/twitch-bot/Controls.js +++ b/resources/js/components/twitch-bot/Controls.js @@ -18,11 +18,18 @@ const CHAT_CATEGORIES = [ 'hi', 'gl', 'gg', + 'eyes', 'love', 'lol', + 'yes', + 'no', + 'rage', + 'sad', + 'sweat', 'wtf', 'pog', 'hype', + 'kappa', 'o7', 'question', 'thx', @@ -61,6 +68,18 @@ const Controls = () => { } }, [channel, chatText, t]); + const adlibChat = React.useCallback(async () => { + try { + await axios.post(`/api/channels/${channel.id}/chat`, { + bot_nick: 'horstiebot', + adlib: true, + }); + toastr.success(t('twitchBot.chatSuccess')); + } catch (e) { + toastr.error(t('twitchBot.chatError')); + } + }, [channel, chatText, t]); + const join = React.useCallback(async (bot_nick) => { try { const rsp = await axios.post(`/api/channels/${channel.id}/join`, { bot_nick }); @@ -240,6 +259,16 @@ const Controls = () => { )} +
+ +

{t('twitchBot.adlibChatNote')}

+