pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

<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="3h5trlv" 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="7jxf1lb" 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="tn9f1h5" 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>

                            主站蜘蛛池模板: 胜为光纤光缆_光纤跳线_单模尾纤_光纤收发器_ODF光纤配线架厂家直销_北京睿创胜为科技有限公司 - 北京睿创胜为科技有限公司 | 上海皓越真空设备有限公司官网-真空炉-真空热压烧结炉-sps放电等离子烧结炉 | 塑料托盘厂家直销-吹塑托盘生产厂家-力库塑业【官网】 | 千淘酒店差旅平台-中国第一家针对TMC行业的酒店资源供应平台 | 蔬菜配送公司|蔬菜配送中心|食材配送|饭堂配送|食堂配送-首宏公司 | 定制异形重型钢格栅板/钢格板_定做踏步板/排水沟盖板_钢格栅板批发厂家-河北圣墨金属制品有限公司 | T恤衫定做,企业文化衫制作订做,广告T恤POLO衫定制厂家[源头工厂]-【汉诚T恤定制网】 | 船用烟火信号弹-CCS防汛救生圈-船用救生抛绳器(海威救生设备) | 模具硅橡胶,人体硅胶,移印硅胶浆厂家-宏图硅胶科技 | 航空连接器,航空插头,航空插座,航空接插件,航插_深圳鸿万科 | 家乐事净水器官网-净水器厂家「官方」 | BHK汞灯-百科|上海熙浩实业有限公司 | 喷砂机厂家_自动除锈抛丸机价格-成都泰盛吉自动化喷砂设备 | 郑州大巴车出租|中巴车租赁|旅游大巴租车|包车|郑州旅游大巴车租赁有限公司 | 不锈钢发酵罐_水果酒发酵罐_谷物发酵罐_山东誉诚不锈钢制品有限公司 | 杭州火蝠电商_京东代运营_拼多多全托管代运营【天猫代运营】 | 企业管理培训,企业培训公开课,企业内训课程,企业培训师 - 名课堂企业管理培训网 | 新型游乐设备,360大摆锤游乐设备「诚信厂家」-山东方鑫游乐设备 新能源汽车电池软连接,铜铝复合膜柔性连接,电力母排-容发智能科技(无锡)有限公司 | 厦门ISO认证|厦门ISO9001认证|厦门ISO14001认证|厦门ISO45001认证-艾索咨询专注ISO认证行业 | 耐磨陶瓷管道_除渣器厂家-淄博浩瀚陶瓷科技有限公司 | 紧急泄压人孔_防爆阻火器_阻火呼吸阀[河北宏泽石化] | 嘉兴泰东园林景观工程有限公司_花箱护栏 | 杭州代理记账多少钱-注册公司代办-公司注销流程及费用-杭州福道财务管理咨询有限公司 | 板框压滤机-隔膜压滤机配件生产厂家-陕西华星佳洋装备制造有限公司 | 山东钢格板|栅格板生产厂家供应商-日照森亿钢格板有限公司 | 急救箱-应急箱-急救包厂家-北京红立方医疗设备有限公司 | 精密模具加工制造 - 富东懿| 骨密度检测仪_骨密度分析仪_骨密度仪_动脉硬化检测仪专业生产厂家【品源医疗】 | 学习安徽网| 作文导航网_作文之家_满分作文_优秀作文_作文大全_作文素材_最新作文分享发布平台 | 桁架机器人_桁架机械手_上下料机械手_数控车床机械手-苏州清智科技装备制造有限公司 | 机制砂选粉机_砂石选粉机厂家-盐城市助成粉磨科技有限公司 | 搅拌磨|搅拌球磨机|循环磨|循环球磨机-无锡市少宏粉体科技有限公司 | 煤棒机_增碳剂颗粒机_活性炭颗粒机_木炭粉成型机-巩义市老城振华机械厂 | 硅PU球场、篮球场地面施工「水性、环保、弹性」硅PU材料生产厂家-广东中星体育公司 | 气动|电动调节阀|球阀|蝶阀-自力式调节阀-上海渠工阀门管道工程有限公司 | 河南彩印编织袋,郑州饲料编织袋定制,肥料编织袋加工厂-盛军塑业 河南凯邦机械制造有限公司 | 板式换网器_柱式换网器_自动换网器-郑州海科熔体泵有限公司 | 偏心半球阀-电动偏心半球阀-调流调压阀-旋球阀-上欧阀门有限公司 | 台湾Apex减速机_APEX行星减速机_台湾精锐减速机厂家代理【现货】-杭州摩森机电 | ★店家乐|服装销售管理软件|服装店收银系统|内衣店鞋店进销存软件|连锁店管理软件|收银软件手机版|会员管理系统-手机版,云版,App |