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

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

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

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

    1. discord.py 中的 Cog 和 Extension 有什么區(qū)別?

      Whats the difference between a Cog and an Extension in discord.py?(discord.py 中的 Cog 和 Extension 有什么區(qū)別?)
    2. <small id='RThpr'></small><noframes id='RThpr'>

      • <bdo id='RThpr'></bdo><ul id='RThpr'></ul>
          <tbody id='RThpr'></tbody>

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

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

              • 本文介紹了discord.py 中的 Cog 和 Extension 有什么區(qū)別?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                問題描述

                在 discord.py 文檔中,有擴展:https://discordpy.readthedocs.io/en/stable/ext/commands/extensions.html和齒輪:https://discordpy.readthedocs.io/en/stable/ext/commands/cogs.html有什么區(qū)別?

                In the discord.py documention, there are Extensions: https://discordpy.readthedocs.io/en/stable/ext/commands/extensions.html and Cogs: https://discordpy.readthedocs.io/en/stable/ext/commands/cogs.html what is the difference?

                推薦答案

                擴展是被加載的文件,當(dāng)你調(diào)用 load_extension 時,將它們視為 discord.py 庫導(dǎo)入的模塊.導(dǎo)入發(fā)生后,一個 setup 函數(shù)被調(diào)用,并被傳遞給它被加載到的 Bot 實例......本質(zhì)上是 module.setup(bot).就是這樣,沒有更多的擴展......通常這個設(shè)置函數(shù)調(diào)用 add_cog 將在下面描述,但是沒有要求他們這樣做.

                Extensions are files that are loaded, think of them as modules that the discord.py library imports when you call load_extension. After the import happens, a setup function is called, and is passed the Bot instance that it was loaded into....essentially module.setup(bot). That is it, there is no more to extensions...typically this setup function calls add_cog which will be described next, however there is no requirement that they do so.

                Cog 是從 commands.Cog 繼承的類,并通過 add_cog 添加到機器人的 cog 列表中,這些類通常包含命令并充當(dāng)"類別"對于這些命令.它還可以容納諸如 on_messageon_member_join 等事件的偵聽器.

                A Cog is a class that inherits from commands.Cog and is added to the bot's list of cogs through add_cog, these classes typically house commands and act as a "category" for these commands. It can also house listeners for events such as on_message or on_member_join, etc.

                TL;DR - 擴展是導(dǎo)入的模塊,cogs 是類

                這篇關(guān)于discord.py 中的 Cog 和 Extension 有什么區(qū)別?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

                【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

                相關(guān)文檔推薦

                How to make a discord bot that gives roles in Python?(如何制作一個在 Python 中提供角色的不和諧機器人?)
                Discord bot isn#39;t responding to commands(Discord 機器人沒有響應(yīng)命令)
                Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關(guān)于我嗎?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 - 自動更改角色顏色)
                <legend id='trqiF'><style id='trqiF'><dir id='trqiF'><q id='trqiF'></q></dir></style></legend>
                  <tbody id='trqiF'></tbody>

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

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

                          <tfoot id='trqiF'></tfoot>

                        1. 主站蜘蛛池模板: 苏商学院官网 - 江苏地区唯一一家企业家自办的前瞻型、实操型商学院 | 制氮设备-变压吸附制氮设备-制氧设备-杭州聚贤气体设备制造有限公司 | 智能气瓶柜(大型气瓶储存柜)百科 | wika威卡压力表-wika压力变送器-德国wika代理-威卡总代-北京博朗宁科技 | 超声波破碎仪-均质乳化机(供应杭州,上海,北京,广州,深圳,成都等地)-上海沪析实业有限公司 | 钢格板|镀锌钢格板|热镀锌钢格板|格栅板|钢格板|钢格栅板|热浸锌钢格板|平台钢格板|镀锌钢格栅板|热镀锌钢格栅板|平台钢格栅板|不锈钢钢格栅板 - 专业钢格板厂家 | 成都LED显示屏丨室内户外全彩led屏厂家方案报价_四川诺显科技 | 精密模具制造,注塑加工,吹塑和吹瓶加工,EPS泡沫包装生产 - 济南兴田塑胶有限公司 | 菲希尔FISCHER测厚仪-铁素体检测仪-上海吉馨实业发展有限公司 | 污水处理设备维修_污水处理工程改造_机械格栅_过滤设备_气浮设备_刮吸泥机_污泥浓缩罐_污水处理设备_污水处理工程-北京龙泉新禹科技有限公司 | 耐腐蚀泵,耐腐蚀真空泵,玻璃钢真空泵-淄博华舜耐腐蚀真空泵有限公司 | 心肺复苏模拟人|医学模型|急救护理模型|医学教学模型上海康人医学仪器设备有限公司 | 智慧农业|农业物联网|现代农业物联网-托普云农物联网官方网站 | 旋片真空泵_真空泵_水环真空泵_真空机组-深圳恒才机电设备有限公司 | 卓能JOINTLEAN端子连接器厂家-专业提供PCB接线端子|轨道式端子|重载连接器|欧式连接器等电气连接产品和服务 | 郑州墨香品牌设计公司|品牌全案VI设计公司 | ptc_浴霸_大巴_干衣机_呼吸机_毛巾架_电动车加热器-上海帕克 | 作文导航网_作文之家_满分作文_优秀作文_作文大全_作文素材_最新作文分享发布平台 | 工业用品一站式采购平台|南创工品汇-官网|广州南创 | 多米诺-多米诺世界纪录团队-多米诺世界-多米诺团队培训-多米诺公关活动-多米诺创意广告-多米诺大型表演-多米诺专业赛事 | 山东柳店新能源科技有限公司| 鄂泉泵业官网|(杭州、上海、全国畅销)大流量防汛排涝泵-LW立式排污泵 | 英国雷迪地下管线探测仪-雷迪RD8100管线仪-多功能数字听漏仪-北京迪瑞进创科技有限公司 | 贴片电容代理-三星电容-村田电容-风华电容-国巨电容-深圳市昂洋科技有限公司 | 手持式3d激光扫描仪-便携式三维立体扫描仪-北京福禄克斯 | 山楂片_雪花_迷你山楂片_山楂条饼厂家-青州市丰源食品厂 | 超声波成孔成槽质量检测仪-压浆机-桥梁预应力智能张拉设备-上海硕冠检测设备有限公司 | 雷达液位计_超声波风速风向仪_雨量传感器_辐射传感器-山东风途物联网 | 金属管浮子流量计_金属转子流量计厂家-淮安润中仪表科技有限公司 | 工程管道/塑料管材/pvc排水管/ppr给水管/pe双壁波纹管等品牌管材批发厂家-河南洁尔康建材 | 污水提升器,污水提升泵,地下室排水,增压泵,雨水泵,智能供排水控制器-上海智流泵业有限公司 | 岸电电源-60HZ变频电源-大功率变频电源-济南诚雅电子科技有限公司 | 集装箱箱号识别_自重载重图像识别_铁路车号自动识别_OCR图像识别 | 山东彩钢板房,山东彩钢活动房,临沂彩钢房-临沂市贵通钢结构工程有限公司 | 青岛成人高考_山东成考报名网| sfp光模块,高速万兆光模块工厂-性价比更高的光纤模块制造商-武汉恒泰通 | 杭州代理记账多少钱-注册公司代办-公司注销流程及费用-杭州福道财务管理咨询有限公司 | 天津货架厂_穿梭车货架_重型仓储货架_阁楼货架定制-天津钢力仓储货架生产厂家_天津钢力智能仓储装备 | 红立方品牌应急包/急救包加盟,小成本好项目代理_应急/消防/户外用品加盟_应急好项目加盟_新奇特项目招商 - 中红方宁(北京) 供应链有限公司 | 胜为光纤光缆_光纤跳线_单模尾纤_光纤收发器_ODF光纤配线架厂家直销_北京睿创胜为科技有限公司 - 北京睿创胜为科技有限公司 | 酒糟烘干机-豆渣烘干机-薯渣烘干机-糟渣烘干设备厂家-焦作市真节能环保设备科技有限公司 |