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

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

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

      <tfoot id='GUKWl'></tfoot>

        <i id='GUKWl'><tr id='GUKWl'><dt id='GUKWl'><q id='GUKWl'><span id='GUKWl'><b id='GUKWl'><form id='GUKWl'><ins id='GUKWl'></ins><ul id='GUKWl'></ul><sub id='GUKWl'></sub></form><legend id='GUKWl'></legend><bdo id='GUKWl'><pre id='GUKWl'><center id='GUKWl'></center></pre></bdo></b><th id='GUKWl'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='GUKWl'><tfoot id='GUKWl'></tfoot><dl id='GUKWl'><fieldset id='GUKWl'></fieldset></dl></div>
      1. discord.py “wait_for"命令中的反應(yīng)

        discord.py quot;wait_forquot; a reaction in a command(discord.py “wait_for命令中的反應(yīng))
          <tbody id='IZA68'></tbody>

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

        <tfoot id='IZA68'></tfoot>

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

          <bdo id='IZA68'></bdo><ul id='IZA68'></ul>

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

                1. 本文介紹了discord.py “wait_for"命令中的反應(yīng)的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我已經(jīng)寫了一個命令.當您執(zhí)行此命令時,機器人會向特定頻道發(fā)送消息.他對此消息添加了一個反應(yīng)(順便說一句嵌入).到目前為止.但是現(xiàn)在,當有人點擊這個反應(yīng)時,我希望機器人做出回應(yīng).在這種情況下,他應(yīng)該向特定頻道發(fā)送消息.但這不起作用.也沒有錯誤碼,應(yīng)該是可以的,只是他沒有發(fā)消息.

                  I have already written a command. When you execute this command, the bot sends a message to a specific channel. He adds a reaction to this message (an embed by the way). That goes so far. But now, when someone clicks on this reaction, I wanted the bot to respond. In this case, he should send a message to a specific channel. But that doesn't work. There is also no error code, which is supposed to mean that it works, only he doesn't send a message.

                  @bot.command()
                  async def buy(ctx, choice):
                      channel = bot.get_channel(705836078082424914)
                      user = ctx.message.author
                      vcrole1 = get(user.guild.roles, id=703562188224331777)
                      messagechannel = ctx.message.channel.id
                      if ctx.message.channel.id == 705146663135871106:
                          if choice == '1':
                              if any(role.id == 703562188224331777 for role in ctx.message.author.roles):
                                  await user.remove_roles(vcrole1)
                                  await ctx.send(
                                      "not important message")
                                  messtag1 = await channel.send('not important') 
                                  await messtag1.delete(delay=None)
                  
                                  embed = discord.Embed(color=0xe02522, title='not important title', description=
                                  'not important description')
                                  embed.set_footer(text='not important text')
                                  embed.timestamp = datetime.datetime.utcnow()
                  
                                  mess1 = await channel.send(embed=embed)
                                  await mess1.add_reaction('<a:check:674039577882918931>')
                  
                                  def check(reaction, user):
                  
                                      return reaction.message == mess1 and str(reaction.emoji) ==  '<a:check:674039577882918931>'
                  
                                  await bot.wait_for('reaction_add', check=check)
                                  channeldone = bot.get_channel(705836078082424914)
                                  await channeldone.send('test')
                  

                  沒有錯誤消息.

                  推薦答案

                  看起來你的 reaction.message == mess1 條件返回 False,我可以不要把它縮小到為什么會發(fā)生這種情況,但如果我這樣做了,我會編輯它.

                  It looks as though your reaction.message == mess1 condition is returning False, and I can't narrow it down as to why that's happening, but I'll edit this if I do.

                  解決這個問題的一種方法是評估消息的 ID:

                  A way to overcome this would be to evaluate the IDs of the messages:

                  return reaction.message.id == mess1.id and str(reaction.emoji) == '<a:check:674039577882918931>'
                  

                  當機器人做出反應(yīng)時,這將評估為 True,所以我建議添加另一個條件來檢查用戶是否做出反應(yīng),如果這是您希望用戶執(zhí)行的操作:

                  And this will evaluate to True when the bot reacts, so I'd recommend adding another condition to check that the user reacted, if that is what you want the user to do:

                  return .... and user == ctx.author
                  

                  <小時>

                  參考資料:

                  • Message.id
                  • discord.Member

                  這篇關(guān)于discord.py “wait_for"命令中的反應(yīng)的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 - 自動更改角色顏色)

                    <tfoot id='IrJpk'></tfoot>
                        <tbody id='IrJpk'></tbody>

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

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

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

                          • 主站蜘蛛池模板: 国产在线精品一区二区三区 | 国产视频线观看永久免费 | 久久久久久99 | 国产在线观看不卡一区二区三区 | 精品亚洲一区二区 | 色网站入口 | 欧美中文字幕在线观看 | 自拍视频一区二区三区 | 一区二区三区四区在线 | 亚洲97 | 99精品久久 | 古典武侠第一页久久777 | 日韩有码在线播放 | 天天操天天天干 | 国产精品成av人在线视午夜片 | 亚洲一区二区三区在线 | 97国产精品视频人人做人人爱 | 一本色道久久综合亚洲精品高清 | 国产精品免费一区二区三区 | 国产综合精品一区二区三区 | 成人国产精品久久久 | 五月婷亚洲 | 亚洲午夜精品视频 | 国产精品久久久久久福利一牛影视 | 精品一区二区三区不卡 | 亚洲午夜精品视频 | 国产精品99久久久久久人 | 一级日批片 | 国产美女久久 | 色婷婷综合久久久久中文一区二区 | 精品视频一区二区三区在线观看 | 国产精品成人在线 | 亚洲精品2区 | 免费一级黄色录像 | 红色av社区 | 亚洲天堂免费 | 国产一区二区三区四区在线观看 | 日本高清视频在线播放 | 丝袜天堂| 日韩久久久久久久久久久 | 久久中文字幕一区 |