Skip to content

Instantly share code, notes, and snippets.

View Cronnay's full-sized avatar

Sebastian Berglönn Cronnay

View GitHub Profile
### Keybase proof
I hereby claim:
* I am Cronnay on github.
* I am sebastianberglon (https://keybase.io/sebastianberglon) on keybase.
* I have a public key whose fingerprint is 001D 290A D7D0 1DB4 F9FF 46DF A2FE FDD1 E2D7 9BDE
To claim this, I am signing this object:
//on chat
client.on("chat", (channel, userstate, message, self) => {
//channel is which channel it comes from. Not very usable if you are in one channel only.
//Userstate is an object which contains a lot of information, if the user who wrote is a subscriber, what emotes he used etc.
//message is the message itself.
//self is your bot.
if(self) return; //If your bot wrote something, then ignore it because you dont want to listen to your own messages
if((message.toLowerCase()).includes("noxtroz")){ //using string.includes is case-sensitive, so it is better to just make it lowercase
const tmi = require("tmi.js");
const options = require("./options"); //Your options file
//Connect to twitch server
const client = new tmi.client(options);
client.connect();
const options = {
options: {
debug: true
},
connection: {
reconnect: true
},
identity: {
username: "Noxtroz",
password: "oauth:alotofsigns"