GithubHelp home page GithubHelp logo

codex.bot's Introduction

Platform for integration of services into messengers. It's simple. Applications written with our SDK will be available in all supported messengers.

Messengers

Currently we support these messengers. We will add several ones soon.

  • Telegram
  • Slack

How to use

Add @codex_bot in your chat and type /apps to view the list of available applications.

How to create own application

Our Python SDK and Guide for creation an app will help you.

Available applications

Everyone can write own application with our SDK. That's what we've got now.

GitHub

https://github.com/codex-bot/github

Useful integration with github.com. Provides notifications about

  • Opened/closed issues
  • Assigned issues
  • Opened/closed pull requests
  • Code reviews
  • Branch updates
  • Commits

Usage

Type /github_start and follow instructions to add a new repository.

Yandex.Metrica

https://github.com/codex-bot/metrika

Get regular or instant reports with analytics data from Yandex.

Usage

  • /metrika — shows application menu
  • /metrika_add — add new counter
  • /metrika_subscriptions — setting up a regular daily reports
  • /metrika_stop — disable counter
  • /metrika_counters — list of added counters
  • /metrika_access — remove user from the chat

Webhooks

https://github.com/codex-bot/Webhooks

Easy-to-setup notifications scheme. You will get a special link that allows to send messages via simple POST requests.

Usage

  • /notify_start — get webhook URL for sending messages to the chat
  • Send POST request for the given URL with message field

Example:

curl -X POST https://notify.bot.codex.so/u/ABCD1234 -d "message=Hello world"

demo

RSS Parser

https://github.com/codex-bot/rssparser

Subscribe to your favorite feeds and get notifications with updates.

Usage

  • /rssparser — help message with a list of commands
  • /rssparser_list — show a list of your subscriptions
  • /rssparser_add <URL> — subscribe to the feed
  • /rssparser_get — check your feed for updates
  • /rssparser_remove <URL> — unsubscribe from the feed

Weather

https://github.com/codex-bot/weather

Allows you to be informed about weather conditions in your region via Telegram chat.

Usage

  • /city <CITY_ID> — setting up your location
  • /cities — view cities list
  • /weather — get current weather conditions

Issues and improvements

  • Ask a question or report a bug on the create issue page.
  • Know how to improve the platform? Fork it and send a pull request.

About CodeX

We are a small team of passionate web-developers represented by students and graduates of ITMO University located in St. Petersburg, Russia. Fell free to give us a feedback on [email protected]

codex.bot's People

Contributors

gohabereg avatar khaydarov avatar n0str avatar nespecc avatar nikmel2803 avatar sirtimrod avatar slaveeks avatar talyguryn 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

Watchers

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

codex.bot's Issues

License

Hi!

Nice work!

But, what is your license for this project?

pika does not support connection recovery

Provide smth like this
pika/pika#858

while True:
    connection = pika.BlockingConnection(parameters)

    channel = connection.channel()
    channel.basic_consume(on_message, 'queue')

    try:
        channel.start_consuming()
    except pika.exceptions.ConnectionClosed:
        LOGGER.info('Connection closed. Recovering')
        continue
    except KeyboardInterrupt:
        channel.stop_consuming()

    connection.close()
    break```

Append this code and create issue for SDK

Core-app communication bugs

  • unhardcode RabbitMQ host. Get it from config
  • fix bug with mongo document name (chat_hash). It must be a string
  • fix bug with Service send method.

Логирование и перехват ошибок

Нужно реализовать логирование всех ключевых моментов.
Весь код обернуть в try/except и логировать попадания.
Логирование необходимо не просто выводить на экран, а сохранять в файл или БД.

Класс Settings

Разработка класса Settings, обеспечение передачи его инстанса во все модули, инициализация настроек callback c использованием этого модуля

Класс базы данных для Core

Класс должен обеспечивать подключение к базе данных и получение информации.
Можно положить это в lib/db/db.py с соответствующим конфигом. Предлагается использовать Mongo.
Заложить в лине основу для формирования дампов сообщений и логов.

Класс уникального пользователя системы

Класс пользователя системы.
Включает в себя указатели на профили пользователя во всех сервисах, осуществляет логирование и обновление/хранение состояний пользователя, его чатов и т.п.

Change submodules access rights for python sdk and modules

If you clone the sdk repo, you cannot init submodules due to the lack of access rights.

probably should change

[submodule "github/sdk"]
	path = github/sdk
	url = [email protected]:codex-bot/sdk-python.git

to

[submodule "github/sdk"]
	path = github/sdk
	url = https://github.com/codex-bot/sdk-python.git

But it needs additional research if there is another way to resolve the issue.

Автоматизация деплоя

  • Написать скрипт автоматического обновления ядра, приложений, связанных с каждым приложением SDK из master веток.
  • Написать скрипт, который будет разворачивать в screen соответствующие приложения и ядро.
  • Написать скрипт, который будет сворачивать запущенные приложения, ядро.
  • Написать скрипт бэкапов БД и конфигов

Разработать class для Slack API

Продумать структуру класса, написать все необходимые конструкторы для него. Разобраться с получением API ключей и написать функцию авторизации приложения.

Если API Token получается как-то хитро, написать функцию, которая автоматизирует его получение.

Channel post. AttributeError: 'NoneType' object has no attribute 'username'

When sending message in channel, there are only update_id and channel_post params. No user.

web_protocol.py     :393         log_exception() 	 Error handling request 
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.9/site-packages/aiohttp/web_app.py", line 499, in _handle
    resp = await handler(request)
  File "/home/app/codexbot/lib/server.py", line 16, in wrapper
    result = await function(self, {
  File "/home/app/codexbot/services/telegram/telegram.py", line 55, in telegram_callback
    await self.send_message_to_app(update)
  File "/home/app/codexbot/services/telegram/telegram.py", line 65, in send_message_to_app
    if update.message.user.username:
AttributeError: 'NoneType' object has no attribute 'username'

Разработать прототип модуля ядра Facebook

Рассмотреть возможность подключения мессенджера фейсбука для нашего ядра. Если это возможно – реализовать прототип на основе существующих модулей с поддержкой set_webhook, callback и send_message

Process the exception of the bot being blocked

base.py             :66              decorator() 	 Error while sending Telegram message: b'{"ok":false,"error_code":403,"description":"Forbidden: bot was blocked by the user"}' 
broker.py           :46               callback() 	 Broker callback error 
broker.py           :47               callback() 	 'bool' object is not subscriptable 

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.