Home

Awesome

LXMFBot

Python class to easily develop a simple Telethon style chatbot for the LXMF protocol.

screenshot

Installation

$ pip install -r requirements.txt

Usage

Message Object

Functions decorated by received have access to a msg parameter that has the following content:

Example

Example of a bot that echos a message back to the sender:

from lxmfbot import LXMFBot

bot = LXMFBot("NodeBot")

@bot.received
def echo_msg(msg):
    msg.reply(msg.content)

bot.run()

Identity & Announce Files

The bots' identity and announce file location

OSPath
Linux:~/.local/share/LXMFBot/<botname>
MacOS:~/Library/Application Support/LXMFBot/<botname>
Windows:C:\Users\<username>\AppData\Local\LXMFBot\<botname>