【发布时间】:2021-06-03 12:43:39
【问题描述】:
我正在尝试通过 discord webhook 将 wordlist 中的文本逐行发送到 discord 频道。出于某种原因,下面的脚本仅发送单词列表中的最后一行。
from discord_webhook import DiscordWebhook
with open('wordlist.txt','r') as lines:
for line in lines:
webhook = DiscordWebhook(url='webhookurlhere', content=lines.readline()
response = webhook.execute()
【问题讨论】:
标签: discord.py webhooks