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

    <bdo id='d5omr'></bdo><ul id='d5omr'></ul>

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

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

        <i id='d5omr'><tr id='d5omr'><dt id='d5omr'><q id='d5omr'><span id='d5omr'><b id='d5omr'><form id='d5omr'><ins id='d5omr'></ins><ul id='d5omr'></ul><sub id='d5omr'></sub></form><legend id='d5omr'></legend><bdo id='d5omr'><pre id='d5omr'><center id='d5omr'></center></pre></bdo></b><th id='d5omr'></th></span></q></dt></tr></i><div class="amea2aw" id='d5omr'><tfoot id='d5omr'></tfoot><dl id='d5omr'><fieldset id='d5omr'></fieldset></dl></div>
      1. discord.py send_message 用法

        discord.py send_message usage(discord.py send_message 用法)

        • <bdo id='95Kch'></bdo><ul id='95Kch'></ul>
          <tfoot id='95Kch'></tfoot>
              <tbody id='95Kch'></tbody>

              <small id='95Kch'></small><noframes id='95Kch'>

              1. <legend id='95Kch'><style id='95Kch'><dir id='95Kch'><q id='95Kch'></q></dir></style></legend>
                  <i id='95Kch'><tr id='95Kch'><dt id='95Kch'><q id='95Kch'><span id='95Kch'><b id='95Kch'><form id='95Kch'><ins id='95Kch'></ins><ul id='95Kch'></ul><sub id='95Kch'></sub></form><legend id='95Kch'></legend><bdo id='95Kch'><pre id='95Kch'><center id='95Kch'></center></pre></bdo></b><th id='95Kch'></th></span></q></dt></tr></i><div class="issgwig" id='95Kch'><tfoot id='95Kch'></tfoot><dl id='95Kch'><fieldset id='95Kch'></fieldset></dl></div>
                  本文介紹了discord.py send_message 用法的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  我已經(jīng)開始著手一個(gè)項(xiàng)目來加速我對(duì) python 的學(xué)習(xí).我正在嘗試重新創(chuàng)建一個(gè)我經(jīng)常使用的不和諧機(jī)器人,因?yàn)槲乙呀?jīng)習(xí)慣了它的功能.以下是我當(dāng)前的代碼

                  I've started working on a project to accelerate my learning of python. I'm trying to recreate a discord bot I use quite a bit since i'm already use to its features. Below is my current code

                  import discord
                  from discord import User
                  from discord.ext.commands import Bot
                  
                  import secrets
                  
                  pybot = Bot(command_prefix = "!")
                  
                  @pybot.event
                  async def on_read():
                      print("Client logged in")
                  
                  @pybot.command()
                  async def hello(*args):
                      print(User.display_name)
                      return await pybot.say("Hello, world!")
                  
                  @pybot.command()
                  async def truck(*args):
                      await pybot.send_message(message.user,'Watchout for that truck!')
                  
                  pybot.run(secrets.BOT_TOKEN)
                  

                  我想要發(fā)生的事情是,當(dāng)有人鍵入命令 !truck <mention user> 時(shí),它會(huì)向提到的用戶發(fā)送一條消息,其中包含小心那輛卡車!"的消息.

                  what im trying to get to happen is when someone types the command !truck <mention user> it sends a message to that mentioned user with the message "Watch out for that truck!".

                  我收到以下錯(cuò)誤:

                  命令引發(fā)異常:NameError: name 'message' is not defined

                  Command raised an exception: NameError: name 'message' is not defined

                  我嘗試查找我正在嘗試做的事情的示例,但沒有找到太多,或者我不明白我應(yīng)該做什么.希望這不是類似問題的轉(zhuǎn)貼

                  I've tried looking up examples of what im trying to do but haven't found much, or am not understanding what I should be doing. Hopefully this isn't a repost of a similar question

                  謝謝.

                  推薦答案

                  我認(rèn)為你的卡車中的 *args 不再是有效的語法,我相信使用 discord.py 的命令

                  The *args in your truck is no longer valid syntax I believe for the commands with discord.py

                  @pybot.command(pass_context=True)
                  async def truck(ctx):
                      await pybot.send_message(ctx.message.user, 'Watchout for that truck!')
                  

                  使用他們的 查看 Discord.py 的 github 存儲(chǔ)庫例子

                  這篇關(guān)于discord.py send_message 用法的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個(gè)在 Python 中提供角色的不和諧機(jī)器人?)
                  Discord bot isn#39;t responding to commands(Discord 機(jī)器人沒有響應(yīng)命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關(guān)于我嗎?Discord 機(jī)器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機(jī)器人?)
                  discord.py - Automaticaly Change an Role Color(discord.py - 自動(dòng)更改角色顏色)
                  <tfoot id='fIJpW'></tfoot>

                          <bdo id='fIJpW'></bdo><ul id='fIJpW'></ul>
                          <legend id='fIJpW'><style id='fIJpW'><dir id='fIJpW'><q id='fIJpW'></q></dir></style></legend>

                              <tbody id='fIJpW'></tbody>

                          1. <small id='fIJpW'></small><noframes id='fIJpW'>

                            <i id='fIJpW'><tr id='fIJpW'><dt id='fIJpW'><q id='fIJpW'><span id='fIJpW'><b id='fIJpW'><form id='fIJpW'><ins id='fIJpW'></ins><ul id='fIJpW'></ul><sub id='fIJpW'></sub></form><legend id='fIJpW'></legend><bdo id='fIJpW'><pre id='fIJpW'><center id='fIJpW'></center></pre></bdo></b><th id='fIJpW'></th></span></q></dt></tr></i><div class="uqkisu0" id='fIJpW'><tfoot id='fIJpW'></tfoot><dl id='fIJpW'><fieldset id='fIJpW'></fieldset></dl></div>
                            主站蜘蛛池模板: 求是网 - 思想建党 理论强党 | 胶原检测试剂盒,弹性蛋白检测试剂盒,类克ELISA试剂盒,阿达木单抗ELISA试剂盒-北京群晓科苑生物技术有限公司 | 换网器_自动换网器_液压换网器--郑州海科熔体泵有限公司 | 合肥触摸一体机_触摸查询机厂家_合肥拼接屏-安徽迅博智能科技 | 广州市哲铭油墨涂料有限公司,水性漆生产研发基地 | 呼末二氧化碳|ETCO2模块采样管_气体干燥管_气体过滤器-湖南纳雄医疗器械有限公司 | 电伴热系统施工_仪表电伴热保温箱厂家_沃安电伴热管缆工业技术(济南)有限公司 | 科研ELISA试剂盒,酶联免疫检测试剂盒,昆虫_植物ELISA酶免试剂盒-上海仁捷生物科技有限公司 | 螺杆泵_中成泵业| 协议书_协议合同格式模板范本大全| 中式装修设计_室内中式装修_【云臻轩】中式设计机构 | 全自动翻转振荡器-浸出式水平振荡器厂家-土壤干燥箱价格-常州普天仪器 | 智能交通网_智能交通系统_ITS_交通监控_卫星导航_智能交通行业 | 上海三信|ph计|酸度计|电导率仪-艾科仪器| 包装机_厂家_价格-山东包装机有限公司| 热风机_工业热风机生产厂家上海冠顶公司提供专业热风机图片价格实惠 | 铣床|万能铣床|立式铣床|数控铣床|山东滕州万友机床有限公司 | 伺服电机维修、驱动器维修「安川|三菱|松下」伺服维修公司-深圳华创益 | 东莞韩创-专业绝缘骨架|马达塑胶零件|塑胶电机配件|塑封电机骨架厂家 | 合肥升降机-合肥升降货梯-安徽升降平台「厂家直销」-安徽鼎升自动化科技有限公司 | 电子海图系统-电梯检验系统-智慧供热系统开发-商品房预售资金监管系统 | 金库门,金库房,金库门厂家,金库门价格-河北特旺柜业有限公司 | 压力喷雾干燥机,喷雾干燥设备,柱塞隔膜泵-无锡市闻华干燥设备有限公司 | 照相馆预约系统,微信公众号摄影门店系统,影楼管理软件-盟百网络 | 钢格板_钢格栅_格栅板_钢格栅板 - 安平县鑫拓钢格栅板厂家 | 电销卡_稳定企业大语音卡-归属地可选-世纪通信 | 陕西鹏展科技有限公司| 视觉检测设备_自动化检测设备_CCD视觉检测机_外观缺陷检测-瑞智光电 | 合肥制氮机_合肥空压机厂家_安徽真空泵-凯圣精机 | 二次元影像仪|二次元测量仪|拉力机|全自动影像测量仪厂家_苏州牧象仪器 | 聚氨酯催化剂K15,延迟催化剂SA-1,叔胺延迟催化剂,DBU,二甲基哌嗪,催化剂TMR-2,-聚氨酯催化剂生产厂家 | 液压油缸-液压缸厂家价格,液压站系统-山东国立液压制造有限公司 液压油缸生产厂家-山东液压站-济南捷兴液压机电设备有限公司 | 卫浴散热器,卫浴暖气片,卫生间背篓暖气片,华圣格浴室暖气片 | 高考志愿规划师_高考规划师_高考培训师_高报师_升学规划师_高考志愿规划师培训认证机构「向阳生涯」 | PCB设计,PCB抄板,电路板打样,PCBA加工-深圳市宏力捷电子有限公司 | 土壤检测仪器_行星式球磨仪_土壤团粒分析仪厂家_山东莱恩德智能科技有限公司 | 山东信蓝建设有限公司官网| 超声波焊接机,振动摩擦焊接机,激光塑料焊接机,超声波焊接模具工装-德召尼克(常州)焊接科技有限公司 | 臻知网大型互动问答社区-你的问题将在这里得到解答!-无锡据风网络科技有限公司 | 耐高温风管_耐高温软管_食品级软管_吸尘管_钢丝软管_卫生级软管_塑料波纹管-东莞市鑫翔宇软管有限公司 | 丹佛斯变频器-Danfoss战略代理经销商-上海津信变频器有限公司 |