Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var settings = {
- channels : ["#pukateiubeste", "#mr_ari"],
- server : "irc.twitch.tv",
- port: 6667,
- secure: false,
- nick : "pukateiubestebott",
- password : "<scam>"
- }
- var irc = require("irc");
- var bot = new irc.Client(settings.server, settings.nick, {
- channels: [settings.channels + " " + settings.password],
- debug: false,
- password: settings.password,
- username: settings.nick
- });
- var fs = require('fs');
- var contents = fs.readFileSync("log.txt")
- bot.addListener("message", function (nick,to,text,message) {
- var x = (nick + ": " + text);
- console.log(nick + ": " + text)
- fs.writeFileSync("log.txt", nick + ": " + text + "\r\n", { flag: "a" })
- });
- bot.addListener("message", function (from, to, text, message) {
- if (text === "!puka"){
- bot.say(to, "/me Puka is an 'awesome' guy who mostly stay on #mr_ari channel");
- return;
- }
- });
- bot.addListener("message", function (from, to, text, message) {
- if (text === "!ari"){
- bot.say(to, "/me Ari is a awesome guy that mostly stream Game Development!")
- }
- });
- bot.addListener("message", function (nick, to, text, message) {
- if (text === "!awesome"){
- bot.say(to, "/me Yes " + nick + " you are awesome <3 ")
- }
- // body...
- });
- bot.addListener("message", function (from, to, text, message) {
- // body...
- if (text === "!jscode"){
- bot.say(to, "/me source code for js bot --> ")
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement