久久久久久久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ù)?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

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

                  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>
                            主站蜘蛛池模板: 91麻豆精品一区二区三区 | 国产精品中文字幕在线播放 | 久久久久久久久久久高潮一区二区 | 久久久激情 | 97影院在线午夜 | 欧美国产日韩在线观看成人 | 黄色在线播放视频 | 色婷婷综合网 | 国产亚洲精品精品国产亚洲综合 | 久久中文字幕视频 | 亚洲国产一区二区三区在线观看 | 韩日在线 | 日韩视频一区 | 91视频麻豆| 亚洲国产片 | 色资源站 | 亚洲日产精品 | 久久久久中文字幕 | 国产一区二区三区色淫影院 | 国产一区欧美一区 | 亚洲 欧美 日韩在线 | 精品二三区 | 天天躁日日躁性色aⅴ电影 免费在线观看成年人视频 国产欧美精品 | 亚洲 中文 欧美 日韩 在线观看 | 久久久成人免费视频 | 午夜一区 | v亚洲 | 久久精品国产久精国产 | 午夜伦理影院 | 台湾a级理论片在线观看 | 亚洲视频一区在线观看 | 日韩视频在线免费观看 | 久久综合久| 颜色网站在线观看 | 国产精品久久二区 | 国产探花在线观看视频 | 亚洲精品在线看 | 欧洲精品视频一区 | 午夜精品在线观看 | 天天拍天天色 | 丝袜一区二区三区 |