我想做的是,每当网站上有新内容时,我的不和谐机器人就会发送一条消息说“嘿,那里有新内容”。例如,有一个图书网站,他们上传有关图书的新帖子及其描述,而我的机器人只是从该帖子在线获取文本并将其发送到我的不和谐服务器。我希望它足够清楚。这里我有用 Python 3.9 编写的基本不和谐机器人代码
import discord
from discord.ext import commands
client = commands.Bot(command_prefix = '!')
@client.event
async def on_ready():
print("Bot is working.")
client.run('not today')
Run Code Online (Sandbox Code Playgroud)