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

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

      <tfoot id='fmi4d'></tfoot>

        • <bdo id='fmi4d'></bdo><ul id='fmi4d'></ul>
      1. discord.py 中的命令冷卻時間

        Command cooldown in discord.py(discord.py 中的命令冷卻時間)
                <tbody id='plyne'></tbody>
                <legend id='plyne'><style id='plyne'><dir id='plyne'><q id='plyne'></q></dir></style></legend>
              1. <i id='plyne'><tr id='plyne'><dt id='plyne'><q id='plyne'><span id='plyne'><b id='plyne'><form id='plyne'><ins id='plyne'></ins><ul id='plyne'></ul><sub id='plyne'></sub></form><legend id='plyne'></legend><bdo id='plyne'><pre id='plyne'><center id='plyne'></center></pre></bdo></b><th id='plyne'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='plyne'><tfoot id='plyne'></tfoot><dl id='plyne'><fieldset id='plyne'></fieldset></dl></div>

                <tfoot id='plyne'></tfoot>
                  <bdo id='plyne'></bdo><ul id='plyne'></ul>
                • <small id='plyne'></small><noframes id='plyne'>

                  本文介紹了discord.py 中的命令冷卻時間的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我希望我的 discord 機器人的命令有冷卻時間.我嘗試了其他方法,但它們似乎都不適用于我所擁有的.

                  I want commands for my discord bot to have cooldowns. I've tried other methods, but none of them seemed to work for what I have.

                  @client.event
                  async def on_message(message):
                    if message.content == 'shear sheep':
                      await message.channel.send('you sheared your sheep, gaining 1 wool.')
                      #cooldown?
                  

                  推薦答案

                  我建議使用變量來跟蹤使用該命令或冷卻前的天氣.

                  I would suggest using a variable to track weather the command has been used or before the cooldown.

                  import time
                  cooldown = True
                  
                  @client.event
                  async def on_message(message):
                      global cooldown
                      if message.content == 'shear sheep' and cooldown:
                          cooldown = False
                          await message.channel.send('you sheared your sheep, gaining 1 wool.')
                          time.sleep(1)
                          cooldown = True
                  

                  這將為所有用戶添加冷卻時間,如果您想為每個用戶添加冷卻時間,請使用表格檢查單個用戶是否使用過該命令的天氣.

                  This will add a cooldown for all users, if you want to add a cooldown for each user, use a table to check weather if an individual user has used the command.

                  import time
                  cooldown = []
                  
                  @client.event
                  async def on_message(message):
                      global cooldown
                      if message.content == 'shear sheep' and cooldown.count(message.author.id) == 0:
                          cooldown.append(message.author.id)
                          await message.channel.send('you sheared your sheep, gaining 1 wool.')
                          time.sleep(1)
                          cooldown.remove(message.author.id)
                  

                  這篇關于discord.py 中的命令冷卻時間的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個在 Python 中提供角色的不和諧機器人?)
                  Discord bot isn#39;t responding to commands(Discord 機器人沒有響應命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關于我嗎?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 - 自動更改角色顏色)
                      • <bdo id='U2eRn'></bdo><ul id='U2eRn'></ul>
                          <tbody id='U2eRn'></tbody>

                          <legend id='U2eRn'><style id='U2eRn'><dir id='U2eRn'><q id='U2eRn'></q></dir></style></legend>

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

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

                          1. 主站蜘蛛池模板: 自拍 亚洲 欧美 老师 丝袜 | 亚洲一区在线播放 | 欧美a区 | 免费视频二区 | 黑人中文字幕一区二区三区 | 免费看黄色小视频 | 91视频中文| 亚洲一区中文字幕在线观看 | 久久99精品久久久久久 | 精品在线99| 日韩一二区 | 神马久久春色视频 | 一区二区在线 | 日韩精品一区在线观看 | 国产一级视频免费播放 | 国产精品一区二区不卡 | 久久只有精品 | 免费观看黄 | 欧美日韩精品在线免费观看 | 国产精品毛片一区二区在线看 | 美国一级片在线观看 | 天天干视频| 国产日韩一区二区三区 | 美女毛片| 精品一区二区视频 | 中文字幕在线免费观看 | 日韩视频观看 | 风间由美一区二区三区在线观看 | 欧美日韩亚洲国产 | 欧美日韩亚洲系列 | 欧美白人做受xxxx视频 | 久久国产欧美日韩精品 | 手机在线一区二区三区 | 午夜影晥 | 欧美成视频 | 美日韩中文字幕 | 亚洲综合激情 | 91av大全| 久久伊| 欧美精品日韩精品国产精品 | 精品欧美一区二区三区久久久 |