olafmoriarty / blue-bots-done-quick

A version of Cheap Bots, Done Quick written for Bluesky
Apache License 2.0
13 stars 1 forks source link

new feature: custom replies based on post content #12

Open olafmoriarty opened 2 weeks ago

olafmoriarty commented 2 weeks ago

It should be able to customize which replies people communicating with the bot receive.

For example, in the form of "If reply contains the word 'foo', return #foo#; else if reply contains the word 'bar', return #rhabarberbarbara#; else return #default#"

alien-sunset commented 2 weeks ago

i dunno if you've looked, but this is how CBTS displays the reply options:

image

that might help you decide how to lay things out.

olafmoriarty commented 2 weeks ago

i dunno if you've looked, but this is how CBTS displays the reply options:

Urk. I knew I'd seen it done before (I assumed it was CBDQ and not CBTS), but I assumed they used plain text keys and not regular expressions. Why on earth would they do that...

I mean, regular expressions aren't super hard, but they can be quite complex, and that's one more programming-heavy thing people have to learn to use the service, which I would really prefer to keep as simple as possible. I was planning on using plain text, but if I'm doing it different from CBTS it will be confusing for people who use both, which is a pity, because doing this without regex would make so much more sense.

I have to think about this.

alien-sunset commented 2 weeks ago

from some other tutorials I've seen out there, CBDQ did it the same way which is probably why CBTS chose it :: shrug emoji ::

but either way, if someone is learning enough tracery to make a bot, then something like this probably won't be that much more difficult.