示例#1
0
async def tarot(ctx, *args):
    n, has_num = btl.cast_int(args)

    send = ctx.send

    if n > 1:
        if ctx.guild is not None:
            await ctx.send('%s 抽超過一張塔羅牌會改成私訊給你喔!' % btl.mk_mention(ctx))
        send = ctx.author.send

    if len(args) > has_num:
        wish = ' '.join(args[has_num:])
        wish = btl.exchange_name(wish)
        msg = '%s 讓本喵來占卜看看 %s ლ(́◕◞౪◟◕‵ლ)' % (btl.mk_mention(ctx), wish)
    else:
        msg = '%s 讓本喵來幫你抽個 ლ(́◕◞౪◟◕‵ლ)' % (btl.mk_mention(ctx))
    await send(msg)

    for msg, path in tm.get_many_tarot(n):
        await send(msg, file=discord.File(path))
示例#2
0
async def summon(ctx, n=1):
    n = int(n)

    if n < 1:
        n = 1

    send = ctx.send

    if n > 1:
        if ctx.guild is not None:
            await ctx.send('%s 召喚超過一張會改成私訊給你喔!' % btl.mk_mention(ctx))
        send = ctx.author.send

    if n > 10:
        n = 10
        await send('%s 不可以一次召喚太多啊啊啊會壞掉啊啊啊啊啊' % btl.mk_mention(ctx))
    elif n > 1:
        await send('%s 熱騰騰的薯條來囉~' % btl.mk_mention(ctx))
        for pic in fs.get_pictures(n):
            await send(file=discord.File(pic))
    else:
        pic = [p for p in fs.get_pictures(1)]
        await send('%s 熱騰騰的薯條來囉~' % btl.mk_mention(ctx),
                   file=discord.File(pic[0]))
示例#3
0
async def fortune(ctx):
    msg = rt.get_response('fortune', btl.mk_mention(ctx), fm.get_fortune())
    await ctx.send(msg)
示例#4
0
async def dice(ctx, dice='', name=None):
    msg = '%s %s' % (btl.mk_mention(ctx), Dice.roller(dice, name))
    await ctx.send(msg)