首页 > 解决方案 > 如何在频道 discord.py 中将 txt 数据作为文本发送

问题描述

我尝试将 txt 数据的文本作为消息发送。我找不到任何可以使用 Discord.py 1.6.0

标签: pythondiscorddiscord.py

解决方案


它应该与上传图像相同。

利用:

channel.send(file=discord.File('filename.txt'))

阅读更多: https ://discordpy.readthedocs.io/en/latest/faq.html#how-do-i-upload-an-image


推荐阅读