X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=resources%2Fjs%2Fcomponents%2Ftwitch-bot%2FControls.js;h=394f5464c6369ec4049d342861a287396bb468f1;hb=f0d1a566f5afd76ab7a56b295b71d5756dfd2bc3;hp=f3f551cb9ca4e1fd8ca4f1ffe320ef162bb9649d;hpb=a45390fd150b79014088b343591dc701dfe89c13;p=alttp.git diff --git a/resources/js/components/twitch-bot/Controls.js b/resources/js/components/twitch-bot/Controls.js index f3f551c..394f546 100644 --- a/resources/js/components/twitch-bot/Controls.js +++ b/resources/js/components/twitch-bot/Controls.js @@ -21,12 +21,15 @@ const CHAT_CATEGORIES = [ 'eyes', 'love', 'lol', + 'yes', + 'no', 'rage', 'sad', 'sweat', 'wtf', 'pog', 'hype', + 'kappa', 'o7', 'question', 'thx', @@ -65,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 }); @@ -244,6 +259,16 @@ const Controls = () => { )} +
+ +

{t('twitchBot.adlibChatNote')}

+