有什么解决办法吗?
async def cosmetic(ctx, name : int):
response = requests.get("https://fortnite-api.com/v2/cosmetics/br")
embed=discord.Embed(
title=f"{name}", color=0x9c3030
)
embed.add_field(f'Rarity: {BrCosmeticRarity}')
await ctx.send(embed=embed)
1条答案
按热度按时间yrdbyhpb1#
你在显式转换
name
到int
通过async def cosmetic(ctx, name : str):
async def cosmetic(ctx, name : str):
response = requests.get("https://fortnite-api.com/v2/cosmetics/br")
embed=discord.Embed(
title=f"{name}", color=0x9c3030
)
embed.add_field(f'Rarity: {BrCosmeticRarity}')
await ctx.send(embed=embed)