【发布时间】:2021-09-16 22:18:18
【问题描述】:
所以,我正在制作一个不和谐的机器人,它需要很少的命令,其中之一是
/watch
在该命令之后,用户将输入他们的地址(区块链)
/watch 0xAD488499b897a9667395526C39d0f3314A0f3FE9
我不知道如何在消息中制作 2 个变量来获取 if watch 获取地址
在机器人收到地址后,它将与用户一起将其保存到文本文件中,并且每 30 秒它会检查它是否正在挖掘(如果不是,则意味着您需要重新激活它会提醒使用该地址的手表的用户)
检查将使用idena API完成
https://api.idena.io/api/swagger/index.html
它将检查Online Miner status by the address
【问题讨论】:
-
非常感谢你
-
@ŁukaszKwieciński 它不工作
-
import discord from discord.ext import commands client = discord.Client() bot = commands.Bot(command_prefix='.') @client.event async def on_ready(): print('We have logged in as {0.user}'.format(client)) @bot.command() async def test(ctx, *, arg): await ctx.send(arg) -
“它不工作” -- 为什么??
标签: python python-3.x python-requests discord discord.py