Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 554 Bytes

README.md

File metadata and controls

25 lines (19 loc) · 554 Bytes

MagiSlack

MagiSlack is a fast, easy library for make command-respond style chat bot.

Installation

  • pip install MagiSlack

Usage

from MagiSlack.io import MagiIO
from MagiSlack.module import MagiModule

def hello_world_callback(*args, **kwargs):
    name = args[0]
    return f'Hello, {kwargs['display_name']}!'
    
if __name__ == '__main__':
    module = MagiModule.MagiModule('SLACK_API_KEY_HERE')
    io = MagiIO.MagiIO(module)
    io.set_callback_func('hello', hello_world_callback)
    
    io.start()

License

MIT license