我们有一个非常简单的discord脚本,用户可以在其中键入!恐龙1234
脚本将返回一个http://www.url.com/images/1234.png
由于不熟悉python和discord.py,我无法确定如何检查输入的参数是否在1-100(图片数量)之间,如果是,则只返回url
如果arg>;0&&书信电报;101
bot = commands.Bot(command_prefix='!')
@bot.command(name='dino')
async def dino(ctx,arg :int):
await ctx.send('http://www.url.com/images/{}.png'.format(arg))
await ctx.send('Picture #{}'.format(arg))
谢谢
你可以试试这个
相关问题 更多 >
编程相关推荐