« first day (622 days earlier)      last day (3067 days later) » 

7:10 PM
@Ϻ.Λ.Ʀ. you can choose
@FOX9000 combo
 
@ShadowWizard jazz
 
@FOX9000 jizz
 
No associated word found for jizz.
 
>>continue pants
 
@berserk 2 arguments expected, 1 given.
 
7:15 PM
lol
 
>>viewspells257207
 
@UNIKITTY2.0 Command not found. Did you mean: viewspells?
 
>>viewspells 257207
 
@UNIKITTY2.0 UNIKITTY 2.0 has not earned any spells yet.
 
>>continue jizz pants
 
7:17 PM
@ShadowWizard pants
 
7:31 PM
Well night!
 
night!
 
night!
 
night!
 
8:18 PM
Hi everyone! :D
 
Welcome back @NiKo
Are you bot now?
 
not yet :)
 
lol
Can't tell with all the bots around here :D
 
I created bot
 
Cool!
 
8:19 PM
but with 5 lines of code xD
long lines :)
 
You can test it in the sandbox too

Sandbox

Formatting Sandbox
 
ok
 
Though no problem putting it here too when it's not crowded. ;)
 
message delay is 5 min
Now i must to wait 5 minutes :o
name of chatbot (catbot) is NBOT
 
lol
How is it activated?
 
8:24 PM
trought console
with a code
 
9:15 PM
>>
 
@NiKoLaPrO Command not found.
 
>>listallcommands
 
@NiKoLaPrO Command not found. Did you mean: listcommands?
 
>>listcommands
 
Commands:
alive, utc, listcommands, help, cat, read, getcurrentusers, ping, flip, doubleflip, xkcdrandomnumber, xkcd, random, randomint, randomchoice, shuffle, detectlang, translate, translationchain, translationswitch, stop, disable, enable, ban, unban, delete, module, define, time, showtime, link, islink, removelink, addlinkexplanation, explainlink, removelinkexplanation, viewspells, showlatest10, latestword, lastword, setlatestword, rmword, reply, retry, continue, award, emptyqueue, removespell, gameban, gameunban
 
9:16 PM
>>cat
 
@NiKoLaPrO Argument parsing failed.
 
>>cat Hi
 
@NiKoLaPrO Hi
 
>>help
 
@NiKoLaPrO I'm FOX 9000, ProgramFOX's chatbot. You can find the source code on GitHub. You can get a list of all commands by running >>listcommands, or you can run >>help command to learn more about a specific command.
 
9:42 PM
@ShadowWizard you there?
 
@NiKoLaPrO no, I'm here ;)
@Pro maybe a more friendly error message for this, e.g. "No arguments given"? :)
 
:)
one question
how i can create command with script u gave me?
$.post('http://chat.stackoverflow.com/chats/' + $("input[name='room']").val() + '/messages/new', {text: '[CBOT] Hello everyone! Please read rules', fkey: fkey().fkey});
 
@NiKoLaPrO no easy way, I'm afraid.
 
oh
 
You'll have to listen for new messages first
Then parse those messages
You have it in the jsfiddle I gave you
Very basic, but working.
 
9:51 PM
ok
 
Though my code is not elegant, ProgramFOX gave a better way, using sockets
All in all, you'll have to work on this for a while :)
And if you want "real" bot, like @FOX9000 - you have to do that server side, using the API etc
 
ok, ty :)
 
yw ;)
haha, remind me of my first days in chat ~15 years ago, with a/s/l
 
