data dumper commands.
no arguments - dump bot as json dict.
no arguments - dump bot as json dict.
no arguments - dump channel data to json.
no arguments - dump event to json.
no arguments - dump bot as json dict.
# fbf/plugs/core/data.py # # """ data dumper commands. """
from fbf.lib.aliases import setalias from fbf.lib.config import getmainconfig from fbf.lib.commands import cmnds from fbf.lib.examples import examples
def handle_dataevent(bot, event): """ no arguments - dump event to json. """ event.reply(event.fordisplay()) cmnds.add("data-event", handle_dataevent, "OPER") examples.add('data-event', 'dump event data', 'data-event')
def handle_datachan(bot, event): """ no arguments - dump channel data to json. """ event.reply(event.chan.data.fordisplay()) cmnds.add("data-chan", handle_datachan, "OPER") examples.add('data-chan', 'dump channel data', 'data-chan')
def handle_databot(bot, event): """ no arguments - dump bot as json dict. """ event.reply(bot.fordisplay()) cmnds.add("data-bot", handle_databot, "OPER") examples.add('data-bot', 'dump bot data', 'data-bot')
def handle_datacfg(bot, event): """ no arguments - dump bot as json dict. """ event.reply(bot.cfg.fordisplay()) cmnds.add("data-cfg", handle_datacfg, "OPER") examples.add('data-cfg', 'dump bot config data', 'data-cfg')
def handle_datamain(bot, event): """ no arguments - dump bot as json dict. """ event.reply(getmainconfig().fordisplay()) cmnds.add("data-main", handle_datamain, "OPER") examples.add('data-main', 'dump mainconfig data', 'data-main')