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

                  問題描述

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

                  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)
                  

                  這篇關(guān)于discord.py 中的命令冷卻時間的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 中提供角色的不和諧機(jī)器人?)
                  Discord bot isn#39;t responding to commands(Discord 機(jī)器人沒有響應(yīng)命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關(guān)于我嗎?Discord 機(jī)器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機(jī)器人?)
                  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. 主站蜘蛛池模板: 色综合久久久久 | 亚洲欧洲在线观看 | 久久国产成人 | 欧美日韩毛片 | 黄色激情视频在线观看 | 亚洲 欧美 激情 另类 校园 | 涩涩的视频 | 欧美综合一区 | 天天艹夜夜艹 | 99精品久久久久久中文字幕 | 日韩高清在线观看 | 亚洲免费专区 | 国产福利小视频 | 久久99精品久久久久久水蜜桃 | 成人免费激情视频 | 激情都市亚洲 | 久久精品视频免费 | 激情91| 午夜99| 国产专区在线播放 | 日本免费中文字幕 | 亚洲激情成人 | av噜噜| 国产一区二区不卡 | 日韩色在线 | 日韩成人免费视频 | 午夜久久| 亚洲激情五月 | 免费观看黄色片 | 日本美女性生活 | 日韩在线免费观看视频 | 日韩欧美影院 | 日韩一区二区三 | 亚洲欧美在线视频 | 午夜免费毛片 | 午夜精品久久久久久久久久久久 | 亚州精品视频 | 三上悠亚激情av一区二区三区 | 91久久久久久久久 | 天天干天天操天天 | 日韩毛片网站 |