所以这真的是2个问题,

我正在使用Discord.py制作一个Fortnite Stats bot for Discord,我有主要的功能统计数据 . 我正在研究一个可以添加到命令“lastgame”的参数,它将显示玩家上次玩游戏的所有统计数据 .

首先,我无法弄清楚如何实际添加参数,现在的命令语法是: !stats <pc,xbl,psn> <nickname> . 我想在史诗名称之前添加参数"lastgame",因此它将是 !stats <platform> lastgame <name> . 并且这将返回一个完全不同的嵌入,而不是添加lastgame . 这是我的整个机器人代码:https://hastebin.com/pigesuyagu.py . 如果有人能告诉我如何制作它,那么当他们在名称之前添加参数"lastgame"时,它将能够使lastgame输出一个不同的嵌入而不是没有它我真的很感激它 .

至于我的另一个问题,我想这样做,而不是回到每一个“顶部”它只回来与他们进入的那个,EG:如果他们进入top10,top10将显示为1我希望用0隐藏所有内容

最近的匹配在Fortnite API中回归到顶部:

top1: 0
top3: 0
top5: 0
top6: 0
top10: 0
top12: 0
top25: 0

如果他们进入其中一个它将等于一个(例如,如果他们低于10但不高于6 10将是1和其他所有0.我希望它显示与“获得前十名”中嵌入的不和谐但是我希望它隐藏值为0的所有内容 . 这是我的代码

if lastgame:
    lastdate = lastgame[0]['dateCollected']
    lastkills = lastgame[0]['kills']
    lastscore = lastgame[0]['score']
    lasttop1 = lastgame[0]['top1']
    lasttop3 = lastgame[0]['top3']
    lasttop5 = lastgame[0]['top5']
    lasttop6 = lastgame[0]['top6']
    lasttop10 = lastgame[0]['top10']
    lasttop12 = lastgame[0]['top12']
    lasttop25 = lastgame[0]['top25']

然后我有不和谐的嵌入我将以这种格式为每个人制作:

embed.add_field(name="Got top 25", value='{}\n'.format(top25), inline=False)

我已经嵌入了每个ID,但是我希望它隐藏所有值为0的tops嵌入,这可能吗?

感谢所有浪费时间阅读并帮助我的人,肖恩