久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

    1. <tfoot id='vSahy'></tfoot>

      <small id='vSahy'></small><noframes id='vSahy'>

      <legend id='vSahy'><style id='vSahy'><dir id='vSahy'><q id='vSahy'></q></dir></style></legend>
      <i id='vSahy'><tr id='vSahy'><dt id='vSahy'><q id='vSahy'><span id='vSahy'><b id='vSahy'><form id='vSahy'><ins id='vSahy'></ins><ul id='vSahy'></ul><sub id='vSahy'></sub></form><legend id='vSahy'></legend><bdo id='vSahy'><pre id='vSahy'><center id='vSahy'></center></pre></bdo></b><th id='vSahy'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='vSahy'><tfoot id='vSahy'></tfoot><dl id='vSahy'><fieldset id='vSahy'></fieldset></dl></div>
        <bdo id='vSahy'></bdo><ul id='vSahy'></ul>

        如何在 discord.py 中設(shè)置可選參數(shù)?

        How do I set an optional argument in discord.py?(如何在 discord.py 中設(shè)置可選參數(shù)?)

          <legend id='JAOeb'><style id='JAOeb'><dir id='JAOeb'><q id='JAOeb'></q></dir></style></legend>
        1. <small id='JAOeb'></small><noframes id='JAOeb'>

              <i id='JAOeb'><tr id='JAOeb'><dt id='JAOeb'><q id='JAOeb'><span id='JAOeb'><b id='JAOeb'><form id='JAOeb'><ins id='JAOeb'></ins><ul id='JAOeb'></ul><sub id='JAOeb'></sub></form><legend id='JAOeb'></legend><bdo id='JAOeb'><pre id='JAOeb'><center id='JAOeb'></center></pre></bdo></b><th id='JAOeb'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='JAOeb'><tfoot id='JAOeb'></tfoot><dl id='JAOeb'><fieldset id='JAOeb'></fieldset></dl></div>

                <bdo id='JAOeb'></bdo><ul id='JAOeb'></ul>
                  <tfoot id='JAOeb'></tfoot>
                    <tbody id='JAOeb'></tbody>
                  本文介紹了如何在 discord.py 中設(shè)置可選參數(shù)?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我嘗試在線研究,但沒有其他問題可以幫助我解決我的問題.

                  I've tried to research online, but no other questions were able to help me with my issue.

                  這是我的場景.

                  我正在 discord.py 中發(fā)出靜音命令.

                  I am making a mute command in discord.py.

                  我希望時間是可選的,但如果沒有指定時間,我希望該參數(shù)成為原因的一部分.

                  I want the time to be optional, but if the time is not specified I want that argument to be part of the reason.

                  澄清我的意思:

                  @client.command()
                  @commands.has_permissions(kick_members=True)
                  async def mute(ctx, member: Member = None, time: int = None, *, reason = None):
                      pass
                  

                  這里,如果 time 為 None,則使其成為 reason 的一部分.

                  Here, if time is None, then make it part of reason.

                  機器人將接受這兩個:

                  !mute @user 1h 垃圾郵件!mute @user spam

                  這可能嗎?

                  推薦答案

                  您可以選擇異步等待,然后將用戶取消靜音:

                  You can optionally wait asynchronously and then unmute the user:

                  @bot.command()
                  async def mute(ctx, member: discord.Member, time: typing.Optional[int]):
                      await member.edit(mute=True)
                      if time:
                          await asyncio.sleep(time)
                          await member.edit(mute=False)
                  

                  這篇關(guān)于如何在 discord.py 中設(shè)置可選參數(shù)?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                  【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                  相關(guān)文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個在 Python 中提供角色的不和諧機器人?)
                  Discord bot isn#39;t responding to commands(Discord 機器人沒有響應(yīng)命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關(guān)于我嗎?Discord 機器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機器人?)
                  discord.py - Automaticaly Change an Role Color(discord.py - 自動更改角色顏色)

                    <small id='hfX2o'></small><noframes id='hfX2o'>

                      <tbody id='hfX2o'></tbody>

                    <tfoot id='hfX2o'></tfoot>
                    • <i id='hfX2o'><tr id='hfX2o'><dt id='hfX2o'><q id='hfX2o'><span id='hfX2o'><b id='hfX2o'><form id='hfX2o'><ins id='hfX2o'></ins><ul id='hfX2o'></ul><sub id='hfX2o'></sub></form><legend id='hfX2o'></legend><bdo id='hfX2o'><pre id='hfX2o'><center id='hfX2o'></center></pre></bdo></b><th id='hfX2o'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='hfX2o'><tfoot id='hfX2o'></tfoot><dl id='hfX2o'><fieldset id='hfX2o'></fieldset></dl></div>
                          <bdo id='hfX2o'></bdo><ul id='hfX2o'></ul>

                          1. <legend id='hfX2o'><style id='hfX2o'><dir id='hfX2o'><q id='hfX2o'></q></dir></style></legend>
                            主站蜘蛛池模板: 日韩精品一区二区三区视频播放 | 久久国产秒 | 精品在线播放 | 色偷偷噜噜噜亚洲男人 | 色资源在线 | 午夜精品在线观看 | 性国产xxxx乳高跟 | 91精品国产综合久久福利软件 | 午夜精品一区二区三区在线观看 | 一区在线观看 | av色噜噜| 黄色大全免费看 | 欧美成人精品一区二区三区 | 天天色天天射天天干 | 国产在线精品一区二区三区 | 日韩av一区二区在线观看 | 亚洲视频在线观看 | 午夜影院在线观看 | 成人亚洲视频 | 在线精品一区二区三区 | 久久精品伊人 | 国产精品毛片无码 | 亚洲精品一区中文字幕乱码 | 日韩区| 久久久综合精品 | 精品国产三级 | 国产精品久久久久久久久久软件 | 又黄又爽的网站 | 欧美v片| 欧美在线一区二区三区 | 亚洲情综合五月天 | 国产精品久久久久久吹潮日韩动画 | 午夜精品久久久久99蜜 | 国产东北一级毛片 | 久久精品久久精品久久精品 | 九九精品久久久 | 麻豆久久久9性大片 | 亚洲福利网 | 欧美午夜剧场 | 国产不卡在线播放 | 亚洲视频在线观看一区二区三区 |