This?
var wsAuthRequest = new XMLHttpRequest();
var roomId = 1; // change this if necessary
wsAuthRequest.onreadystatechange = function() {
if (wsAuthRequest.readyState == XMLHttpRequest.DONE) {
console.log(wsAuthRequest.responseText);
var json = JSON.parse(wsAuthRequest.responseText);
var wsUrl = json['url'] + "?l=" + Date.now();
var socket = new WebSocket(wsUrl);
socket.onopen = function() { console.log('Socket opened!'); }
socket.onmessage = function(e) {
var parsed = JSON.parse(e.data);
if (parsed['r' + roomId] !== undefined) {
 
:D
@NiKoLaPrO yup, this indeed
Instead of just logging the posted message, parse it and if starting with @CBOT for example, run the command or just reply back
 
9:55 PM
ok
works, i saw "Socket opened!" in console
 
xd
@ShadowWizard is there a way to make command with "if" function?
 
@NiKoLaPrO sure, something like if (eventJson['content'] == 'foo') { alert('bar'); }
 
ok
 
foo
Now having such code, this should trigger alert on your side ^
 
10:19 PM
if (eventJson['content'] == 'bar') { fdisk('C'); }
bar
 
10:33 PM
lol
 
@ShadowWizard how to display username?
I want to display username but everyone will get their username in message
if you understand me
 
@NiKoLaPrO nope... what user name to display?
 
every username each
smth like that
like @NiKoLaPrO
 
Just parse the response, e.g. if (eventJson['content'].split(' ')[0] == '@NiKoLaPrO')
 
@Moosebot salute
 
user280395
10:45 PM
@Mooseman SIR, YES SIR! 21-gun salute now commencing...
 
long time no bot, @Moo :D
@Moosebot cow
 
user280395
 
Hey @Shadow haha :)
 
@Moosebot cow
 
user280395
 
10:47 PM
@Moosebot kill @NiKoLaPrO
 
nice :D
 
user280395
> @NiKoLaPrO was killed by Col. Mustard with the Wrench in the Billiard Room.
 
@Moosebot kill @ShadowWizard
 
user280395
> @ShadowWizard suddenly erupted into flames. :'(
 
@Moosebot unkill @ShadowWizard
 
user280395
10:48 PM
> @ShadowWizard has been unkilled. They will be able to chat again in 6-8 weeks.
 
afk -- but the bot is not *evil laugh
 
hehe :D
@Moosebot help
 
user280395
@NiKoLaPrO Long story short, Mooseman decided to write a bot. I am written in JS and run as a Chrome extension. Github repo and a purpose for my existence coming soon. (I also process close votes for privileged users.)
 
@Mooseman @NiKo here is trying to make a bot too, maybe share some code with him? ;)
 
@ShadowWizard Of course :)
@NiKoLaPrO What do you have so far?
 
10:50 PM
:DDDDD
nothin
 
What do you want it to do?
I don't have the source at hand atm btw but I can post it later
atm it will only listen/respond
 
Well, i want classic commands like @NBOT help, @NBOT hug, and something like that
 
@Moosebot help
 
user280395
@Mooseman Command not recognized.
 
user280395
@Mooseman Long story short, Mooseman decided to write a bot. I am written in JS and run as a Chrome extension. Github repo and a purpose for my existence coming soon. (I also process close votes for privileged users.)
 
10:51 PM
Does that help you @niko?
 
yes
How to create something like that?
 
Ping me and I'll fetch the source code for ya
Or if you just want to help add commands to MooseBot I'm all for that too lol
 
:D
add @Moosebot hug
 
@Moosebot banana
 
user280395
 
10:53 PM
@Moosebot pizza
 
:D
 
user280395
 
afk now -- I'll add that later lol :) Give me some example i/o
Ping it to me haha
 
@Moosebot wake @berserk and @Ϻ.Λ.Ʀ.
 
afk
 
user280395
10:53 PM
> @berserk and @Ϻ.Λ.Ʀ. just had their bed dropped into a bull fighting arena.
 
:)
 
@Moosebot pony
 
user280395
 
user280395
Hint: Try donuts
 
@Moosebot commands
 
user280395
10:54 PM
@NiKoLaPrO Command not recognized.
 
:D
 
@Moosebot donuts plz
 
user280395
 
hahahhaha
 
10:54 PM
:D
Got to go too now, have fun with the bot @NiKo :D
 
ok, bye :D
have a nice day! :)
 

« first day (622 days earlier)      last day (3067 days later) »