split tools commands from core commands, introduce flip for testing

This commit is contained in:
deathbybandaid 2019-07-10 08:21:12 -04:00
parent 2b882216df
commit 2febf396cb
8 changed files with 55 additions and 4 deletions

View File

@ -19,11 +19,7 @@ from .Runtime_Controls import *
from .Messaging import *
from .Docs import *
from .BotPrivs import *
from .Search import *
from .AI import *
from .Gif import *
from .Sherlock import *
from .Reddit import *
from .DictComs import *
from .TODO import *

View File

@ -0,0 +1,9 @@
# coding=utf8
from __future__ import unicode_literals, absolute_import, division, print_function
# pylama:ignore=W0401,W0611
from .flip import *
__author__ = 'Sam Zick'
__email__ = 'sam@deathbybandaid.net'
__version__ = '0.1.1'

View File

@ -0,0 +1,34 @@
# coding=utf-8
from __future__ import unicode_literals, absolute_import, division, print_function
import sopel.module
import sopel_modules.SpiceBot as SpiceBot
from sopel_modules.spicemanip import spicemanip
from upsidedown import transform
# TODO add upsidedown to spicemanip
@sopel.module.rule('^flips (.+)')
@sopel.module.intent('ACTION')
def flips(bot, trigger):
target = trigger.group(1).strip()
if target == 'a table':
bot.say("(╯°□°)╯︵ ┻━┻")
else:
bot.say("(╯°□°)╯︵ %s" % transform(target))
@sopel.module.rule('^rolls (.+)')
@sopel.module.intent('ACTION')
def roll(bot, trigger):
target = trigger.group(1).strip()
if target.endswith(' down a hill'):
target = target[:-12]
tegrat = transform(target)
bot.say("(╮°-°)╯︵ %s %s %s %s %s (@_@;)" % (tegrat, target, tegrat, target, tegrat))
else:
bot.say("(╮°-°)╯︵ %s" % transform(target))

View File

@ -0,0 +1,12 @@
# coding=utf8
from __future__ import unicode_literals, absolute_import, division, print_function
# pylama:ignore=W0401,W0611
from .Gif import *
from .Sherlock import *
from .Reddit import *
from .Search import *
__author__ = 'Sam Zick'
__email__ = 'sam@deathbybandaid.net'
__version__ = '0.1.1'