GithubHelp home page GithubHelp logo

thomasballinger / zulip-bot-kaomoji Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gnclmorais/zulip-bot-kaomoji

0.0 3.0 0.0 105 KB

Zulip bot to replace commands by kaomojis.

License: MIT License

Makefile 1.77% Python 98.23%

zulip-bot-kaomoji's Introduction

zulip-bot-kaomoji

Zulip bot to replace commands by kaomojis.
Simply put, replaces messages like @kao shrug with ¯\_(ツ)_/¯, for example.

Instalation

To work on this bot, follow the following instructions to setup you environment:

  1. pip install virtualenv
  2. virtualenv venv
  3. source venv/bin/activate
  4. pip install -r requirements.txt

After you’re done working for the moment, don’t forget to $ deactivate.

Configuration

To run this bot, don’t forget to create a config.sh file with the following structure:

export ZULIP_USR=<your-bot-address>
export ZULIP_API=<your-bot-apy_key>
export ZULIP_PRIVATE_USR=<your-private-address>
export ZULIP_PRIVATE_API=<your-private-api-key>

After having such a file, don’t forget to load these variables, something like source config.sh.

Zulip configuration

If you want to use the bot, you’ll have to send the bot your private API key. As explained by Zulip:

For most bots using the API, you'll want to give each bot its own name and API key using the above section. But if you want to write a bot that can access your own private messages, you should use your personal API key.

So follow these steps:

  1. Open up Zulip and go to Settings
  2. Scroll until the bottom and click on the button Show/change your API key
  3. After inserting your password, copy that 32-character string
  4. Send a private message to [email protected]
    (it’s the e-mail address of the bot – its name is Kawaii, by the way)
  5. And that’s it! You should receive a message from the bot telling you your key was saved. You can now @kao <kaomoji> at will! (⌒ω⌒)

You can edit or remove your API key at any time. Just send it a private message with a new API key to update it, or a command like delete, remove, exit or stop to ask the bot to remove you from its database. Simple! 〜( ̄▽ ̄〜)

Running

make run \(^▽^)/

Available kaomojis

kaomojis = {
    yay:          \(^▽^)/,
    pleased:      (⌒‿⌒),
    dance:        ⌒(o^▽^o)ノ,
    inlove:       (─‿‿─)♡,
    sorry:        (⌒_⌒;),
    unamused:     ( ̄︿ ̄),
    seriously:    (¬_¬;),
    thenerve:     (╬ Ò﹏Ó),
    fliptable:    (╯°□°)╯︵ ┻━┻),
    fliptable2:   (ノಥ益ಥ)ノ ┻━┻,
    fliptable3:   (ノಠ益ಠ)ノ彡┻━┻,
    fliptables:   ┻━┻ ︵ヽ(`Д´)ノ︵ ┻━┻,
    unfliptable:  ┬─┬ノ( º _ ºノ),
    sad:          (╯︵╰,),
    coldsweat:    (;;;*_*),
    cantlook:     (/ω\),
    shrug:        ¯\_(ツ)_/¯,
    doubt:        (¬_¬),
    what:         (⊙_⊙),
    hi:           ( ̄▽ ̄)ノ,
    sup:          (・_・)ノ,
    zzz:          (-_-) zzZ,
    sing:         ( ̄▽ ̄)/♫•*¨*•.¸¸♪
}

To use them, just write @kao <one-of-the-above-kaomojis-keyword>. Example: @kao hi will be replaced by ( ̄▽ ̄)ノ.
You can even have several kaomojis on a phrase, any place on it: I hope this @kao dance doesn’t break… gets replaced to I hope this ⌒(o^▽^o)ノ doesn’t break…

Credits

Thanks to ( ̄▽ ̄)ノ@di0spyr0s for the Python base code that allowed me to jump-start the development of this bot.
Shout-out to @dariajung for finding out a way to [edit Zulip’s messages] (https://github.com/dariajung/zulip-gif-bot#notes-about-zulip-api). ⌒(o^▽^o)ノ
Most of kaomoijs taken from here. ノ( ^ _ ^ノ)

zulip-bot-kaomoji's People

Contributors

gnclmorais avatar thomasballinger avatar

Watchers

 avatar  avatar  avatar

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.