mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-13 06:59:53 -05:00
split tools commands from core commands, introduce flip for testing
This commit is contained in:
parent
2b882216df
commit
2febf396cb
@ -19,11 +19,7 @@ from .Runtime_Controls import *
|
|||||||
from .Messaging import *
|
from .Messaging import *
|
||||||
from .Docs import *
|
from .Docs import *
|
||||||
from .BotPrivs import *
|
from .BotPrivs import *
|
||||||
from .Search import *
|
|
||||||
from .AI import *
|
from .AI import *
|
||||||
from .Gif import *
|
|
||||||
from .Sherlock import *
|
|
||||||
from .Reddit import *
|
|
||||||
from .DictComs import *
|
from .DictComs import *
|
||||||
from .TODO import *
|
from .TODO import *
|
||||||
|
|
||||||
|
|||||||
9
sopel_modules/SpiceBot_Core_Extra/__init__.py
Normal file
9
sopel_modules/SpiceBot_Core_Extra/__init__.py
Normal 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'
|
||||||
34
sopel_modules/SpiceBot_Core_Extra/flip.py
Normal file
34
sopel_modules/SpiceBot_Core_Extra/flip.py
Normal 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))
|
||||||
12
sopel_modules/SpiceBot_Core_Tools/__init__.py
Normal file
12
sopel_modules/SpiceBot_Core_Tools/__init__.py
Normal 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'
|
||||||
Loading…
Reference in New Issue
Block a user