XVMX / vmbot

Jabberbot based chatbot
GNU General Public License v3.0
2 stars 5 forks source link

Send replies with many lines via pm instead of channel #34

Closed ThirteenFish closed 8 years ago

ThirteenFish commented 9 years ago

It's 2015, all the cool kids use github issues instead of TODO files

Which commands?

SwimlanesOnline commented 9 years ago

FAQ is useful in muc, especially if you want to invoke a FAQ reply but show someone/multiple other people the result and not get it for yourself. A general "if the reply exceeds x chars, pm it" thing would be nice, which always works. But that's probably for the core. It should be overwritable in a command (e. G. To make muc FAQ replies possible) but otherwise work automatically. It would be useful to also have the bot react upon pm commands, at least right now it doesn't seem to work.

The last thing remaining I'd like to see replied in pm is the help command.

TheJokr commented 9 years ago

help is just a bot command like every other one (see https://github.com/Hijacker/vmbot/blob/master/jabberbot.py#L640), pretty easy to implement a PM reply there. Modifying the decorator or adding a new one would probably be the easiest solution though.

ThirteenFish commented 9 years ago

The bot does not respond to PMs because solodrakbansolodrakbansolodrakbansolodrakbansolodrakban. This was the problem where the bot would try to respond to broadcasts and piss off the sender (solo, mittens, etc), as they come in as PMs.

It is clearly time to come up with a better workaround. Filtering by username sucks because there's going to occasionally be new people sending broadcasts from themselves instead of directorbot (e.g. Inom) and I'd rather not have the bot maintain a list that needs to be updated. Glancing at the XMPP spec, they mention an optional but recommended type attribute, so hopefully gsf sets it differently in broadcasts compared to PMs.

SwimlanesOnline commented 9 years ago

Can we stop morgooglie from giving the "invalid command" reply in pm and only reply to valid commands? If an argument of a cmd is invalid, replying the appropriate error would be ok. That would fix personal director broadcast replies, although still be somewhat hackish

TheJokr commented 8 years ago

I will integrate the forcePM flag into the botcmd decorator and write a wrapper around JabberBot.send_simple_reply to force PM/group chat replies responses.

SwimlanesOnline commented 8 years ago

Is it possible to add an optional, universal flag which will always force the reply to be sent to the channel?