コード例 #1
0
ファイル: main.py プロジェクト: dsdsenen/GRC-Wallet-Bot
async def fgive(ctx, amount: float):
    user_obj = await q.get_user(str(ctx.author.id))
    result = await user_obj.send_internal_tx(await q.get_user(FCT),
                                             extras.amt_filter(amount), True)
    await ctx.send(result)
    if result.startswith(e.GOOD):
        await ctx.send(docs.faucet_thankyou)
コード例 #2
0
ファイル: main.py プロジェクト: tentom/GRC-Wallet-Bot
async def give(ctx, receiver: discord.User, amount: float):
    if str(receiver.id) == str(ctx.author.id):
        return await ctx.send(docs.cannot_send_self)
    sender_obj = await q.get_user(str(ctx.author.id))
    receiver_obj = await q.get_user(str(receiver.id))
    if receiver_obj is None:
        return await ctx.send(f'{e.ERROR}Invalid user specified.')
    await ctx.send(await sender_obj.send_internal_tx(receiver_obj, extras.amt_filter(amount)))
コード例 #3
0
ファイル: main.py プロジェクト: tentom/GRC-Wallet-Bot
async def rain(ctx, amount: float):
    user_obj = await q.get_user(str(ctx.author.id))
    await ctx.send(await rbot.contribute(extras.amt_filter(amount), user_obj))
    await check_rain(ctx)
コード例 #4
0
ファイル: main.py プロジェクト: tentom/GRC-Wallet-Bot
async def rdonate(ctx, amount: float):
    user_obj = await q.get_user(str(ctx.author.id))
    await ctx.send(await extras.rdonate(user_obj, extras.amt_filter(amount)))
コード例 #5
0
ファイル: main.py プロジェクト: tentom/GRC-Wallet-Bot
async def donate(ctx, selection: int, amount: float):
    user_obj = await q.get_user(str(ctx.author.id))
    await ctx.send(await extras.donate(user_obj, selection, extras.amt_filter(amount)))
コード例 #6
0
ファイル: main.py プロジェクト: tentom/GRC-Wallet-Bot
async def withdraw(ctx, address: str, amount: float):
    user_obj = await q.get_user(str(ctx.author.id))
    await ctx.send(await user_obj.withdraw(extras.amt_filter(amount), address, g.tx_fee))