

This discord bot uses MariaDB and Redis for its databases.
#Owo translate bot free#
It’s just a simple manifest.json file which tells the browser which JavaScript file to load and on which websites.Here are the codes for OwO Bot! Feel free to submit an issue or open a pull request! Self hosting Last but not least, the Chrome extension provides a convenient way to inject this into Twitch pages on the fly. If( = 0 || msg.innerText = ' ') continue // empty, no translation Within the added node list provided by the mutator the script searches for these text components by the data field and “OwO”‘s them: let fragments = node.querySelectorAll("") The child text components of the message, potentially separated by emotes, all contain the data-a-target="chat-message-text" field. This parent element contains all of the message data including the timestamp, username, message, and emotes. The mutation observer reports when nodes are added to the page, and the script searches through these to find the chat messages.Īll message containers have a data-a-target="chat-line-message" field. After the extension imports the owo module, it then creates a MutationObserver object to track changes to the page (document). The Twitch message parsing is handled in vanilla JavaScript.
#Owo translate bot code#
HIIII! I haz nu mouth and I must scweam XDDDĬonsole.log(owo.translate('I have no mouth and I must scream'))Īs Node.js modules are not made to be used client-side, I used browserify to pack the Twitch parsing code and the owo module into a deployable script: browserify main.js -o twitchowo.js Twitch Parsing This Node.js module also imports the random-item and replace-string modules and can be downloaded, with dependencies, via the Node package manager (NPM): npm i can then be translated into “OwO” by requiring the module and calling the owo function: const owo = have no mouth and I must scream')) This uses the JavaScript owo translator module from the Bweaking NuwuS documentation to handle the OwO translation. I’m not a web developer by trade and this was thrown together in an evening, so forgive me if anything is out-of-sorts. There are three parts to this: the OwO translation, the Twitch chat parsing, and the Chrome extension that ties it all together. (⌒‿⌒) How It Works The package for Node.js Usernames in this screenshot are hidden for their own protection. Usernames, mentions ( pings), and emotes in each message are not translated, and neither are chat-adjacent things such as subscription alerts, raids, and point redemptions. The extension is loaded with the chat window and translates all messages as they are received.

Here it is in all its glory: Twitch Chat OwO! It’s a Chrome extension that converts all chat messages to cutesy “OwO”-speak. Although since it’s adoption by the furry community, particularly in regards to sexual roleplay, these emoticons are more often than not used ironically. “OwO”, “UwU”, and other kaomoji are often used to make text seem ‘cute’ (◕‿◕). Uwu is likely a simplified form of such kaomoji as (o・ω・o). Kaomoji are considered kawaii, or “cute,” and often draw on anime and manga. Uwu is connected to kaomoji, a type of Japanese emoticon which incorporates special characters used in Japanese writing. The overall effect is meant to look cute, depicting a face of someone feeling all warm and fuzzy-as if the eyes are closed and the nose and mouth are scrunched up in a playful, smiling “Aww!” As for owo, the o‘s depict eyes wide open with surprise. In the case of uwu, the u is supposed to represent eyes and w, the mouth. Both “OwO” and “UwU” are emoticons, “used to express warm, happy, or affectionate feelings.” According to : OwO what’s this?įirst a little background. The result is some serious dark comedy, with posts about corruption, sickness, and death translated into something exceedingly saccharine.Īfter reading a bit about the automation behind the news account, I thought it would be fun to do something similar and make a browser extension to convert Twitch chat into “OwO”-speak on the fly. Thankfully there’s a solution: “Bweaking NuwuS” ( a Twitter account that posts news stories passed through an “UwU” kaomoji filter to make them “cutesy”. Just the pandemic alone is enough to make you want to never read the news again.
