第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會有你想問的

更改 discord.py 機(jī)器人狀態(tài)

更改 discord.py 機(jī)器人狀態(tài)

人到中年有點(diǎn)甜 2021-09-28 13:59:38
對我來說可能很難,但我相信 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 的新手
查看完整描述

3 回答

?
jeck貓

TA貢獻(xiàn)1909條經(jīng)驗(yàn) 獲得超7個(gè)贊

這是我使用的


async def on_ready():

    print(f'We have logged in as {bot.user}')

    print('Ready!')

    return await bot.change_presence(activity=discord.Activity(type=3, name='Add status here'))```



查看完整回答
反對 回復(fù) 2021-09-28
  • 3 回答
  • 0 關(guān)注
  • 193 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號