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

<legend id='q5aUk'><style id='q5aUk'><dir id='q5aUk'><q id='q5aUk'></q></dir></style></legend>
  • <small id='q5aUk'></small><noframes id='q5aUk'>

  • <tfoot id='q5aUk'></tfoot>
    • <bdo id='q5aUk'></bdo><ul id='q5aUk'></ul>

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

        有人加入時創建規則協議

        Creating Rule agreement when someone join(有人加入時創建規則協議)

          <tbody id='X8Ekg'></tbody>
          • <tfoot id='X8Ekg'></tfoot>

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

                • <bdo id='X8Ekg'></bdo><ul id='X8Ekg'></ul>
                  <legend id='X8Ekg'><style id='X8Ekg'><dir id='X8Ekg'><q id='X8Ekg'></q></dir></style></legend>
                  <i id='X8Ekg'><tr id='X8Ekg'><dt id='X8Ekg'><q id='X8Ekg'><span id='X8Ekg'><b id='X8Ekg'><form id='X8Ekg'><ins id='X8Ekg'></ins><ul id='X8Ekg'></ul><sub id='X8Ekg'></sub></form><legend id='X8Ekg'></legend><bdo id='X8Ekg'><pre id='X8Ekg'><center id='X8Ekg'></center></pre></bdo></b><th id='X8Ekg'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='X8Ekg'><tfoot id='X8Ekg'></tfoot><dl id='X8Ekg'><fieldset id='X8Ekg'></fieldset></dl></div>
                • 本文介紹了有人加入時創建規則協議的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我想要一個機器人,它將新成員設置為只能查看一個頻道并且必須就規則達成一致才能使用服務器的角色.我寫了這個來做到這一點,但我一直收到這個錯誤.

                  I want to a bot that will set the new member to a role that can only view one channel and have to agree on rules in order to use the server. I have wrote this to do it but I keep getting this error.

                  Ignoring exception in on_member_join
                  Traceback (most recent call last):
                    File "C:UsersezterAppDataLocalProgramsPythonPython36libsite-packagesdiscordclient.py", line 307, in _run_event
                      yield from getattr(self, event)(*args, **kwargs)
                    File "D:programingDiscord BotsOsis NationStart.py", line 31, in on_member_join
                      role = discord.utils.get(bot.roles, name="Default")
                    File "C:UsersezterAppDataLocalProgramsPythonPython36libsite-packagesdiscordclient.py", line 296, in __getattr__
                      raise AttributeError(msg.format(self.__class__, name))
                  AttributeError: '<class 'discord.ext.commands.bot.Bot'>' object has no attribute 'roles'
                  

                  我是用這段代碼來做的

                  #Welcomer
                  @bot.event
                  async def on_member_join(member):
                      print("A member just joined and his name is" + member.name)
                      mid = member.id
                      role = discord.utils.get(bot.roles, name="Default")
                      role3 = discord.utils.get(member.server.roles, id="<479670838648635392>")
                      role2 = discord.utils.get(member.server.roles, id="<479692108953944081>")
                      await bot.add_roles(member, bot.get_)
                  
                      Rules = "1. Do not DM the Owner or any other staff unless they have DMed you first! 
                   2. Be kind, 
                   3. Use common sense, 
                   4. No swearing, 
                   5. No racism or bullying, 
                   6. No advertising, 
                   7. Do not chat in #music Text or Voice channels, 
                   8. Do not spam #applications if your application is accepted or denied! This is only to be used for submitting and staff members replying to the application. 
                   9. Do not use or abuse bot commands you should not be using! 
                   10. Do not @ any staff members unless it is an emergency.  "
                  
                      await bot.send_message(bot.get_channel('479685091749134346'), 'Hello <@%s>, Welcome to Osis Nation, please read all the rules carefully' % (mid))
                      await bot.send_message(bot.get_channel('479685091749134346'), (Rules))
                      await bot.send_message(bot.get_channel('479685091749134346'), 'If you agree write !Agree. If you do not agree write !Decline')
                  
                      if member.content.upper().startwith("!Agree"):
                          await bot.send_message(bot.get_channel('479685091749134346'), 'You will be redirected to the server in 5 seconds')
                          time.sleep(5)
                  
                          await bot.remove_roles(member, role)
                  

                  推薦答案

                  我是用這段代碼做到的

                      #Welcomer
                  @bot.event
                  async def on_member_join(member):
                      print("A member just joined and his name is" + member.name)
                      mid = member.id
                      role = discord.utils.get(member.server.roles, name="Default")
                      await bot.add_roles(member, role)
                  
                      Rules = "1. Do not DM the Owner or any other staff unless they have DMed you first! 
                   2. Be kind, 
                   3. Use common sense, 
                   4. No swearing, 
                   5. No racism or bullying, 
                   6. No advertising, 
                   7. Do not chat in #music Text or Voice channels, 
                   8. Do not spam #applications if your application is accepted or denied! This is only to be used for submitting and staff members replying to the application. 
                   9. Do not use or abuse bot commands you should not be using! 
                   10. Do not @ any staff members unless it is an emergency.  "
                  
                      await bot.send_message(bot.get_channel('479685091749134346'), 'Hello <@%s>, Welcome to Osis Nation, please read all the rules carefully' % (mid))
                      await bot.send_message(bot.get_channel('479685091749134346'), (Rules))
                      await bot.send_message(bot.get_channel('479685091749134346'), 'If you agree write !Agree. If you do not agree write !Decline')
                  @bot.event
                  async def on_message(message):
                      if message.content.upper().startswith("!AGREE"):
                          await bot.send_message(bot.get_channel('479685091749134346'), 'You will be redirected to the server in 5 seconds')
                          time.sleep(5)
                          role = discord.utils.get(message.server.roles, name="Default")
                          await bot.remove_roles(message.author, role)
                  

                  這篇關于有人加入時創建規則協議的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 - 自動更改角色顏色)

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

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

                        <tbody id='nP6VC'></tbody>

                      <legend id='nP6VC'><style id='nP6VC'><dir id='nP6VC'><q id='nP6VC'></q></dir></style></legend>
                      <tfoot id='nP6VC'></tfoot>

                            主站蜘蛛池模板: 国产午夜高清 | 国产毛片久久久 | 在线观看国产 | 久在线| 激情福利视频 | 国产精品99久久久久久宅男 | 性高湖久久久久久久久3小时 | 欧美综合一区二区三区 | av高清毛片 | 免费特黄视频 | 亚洲五码久久 | 欧美精品成人一区二区三区四区 | 久久久久九九九九 | 97国产精品视频人人做人人爱 | 一区二区三区精品在线 | 小川阿佐美pgd-606在线 | 日韩av啪啪网站大全免费观看 | 欧美日韩一卡二卡 | 综合久久国产 | 99久久久无码国产精品 | 欧美一区二区三区视频在线 | 精品天堂| 在线成人av | 中文字幕精品一区二区三区精品 | 99热首页| 岛国av免费在线观看 | 99精品久久99久久久久 | 成人在线视频一区二区三区 | 色久伊人| 成人国产a | 国产一区二区精品在线 | 国产成人精品一区二区三区在线 | 成人av观看| 欧美日韩综合 | 成人在线不卡 | 女生羞羞网站 | 国产精品久久久久久福利一牛影视 | 中文字幕亚洲精品 | 亚洲欧美国产毛片在线 | 日韩综合在线 | 亚洲福利精品 |