Source code for bot.tdo

# This file is in the Public Domain.

import ob


def __dir__():
    return ("Todo", "dne", "tdo")


k = ob.kernel()


[docs]class Todo(ob.Object): def __init__(self): super().__init__() self.txt = ""
[docs]def dne(clt, event): if not event.args: event.reply("dne txt==<string>") return db = ob.Db() for fn, o in db.findname("todo", event.gets): o._deleted = True o.save() event.reply("ok") break
[docs]def tdo(event): if not event.rest: event.reply("tdo <txt>") return o = Todo() o.txt = event.rest o.save() event.reply("ok")