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

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

在命令discord.py中調(diào)用命令

在命令discord.py中調(diào)用命令

月關(guān)寶盒 2024-01-04 10:11:40
好的,所以我需要兩個(gè)命令來(lái)復(fù)制,默認(rèn)代碼是這樣寫的(我知道它很難重復(fù),因?yàn)樗錆M了引用,但這并不重要,這里只是為了上下文):@bot.command(name='Bot', help="Dane nt. zaka?enia w danym miejscu")async def cv_local(ctx, country=""):    translator = Translator()    translation = translator.translate(country, 'en')    country = translation.text    now = datetime.datetime.now()    startTime = time.time()    if country == "":        country = "world"        print("At " + str(now.hour) + ":" + str(now.minute) + " user " + str(ctx.message.author.name) + "(Id: " + str(            ctx.message.author.id) + ")" +              " didn't mention any country, sent data for world")    else:        print("At " + str(now.hour) + ":" + str(now.minute) + " user " + str(ctx.message.author.name) + "(Id: " + str(            ctx.message.author.id) + ")" + " searched for: " +              str(Library.exceptionCheck(country)[1]))    if str(country).lower() == "world" or str(country).lower() == "kw" or str(country).lower() == "za":        url = 'https://www.worldometers.info/coronavirus/'        code = Library.HttpsRead(url, "?wiata", translation.src)    else:        temp1 = Library.exceptionCheck(country)[0]        url = 'https://www.worldometers.info/coronavirus/country/' + temp1        code = Library.HttpsRead(url, country, config[ctx.guild.name]['country'])    await ctx.send(embed=code)    print("execution took %s seconds \n" % (time.time() - startTime))我沒(méi)有可以發(fā)布給你的錯(cuò)誤痕跡,這很令人沮喪
查看完整描述

1 回答

?
江戶川亂折騰

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

最后我制作了該命令的又一個(gè)版本并且它可以工作:


@bot.command(name='cv', help="Dane nt. zaka?enia w danym miejscu")

async def cv_local2(ctx, leng=""):

    print("Invoking...")

    temp1 = bot.commands

    temp = bot.get_command(name='Bot')

    await temp.callback(ctx, leng)


查看完整回答
反對(duì) 回復(fù) 2024-01-04
  • 1 回答
  • 0 關(guān)注
  • 176 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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