Zirak / SO-ChatBot

Other
124 stars 60 forks source link

'register' command for other commands. #107

Open rlemon opened 11 years ago

rlemon commented 11 years ago

I just thought it would be nice to register information associated to your account and some of the commands. There is no better way to explain this than by using examples:

!!register weather kitchener ontario would register that location for my username. Then if I just ran !!weather it would return for the registered location. Likewise if someone ran !!weather rlemon it would return the weather information for my registered location.

I can also see this being used with trivial (unmade) commands like 'birthday' -> having it remind us of your birthday with one of a number of catchy jingles.

atm I am having a brain fart and can no longer think of the other commands this might be useful for. But there it is, feel free to comment and stuff.

ralt commented 11 years ago

More generally, you want an alias system? Like !!alias create weather weather Kitchener and it'd save an alias for you.

rlemon commented 11 years ago

That would also be nice (maybe) but this would be more of a 'register this information for the user'

if they were just aliases, 1) I can see the command list getting way too bloated, 2) if they were only stored per user, they wouldn't be useful for others looking for information on them (see notes about weather command with your name being called from another user)

Some other commands it might be useful for are: convert <= enter your default units (!!register convert kg -> !!convert 2lb) history <= register a date important to you (birthday, joined date, etc)

and it could also be useful for future commands which we have not thought up yet :P maybe once we get node.js port working we can have a !!pm command that will send an email to said user. This would require the user registers an email address with the command. Just thinking out loud.

rlemon commented 11 years ago

on second thought the pm command is stupid, disregard.

notpushkin commented 11 years ago

That would be way too complicated. Why (if we have a node.js port) not just create a simple web interface to do so?

AmaanC commented 11 years ago

Yep, I think @rlemon's idea for registering default arguments in these commands is a pretty good one.

On Fri, Oct 25, 2013 at 11:19 PM, Robert Lemon notifications@github.comwrote:

That would also be nice (maybe) but this would be more of a 'register this information for the user'

if they were just aliases, 1) I can see the command list getting way too bloated, 2) if they were only stored per user, they wouldn't be useful for others looking for information on them (see notes about weather command with your name being called from another user)

Some other commands it might be useful for are: convert <= enter your default units (!!register convert kg -> !!convert 2lb) history <= register a date important to you (birthday, joined date, etc)

and it could also be useful for future commands which we have not thought up yet :P maybe once we get node.js port working we can have a !!pm command that will send an email to said user. This would require the user registers an email address with the command. Just thinking out loud.

— Reply to this email directly or view it on GitHubhttps://github.com/Zirak/SO-ChatBot/issues/107#issuecomment-27112307 .

rlemon commented 11 years ago

the node.js port is to take away the web browser so the bot can run on a server.

notpushkin commented 11 years ago

Also, why don't fetch some info from user's profile?

Zirak commented 11 years ago

I've actually toyed with the idea for a long time, but thought of a different (non-command, regexp based) interface. It'd work better if we had an actual db, but, well...

!!I live in Waterloo
Ok @Bob, you live in Waterloo.
!!I was born on March 25
That's good to know @Bob

(or something like that) Fetching that default info about users will be pretty trivial, it's just a simple "if exists then fetch else error", so that Bob can do

!!weather
[as if he did !!weather Waterloo]

Building on that...it'd be interesting to do male/female and be able to construct sentences accordingly. For instance, if Bob says

!!I am male
@Bob So you *were* happy to see me

Then something like this can happen:

 !!learn yermother "$0 isn't available right now, $heshe($0) is busy having sex with your mother"
 !!yermother Bob
 Bob isn't available right now, he is busy having sex with your mother.

Or of the sorts, and it'd be even more interesting if they can be used as standalone variables:

@Bob tried to hang $himherself, but was such a miserable failure, $heshe was did not accomplish that too.

And it determined the gender based on $who, the person who invoked the command. This can be extended as far as we want, taking inspiration maybe from Bucket.

It's things I've been thinking about for some time, but didn't want to do them until we moved away from localStorage as a long-term db. And of course I forgot to put them in the roadmap. Whoops.

rlemon commented 11 years ago

so, great minds thing alike? pumps arm in victory! I am on Ziraks level now you peons