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

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

    1. <tfoot id='v4B9K'></tfoot>
        <bdo id='v4B9K'></bdo><ul id='v4B9K'></ul>

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

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

        如何在 discord.py 中轉義 @everyone?

        How do I escape @everyone in discord.py?(如何在 discord.py 中轉義 @everyone?)

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

        1. <tfoot id='0uahK'></tfoot>
            • <bdo id='0uahK'></bdo><ul id='0uahK'></ul>
                <tbody id='0uahK'></tbody>

                <small id='0uahK'></small><noframes id='0uahK'>

                  <legend id='0uahK'><style id='0uahK'><dir id='0uahK'><q id='0uahK'></q></dir></style></legend>
                  本文介紹了如何在 discord.py 中轉義 @everyone?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在 Python 中開發一個 Discord 機器人,它根據用戶輸入輸出文本.我想避免用戶讓它說 @everyone(和 @here),這會標記和惹惱所有人.

                  I'm developing a Discord bot in Python which outputs text based on user input. I want to avoid users getting it to say @everyone (and @here) which would tag and annoy everyone.

                  我嘗試使用 @everyone@everyone 相比,它不會使文本本身變成藍色,但它仍然會觸發 ping 并突出顯示該行黃色.這不僅會在我使用機器人發送消息時發生,而且在我直接使用 Discord 時也會發生.

                  I tried using @everyone which in contrast to @everyone does not make the text itself blue, but it still triggers a ping and highlights the line in yellow. This does not only happen when I send a message with the bot but also if I use Discord directly.

                  推薦答案

                  我一直使用的解決方案是插入一個 零寬度空格在@"之后.這不會改變文本外觀(零寬度"),但額外的字符會阻止 ping.它具有 unicode 代碼點 200b(十六進制):

                  The solution I've been using is to insert a zero-width space after the '@'. This will not change the text appearance ('zero-width') but the extra character prevents the ping. It has unicode codepoint 200b (in hex):

                  message_str = message_str.replace('@', '@?u200b') 
                  

                  更明確地說,discord.py 庫本身有 escape_mentions 用于此目的:

                  More explicitly, the discord.py library itself has escape_mentions for that purpose:

                  message_str = discord.utils.escape_mentions(message_str)
                  

                  實現幾乎相同:

                  def escape_mentions(text):
                      return re.sub(r'@(everyone|here|[!&]?[0-9]{17,21})', '@u200b\1', text)
                  

                  這篇關于如何在 discord.py 中轉義 @everyone?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 - 自動更改角色顏色)

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

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

                      <tfoot id='wedqM'></tfoot>

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

                          • <bdo id='wedqM'></bdo><ul id='wedqM'></ul>
                              <tbody id='wedqM'></tbody>
                            主站蜘蛛池模板: 日日夜夜精品免费视频 | 欧美在线a | 超碰97人人人人人蜜桃 | 一二区视频 | 中文字幕精品视频在线观看 | 免费黄色大片 | 久久欧美精品 | 日韩av看片| 91免费入口| 国产精品久久久久国产a级 欧美日韩国产免费 | 天天夜夜人人 | 久久精品国产99国产精品 | 成年人在线视频 | 日韩电影免费在线观看中文字幕 | 欧美99 | 97视频在线观看网站 | 婷婷桃色网 | 色婷婷久久久久swag精品 | 91精品久久久 | 成人精品国产 | 久久精品99久久 | 国产一区久久精品 | m豆传媒在线链接观看 | 国产高清免费视频 | 91不卡 | 国产高清在线精品 | 亚洲视频欧美视频 | 久久久www成人免费无遮挡大片 | 日韩欧美国产精品一区二区 | 91精品在线播放 | 在线精品亚洲欧美日韩国产 | 成人伊人网 | 成年人网站免费视频 | 一区欧美 | 日韩欧美专区 | 亚洲一区在线日韩在线深爱 | 在线观看亚洲专区 | 亚洲精品二区 | 国产综合在线视频 | 国产日韩精品视频 | av黄色在线观看 |