且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用Python不一致机器人发送附件

更新时间:2023-02-13 13:41:32

您必须使用File类:

@bot.command()
async def send(ctx):
    file = discord.File("myfilepath")
    await ctx.send(file=file, content="Message to be sent")