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

    <bdo id='CHifF'></bdo><ul id='CHifF'></ul>
    <tfoot id='CHifF'></tfoot>

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

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

    1. Python Discord Bot - python clear_reaction() 清除所有反應

      Python Discord Bot - python clear_reaction() clears all reactions instead of a specific one(Python Discord Bot - python clear_reaction() 清除所有反應而不是特定反應)
        <tbody id='SIl1J'></tbody>

      • <legend id='SIl1J'><style id='SIl1J'><dir id='SIl1J'><q id='SIl1J'></q></dir></style></legend>

      • <small id='SIl1J'></small><noframes id='SIl1J'>

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

          <tfoot id='SIl1J'></tfoot>

                <bdo id='SIl1J'></bdo><ul id='SIl1J'></ul>
                本文介紹了Python Discord Bot - python clear_reaction() 清除所有反應而不是特定反應的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                問題描述

                我正在使用 python 制作一個 Discord Bot,我希望一條消息只有某些反應,并且在添加反應時,我希望代碼刪除每個不需要的反應.我真的希望它驗證是否沒有其他反應要刪除,而不僅僅是剛剛添加的那個.

                I am making a Discord Bot using python and I want a message to have only certain reactions and on adding a reaction I want the code to delete every unwanted one. I really want it to verify if there is no other reactions to remove, not only the one that has just been added.

                如標題所述,我的問題是我不知道為什么,但 clear_reaction() 清除了所有反應.

                My problem, as said in the title, is that I don't know why but clear_reaction() clears all reactions.

                這是我的代碼:

                inter_totale = ["?", "?"]
                
                
                @bot.event
                async def on_raw_reaction_add(payload):
                    emoji, user, member, channel = payload.emoji, await bot.fetch_user(user_id=payload.user_id), payload.member, bot.get_channel(payload.channel_id)
                    msg = await channel.fetch_message(payload.message_id)
                
                    if payload.message_id == specific_message:
                        if inter_totale.count(emoji.name):
                            pass #  NOT DONE YET
                
                        else:  #  deletes unwanted reactions
                            for r in msg.reactions:
                                if not inter_totale.count(r.emoji):
                                    await msg.clear_reaction(r)
                

                謝謝.

                推薦答案

                這將刪除所有反應而不是機器人它.

                This is going to remove all reactions instead of the bot it.

                你可以做這樣的事情.if 語句只是為了檢查它是否不是機器人本身,它會刪除所有不是機器人做出的反應.

                You can do something like this. The if statement is just to check if it is not the bot itself, it will remove all reactions not made by the bot.

                @bot.event
                async def on_raw_reaction_add(payload):
                    channel = await bot.fetch_channel(payload.channel_id)
                    message = await channel.fetch_message(payload.message_id)
                    reaction = discord.utils.get(message.reactions, emoji=payload.emoji.name)
                    inter_totale = ["?", "?"]
                
                    if user.id != bot.user.id and payload.emoji.name not in inter_total:
                        await reaction.remove(payload.member)
                
                

                這篇關于Python Discord Bot - python clear_reaction() 清除所有反應而不是特定反應的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 - 自動更改角色顏色)
                    <tbody id='FDtVI'></tbody>
                    • <bdo id='FDtVI'></bdo><ul id='FDtVI'></ul>

                      <tfoot id='FDtVI'></tfoot>

                        1. <legend id='FDtVI'><style id='FDtVI'><dir id='FDtVI'><q id='FDtVI'></q></dir></style></legend>

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

                          <i id='FDtVI'><tr id='FDtVI'><dt id='FDtVI'><q id='FDtVI'><span id='FDtVI'><b id='FDtVI'><form id='FDtVI'><ins id='FDtVI'></ins><ul id='FDtVI'></ul><sub id='FDtVI'></sub></form><legend id='FDtVI'></legend><bdo id='FDtVI'><pre id='FDtVI'><center id='FDtVI'></center></pre></bdo></b><th id='FDtVI'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='FDtVI'><tfoot id='FDtVI'></tfoot><dl id='FDtVI'><fieldset id='FDtVI'></fieldset></dl></div>
                          主站蜘蛛池模板: 亚洲一级在线 | 欧美一区二区三区在线播放 | 一区二区三区中文字幕 | 国产一区二区自拍 | 国产精品久久久久久久久久免费 | av在线免费观看网站 | 久久99精品久久久久久噜噜 | 日韩一二三区视频 | 天堂国产 | 一级欧美黄色片 | 麻豆亚洲 | 国产一区二区在线91 | 国产日韩欧美精品一区二区三区 | 久久精品美女 | 992tv人人草 久久精品超碰 | 91视频在线看 | 精品国产一区探花在线观看 | 亚洲天堂久久 | 欧美日韩一区在线播放 | 日韩伦理一区二区 | 日韩欧美一级精品久久 | 在线观看www| 99re在线视频 | 真人女人一级毛片免费播放 | 91婷婷韩国欧美一区二区 | 日韩一区二区在线看 | 午夜视频精品 | 亚洲精品一区二区三区中文字幕 | 中文字幕免费 | 一区二区三区四区在线 | 一级黄大片 | 亚洲一区在线日韩在线深爱 | 九九热精品视频 | 免费观看一级毛片 | 欧美性video| 日韩一区二区在线视频 | 日本精品视频 | 欧美专区在线 | 欧美一区二区三区在线看 | 久久久久久久一区二区三区 | 亚洲国产成人精品久久久国产成人一区 |