Coder Social home page Coder Social logo

freedomofkeima / messenger-maid-chan Goto Github PK

View Code? Open in Web Editor NEW
66.0 12.0 14.0 752 KB

[Deprecated] Maid-chan feat Facebook Messenger bot to accompany personal daily life

Home Page: http://messenger-maid-chan.rtfd.io

License: MIT License

Python 99.17% Makefile 0.83%
facebook-messenger-bot personal-assistant artificial-intelligence python facebook-messenger jarvis

messenger-maid-chan's Introduction

[Deprecated] Maid-chan feat Facebook Messenger

CircleCI readthedocs

Note 2: As of March 4, 2020, Facebook Messenger does not allow non-news page to use NON_PROMOTIONAL_SUBSCRIPTION tag.

After March 4th, 2020 Only Pages that are registered with the Facebook News Page Index (NPI) will be allowed to send non-promotional subscription messages. This rule has blocked Maid-chan in sending background messages.

Note: As of October 5, 2018, Maid-chan is now migrated to Python 3.6+.

Maid-chan name is inspired from Sakurasou's Artificial Intelligence.

If you have any other ideas, I am accepting contributions :) For developers, you could access the documentation pages for developers here. For others who are interested in using Maid-chan features, please ask me directly and head to Maid-chan Facebook Page.

Maid-chan is featured in:

Available Features

  • Upload image for random image filtering via Primitive (Requires maidchan_primitive running in the background and ImageMagick convert feature for generating GIF)

Combined result

  • Simple chat (English or Bahasa Indonesia) via ChatterBot feat langdetect. The accuracy is still bad, though

  • Daily good morning and good night messages, with "offerings"! (Requires maidchan_scheduler running in the background)

  • Daily Japanese Kanji & Vocabulary (Requires maidchan_scheduler running in the background)

  • RSS Feed Notifier for Anime, Manga, etc which is similar to my previous RSS Twilio bot (Requires maidchan_scheduler running in the background)

  • [Experimental] Tokyo train status feat Yahoo Japan (Requires maidchan_scheduler running in the background)

All time-related features are currently handled in UTC+9 (Japan Time).

Available Commands

