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

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

如何讓我的機(jī)器人根據(jù)所選數(shù)字說出不同的內(nèi)容?

如何讓我的機(jī)器人根據(jù)所選數(shù)字說出不同的內(nèi)容?

瀟瀟雨雨 2023-12-08 17:03:05
我正在嘗試創(chuàng)建一個 hownoob 命令,我想知道如何讓它根據(jù)數(shù)字的范圍說出不同的內(nèi)容?@client.command()async def hownoob(ctx, member: discord.Member):    number = random.randint(1,100)    member = member.mention    yo = [f'lol yeah, {member} biggest noob here 100% :ok_hand:',         f'noobness for {member} off the charts man!!!',         f'{member} is a big noob, but their style is a cool noob :wink:']    if number == 1-15:        await ctx.send(f'noobness for {member} is {number}% which is not very noob')    elif number == 16-49:        await ctx.send(f'noobness for {member} is {number}% lol')    elif number == 50-77:        await ctx.send(f'noobness for {member} is {number}% your half noob lol XD')    elif number == 78-89:        await ctx.send(f'{member} is {number}%-very much noob :eyes:')    elif number == 90-99:        await ctx.send(f'noobness for {member} is {number}% very noob!!!!')    elif number == 100:        await ctx.send(f'noobness for {member} is at max!!!')謝謝!
查看完整描述

1 回答

?
慕蓋茨4494581

TA貢獻(xiàn)1850條經(jīng)驗 獲得超11個贊

嘗試這個:


if number in range(16):

    await ctx.send(f'noobness for {member} is {number}% which is not very noob')

elif number in range(16,50):

    await ctx.send(f'noobness for {member} is {number}% lol')

elif number in range(50,78):

    await ctx.send(f'noobness for {member} is {number}% your half noob lol XD')

elif number in range(78,90):

    await ctx.send(f'{member} is {number}%-very much noob :eyes:')

elif number in range(90,100):

    await ctx.send(f'noobness for {member} is {number}% very noob!!!!')

elif number == 100:

    await ctx.send(f'noobness for {member} is at max!!!')


查看完整回答
反對 回復(fù) 2023-12-08
  • 1 回答
  • 0 關(guān)注
  • 167 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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