Esempio n. 1
0
        'awcBabi this is vs dark plus in !babi with one modification to '
        'highlight ini headers: '
        'https://github.com/asottile/babi#setting-up-syntax-highlighting',
    ),
    ('!twitter', 'https://twitter.com/codewithanthony'),
    ('!water', 'DRINK WATER, BITCH'),
    ('!youtube', 'https://youtube.com/anthonywritescode'),
)


async def _generic_msg(config: Config, match: Match[str], *, msg: str) -> str:
    return format_msg(match, msg)


for _cmd, _msg in _TEXT_COMMANDS:
    command(_cmd)(functools.partial(_generic_msg, msg=_msg))

_ALIASES: Tuple[Tuple[str, Tuple[str, ...]], ...] = (
    ('!bluething', ('!blueball', )),
    ('!distro', ('!os', )),
    (
        '!editor',
        (
            '!babi',
            '!nano',
            '!vim',
            '!emacs',
            '!vscode',
            '!wheredobabiscomefrom',
        ),
    ),
Esempio n. 2
0
    ('!tox', 'yep, I am a tox code dev https://github.com/tox-dev/tox'),
    ('!water', 'DRINK WATER, BITCH'),
    (
        '!wm',
        'the anthony window manager '
        'https://clips.twitch.tv/RefinedFunnyRavenFailFish',
    ),
)


async def _generic_msg(config: Config, match: Match[str], *, msg: str) -> str:
    return format_msg(match, msg)


for _cmd, _msg in _TEXT_COMMANDS:
    command(_cmd)(functools.partial(_generic_msg, msg=_msg))
for _cmd, _msg in _SECRET_COMMANDS:
    command(_cmd, secret=True)(functools.partial(_generic_msg, msg=_msg))

_ALIASES: tuple[tuple[str, tuple[str, ...]], ...] = (
    ('!bluething', ('!blueball', )),
    ('!discord', ('!dicsord', )),
    ('!distro', ('!linux', '!os', '!ubuntu', '!vm', '!windows')),
    ('!emotes', ('!emoji', '!emote')),
    ('!job', ('!jorb', )),
    ('!keyboard', ('!keyboard1', )),
    ('!question', ('!questions', '!tcp', '!udp')),
    ('!readme', ('!reamde', )),
    ('!speechless', ('!ghost', )),
)
for _alias_name, _aliases in _ALIASES: