python - 如何在频道 discord.py 中将 txt 数据作为文本发送
问题描述
我尝试将 txt 数据的文本作为消息发送。我找不到任何可以使用 Discord.py 1.6.0
解决方案
它应该与上传图像相同。
利用:
channel.send(file=discord.File('filename.txt'))
阅读更多: https ://discordpy.readthedocs.io/en/latest/faq.html#how-do-i-upload-an-image
推荐阅读
- sql - 如果第一个表已经存在,则不会插入第二个表
- reactjs - 如何使材料ui中的列表导航做出反应
- aws-lambda - 在 aws lambda 中使用内存索引?绕过lambda中的无状态?
- javascript - 无法以 png 格式保存图像
- flutter - Flutter 中的耳机控制
- rest - Matrix api到相同坐标的不同距离
- java - 在不太复杂的java中使用前缀搜索书名
- c# - 如何在不使用while循环的情况下获取xml内容
- c# - 为什么 sql update 在我的数据库(C#)中创建一个新行?
- node.js - 无法通过 nodejs 中的 post 方法插入数据?