久久久久久久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精品99久久久久久宅男 | 日日干日日操 | 在线欧美一区 | 国产成人久久精品一区二区三区 | 免费v片在线观看 | 欧美日韩久久 | 在线看日韩av | 久久欧美高清二区三区 | 中文字幕高清一区 | 日韩在线观看一区 | 国产精品视频偷伦精品视频 | 国产精品久久久久久久久久久新郎 | 国产精品av久久久久久久久久 | 色橹橹欧美在线观看视频高清 | 中文在线一区二区 | 不卡的av电影 | 国产精品欧美一区二区三区 | 亚洲韩国精品 | 91色综合 | 国产97碰免费视频 | 久草www| 国产综合精品 | 久久久久久综合 | 天天拍天天插 | 一本大道久久a久久精二百 国产成人免费在线 | 久久69精品久久久久久久电影好 | 中文字幕日韩三级 | 亚洲色综合| 6080yy精品一区二区三区 | 在线观看亚洲专区 | 亚洲一区 中文字幕 | 亚洲精品一区中文字幕乱码 | 亚洲+变态+欧美+另类+精品 | 亚洲欧美日韩精品久久亚洲区 | 成人一区二区视频 | 免费精品 | 欧美一区二区综合 |