所以我试图发出一个赠品机器人命令,但似乎无法获得链接

时间:2020-09-15 18:02:48

标签: discord.py

通常,您执行以下命令:!public #general 1 1 Discord Nitro https://discord.gg/...,但是我很难区分奖金和链接!这是我想出的:

@client.command()
async def public(ctx, channel:discord.TextChannel, winners: int, time: int, *prize, link):
    embed = discord.Embed(
    title = f"**Giving Away {prize}**",
    description = f"React with ? to enter! \n **{winners}** winner \n \n ? Must be in **{link}** to enter!", color=0xf9c900)
    await ctx.send(embed=embed)

1 个答案:

答案 0 :(得分:0)

*中删除*prize,然后在运行命令时将奖金放在引号中,所以:

!public #general 1 1 "Discord Nitro" https://discord.gg/...