-
Notifications
You must be signed in to change notification settings - Fork 0
Autoreply features
Under certain conditions, Patrick can automatically reply to your messages.
The code for these features is found here.
If Patrick sees a message consisting of only a single letter that he recognises, he will reply to it with the next letter in the alphabet.
If Patrick sees a message that starts with a number, he'll reply to it with that number + 1.
Conversion isn't perfect and is prone to errors.
Patrick has a small chance to reply to your message with something random he has in store.
If Patrick sees that your message has some piece of text in it, he might reply with something.
This works as follows:
Triggers and Replies are bundled together under a name (an 'alias').
Patrick looks through his stored aliases to see if the message contains one of said alias' triggers.
If so, he takes a random reply for that alias and stores it.
Once he's done with every alias, he picks a random reply he has stored and sends it.
Replies have Weight to them, which partially determines the likelyhood that the reply is selected for an Alias.
To see how this works, please refer to ListenerCog.py and ReplyManager.py.