Skip to content
This repository has been archived by the owner on Dec 22, 2020. It is now read-only.

gnclmorais/zulip-bot-kaomoji

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 kawaii-bot@students.hackerschool.com
    (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. ノ( ^ _ ^ノ)

About

Zulip bot to replace commands by kaomojis.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published