對我來說可能很難,但我相信 stackoverflow 的力量,我需要在我的機(jī)器人上輸入一個(gè)數(shù)字作為機(jī)器人狀態(tài)。這里:http : //gamers-control-2.000webhostapp.com/count.txt#time to show status = 在空白網(wǎng)站上創(chuàng)建的文本 = "41"# http://gamers-control-2.000webhostapp.com/count.txt#some how,你說我可以輸入數(shù)字,我說網(wǎng)絡(luò)中的數(shù)字每次都會改變,所以我需要獲取該數(shù)字以將其顯示為機(jī)器人狀態(tài)。import discordfrom discord.ext.commands import Botfrom discord.ext import commandsimport asyncioimport timeimport randomfrom discord import GameClient = discord.clientclient = commands.Bot(command_prefix = '!')Clientdiscord = discord.Client()@client.eventasync def on_ready(): await client.change_presence(game=discord.Game(name=http://gamers-control-2.000webhostapp.com/count.txt, type=3)) print('test ready')client.run("....")我是 discord.py 的新手
更改 discord.py 機(jī)器人狀態(tài)
人到中年有點(diǎn)甜
2021-09-28 13:59:38