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

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

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

    <legend id='GG1Us'><style id='GG1Us'><dir id='GG1Us'><q id='GG1Us'></q></dir></style></legend>
    <tfoot id='GG1Us'></tfoot>
        • <bdo id='GG1Us'></bdo><ul id='GG1Us'></ul>

        如何檢查 X 分鐘內(nèi)是否沒有消息發(fā)送?(discord.py)

        How to check if no message has been sent for X minutes? (discord.py)(如何檢查 X 分鐘內(nèi)是否沒有消息發(fā)送?(discord.py))
        <legend id='H1XGv'><style id='H1XGv'><dir id='H1XGv'><q id='H1XGv'></q></dir></style></legend>

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

            1. <small id='H1XGv'></small><noframes id='H1XGv'>

                  <bdo id='H1XGv'></bdo><ul id='H1XGv'></ul>
                • 本文介紹了如何檢查 X 分鐘內(nèi)是否沒有消息發(fā)送?(discord.py)的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我正在嘗試執(zhí)行一個(gè)命令,當(dāng)在用戶指定的時(shí)間內(nèi)沒有發(fā)送任何消息時(shí),機(jī)器人會(huì)發(fā)送一個(gè)隨機(jī)主題,但是,我似乎無法正確設(shè)置計(jì)時(shí)部分.

                  I am trying to do a command where the bot sends a random topic when no message has been sent for the time the user specifies, however, I can't seem to get the timing part right.

                  我的問題是:如何檢查頻道中 X 分鐘內(nèi)是否沒有消息發(fā)送?這是我想出的代碼:

                  My question is: How do I check if no message has been sent in a channel for X minutes? Here is the code I came up with:

                  @bot.command()
                  async def timedtopic(ctx, time : int):
                      global keepLooping
                      timer = dt.datetime.utcnow() + dt.timedelta(seconds=time)
                      keepLooping = True
                      embed = discord.Embed(title="Reviver's topic is", description=(random.choice(List)))
                      await asyncio.sleep(time)
                      while keepLooping:
                          if timer > ctx.channel.last_message.created_at and ctx.channel.last_message.author != bot.user:
                              await ctx.send(embed=embed)
                  

                  推薦答案

                  試試這個(gè).

                  channel = ctx.channel
                  async for message in channel.history(limit = 1):
                      past_message = message.created_at
                  await asyncio.sleep(time)
                  async for message in channel.history(limit = 1):
                      new_message = message.created_at
                  if past_message == new_message:
                      print(f"No message has been sent in {time} seconds!")
                  

                  這篇關(guān)于如何檢查 X 分鐘內(nèi)是否沒有消息發(fā)送?(discord.py)的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個(gè)在 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 - 自動(dòng)更改角色顏色)
                • <legend id='OewgZ'><style id='OewgZ'><dir id='OewgZ'><q id='OewgZ'></q></dir></style></legend>

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

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

                          <tfoot id='OewgZ'></tfoot>
                              <tbody id='OewgZ'></tbody>
                            主站蜘蛛池模板: 精品久久99 | 麻豆精品久久 | 日本特黄a级高清免费大片 特黄色一级毛片 | 免费久久网 | 亚洲精选一区二区 | 成人精品网 | 夜夜精品浪潮av一区二区三区 | 狠狠干天天干 | 成人免费小视频 | 天天天天天操 | 亚洲一区二区三区四区五区午夜 | 国产激情网站 | 日韩一区二 | 蜜桃视频在线观看免费视频网站www | 欧美日韩国产一区二区三区 | 在线成人av | 国产日韩欧美 | 国产91精品在线 | 一区二区三区精品视频 | 视频一区二区在线观看 | 日本精品一区二区三区在线观看视频 | 亚洲欧美日韩在线 | 久久亚洲一区二区三区四区 | 日韩一区中文字幕 | 综合激情久久 | 中文字幕亚洲区一区二 | 欧美日韩久久久 | 午夜看片 | 午夜欧美 | 日韩资源| 中文av在线播放 | 久久久久久久久久久爱 | 日本不卡一区 | 国产成人99久久亚洲综合精品 | 精品少妇一区二区三区日产乱码 | 国产大学生情侣呻吟视频 | 日本精品一区二区三区在线观看视频 | 亚洲天堂一区二区 | 欧美一区二区三区在线观看视频 | 亚洲欧美一区二区三区在线 | av一级毛片 |