All users

  • help: You will get the list of all available commands from Maid-chan
  • subscribe offerings: Maid-chan will start giving you a good morning message and a good night messages
  • unsubscribe offerings: Maid-chan will stop spamming you with those messages, but Maid-chan will be sad :'(
  • update offerings: Maid-chan will ask you about your usual waking up and sleeping time, because Maid-chan doesn't want to disturb your sleep . . ., usually :p (some surprises inside!)

  • subscribe japanese: Maid-chan will start sending you random daily Kanji & Vocabulary
  • unsubscribe japanese: Maid-chan will stop sending you random daily Kanji & Vocabulary
  • update japanese: Maid-chan will ask about your level preference for Kanji (N1 to N4, old test format)

  • update name: By default, Maid-chan will call you with onii-chan

  • subscribe rss: You could add an RSS feed with its pattern and let Maid-chan notify you when there is an update
  • unsubscribe rss: You could remove one of your RSS feed subscription each time you call this command

  • [Experimental] subscribe train: Maid-chan will give you updates related to Tokyo train status (currently, it only supports admin's train line :p)
  • [Experimental] unsubscribe train: Maid-chan will stop sending you information related to Tokyo train status
  • show profile: Do you want to know what Maid-chan knows about you? Then, you could use this command!

How to Run

  1. For initial configuration, you need to create maidchan/config.py based on maidchan/config.py.example and fill those values based on your own configuration.

  2. Maid-chan is using Redis as the database. Redis can be downloaded via https://redis.io/download. Run Redis as a background process in port 6379 (default port).

  3. ChatterBot 0.8.X has dropped support for simple JSON storage because of performance issues. Depending on your choice, you need to have either SQLite or MongoDB and modify maidchan/config.py accordingly. Alternatively, you can set IS_CHATTERBOT_ENABLED flag to False in maidchan/config.py to disable chatbot feature. MongoDB Installation Guide

  4. It is recommended to use venv (e.g.: python3 -m venv venv then source venv/bin/activate). You need to install all dependencies via pip install -r requirements.txt.

  5. Run python setup.py install to build Maid-chan. Finally, you can execute maidchan in the background process to run this bot.

Priority Ideas

Existing Feature Improvement Ideas

  • (Admin only) Broadcast message to all users which have talked to Maid-chan at least once
  • Modifiable daily Japanese Kanji & Vocabulary time
  • Automatic offerings update from upstream

Future Ideas

  • Japanese language quiz
  • Image recognition, e.g.: waifu recognizer - https://github.com/nagadomi/lbpcascade_animeface or self-created
  • Natural Language processing for conversing daily conversation (Naturally we can improve it with IBM Watson or Google Cloud Speech, but the model "probably" differs from Maid-chan requirement)
  • Mini games
  • Location-aware features: Recommendation, weather, etc
  • IoT with home electronics
  • etc

Reference

License

This project itself is licensed under MIT License. All images are owned by their respective creators.

Last Updated: October 5, 2018

messenger-maid-chan's People

Contributors

freedomofkeima avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

messenger-maid-chan's Issues

Unable to setup the bot properly.

I've tried to setup the bot but it failed any idea whats wront with it? Also for the VERIFY_TOKEN where could i get it?I know this might be a old thread so you might not reply.Hope you can help.Thanks.

Here's the error.

(venv) honghongleong@honghongleong-VirtualBox:~/messenger-maid-chan$ maidchan
Traceback (most recent call last):
File "/home/honghongleong/messenger-maid-chan/venv/bin/maidchan", line 11, in
load_entry_point('messenger-maid-chan==0.2', 'console_scripts', 'maidchan')()
File "/home/honghongleong/messenger-maid-chan/venv/lib/python3.7/site-packages/messenger_maid_chan-0.2-py3.7.egg/maidchan/cmds/main.py", line 134, in main
application.chatbot = ChatBotDriver(STORAGE_ADAPTER)
File "/home/honghongleong/messenger-maid-chan/venv/lib/python3.7/site-packages/messenger_maid_chan-0.2-py3.7.egg/maidchan/chatbot.py", line 19, in init
storage_adapter=storage_adapter
File "/home/honghongleong/messenger-maid-chan/venv/lib/python3.7/site-packages/chatterbot/chatterbot.py", line 44, in init
self.storage = utils.initialize_class(storage_adapter, **kwargs)
File "/home/honghongleong/messenger-maid-chan/venv/lib/python3.7/site-packages/chatterbot/utils.py", line 33, in initialize_class
return Class(**kwargs)
File "/home/honghongleong/messenger-maid-chan/venv/lib/python3.7/site-packages/chatterbot/storage/mongodb.py", line 97, in init
self.client.admin.command({'setParameter': 1, 'internalQueryExecMaxBlockingSortBytes': 44040192})
File "/home/honghongleong/messenger-maid-chan/venv/lib/python3.7/site-packages/pymongo/database.py", line 611, in command
read_preference) as (sock_info, slave_ok):
File "/usr/lib/python3.7/contextlib.py", line 112, in enter
return next(self.gen)
File "/home/honghongleong/messenger-maid-chan/venv/lib/python3.7/site-packages/pymongo/mongo_client.py", line 1099, in _socket_for_reads
server = topology.select_server(read_preference)
File "/home/honghongleong/messenger-maid-chan/venv/lib/python3.7/site-packages/pymongo/topology.py", line 224, in select_server
address))
File "/home/honghongleong/messenger-maid-chan/venv/lib/python3.7/site-packages/pymongo/topology.py", line 183, in select_servers
selector, server_timeout, address)
File "/home/honghongleong/messenger-maid-chan/venv/lib/python3.7/site-packages/pymongo/topology.py", line 199, in _select_servers_loop
self._error_message(selector))
pymongo.errors.ServerSelectionTimeoutError: localhost:27017: [Errno 111] Connection refused

Train Status Improvements

Because of heavy snow storm, the warning page is shown differently. Scraping failed and the bot inferred that everything are running properly while they're not.

<div id="mdStatusNormalLine">
<p class="boxActiveInfo"><span class="icnLight">[light]</span>現在この地域で多数の運行情報が発表されており、動いている路線を優先して表示しています。</p>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.