discord.py 是一个流行的 Python 库,用于创建和管理 Discord 机器人。斜杠命令(Slash Commands)是 Discord 引入的一种新型命令系统,它允许用户在消息中直接输入命令,而不是传统的以感叹号或前缀开头的命令。 基础概念 在discord.py 中使用斜杠命令时,有时需要预定义时间格式。这通常涉及到使用 datetime 模块来处理日...
要删除它们,您需要通过指定您的公会来同步树: # this will update the client commands which are only from your guild await ctx.bot.tree.sync(guild=ctx.guild) 您只需要运行一次。本站已为你智能检索到如下内容,以供参考: 🐻 相关问答 6 个 1、Discord JS:通过slash命令关闭bot 2、在没有GuildID的...
设置Bot的权限,确保它具有执行必要操作的权限,例如发送消息、读取消息历史记录等。 4.创建Slash Commands 转到“Interactions”选项卡,点击“Add Command”,选择“Chat Input ( Slash Command )”。输入命令名称和描述。定义交互参数,这些参数将成为您游戏中可使用的命令。 5.编写代码 根据所选编程语言,编写处理交互事...
在服务器中,允许权限使用Slash-commands。我如何解决这个问题? 浏览51提问于2021-10-13得票数 0 回答已采纳 1回答 尝试在discord.py上使用异步函数运行cog_loader时出错 、、 我正试图在码头集装箱上建造我的第一个discord.py机器人。但是,在运行它时,回溯在cogs_loader上给出了以下错误:我使用以下文章试图修复...
Updated Sep 1, 2021 Python NTMNathan / djs-command-handler Star 1 Code Issues Pull requests A Discord.js Command Handler example using Slash Commands and Context Menus. bot open-source discord discord-bot discord-api slash-commands discord-js discordbot discord-app context-menus discord-inter...
🚀 Dismake is a framework for building stateless Discord bots with Slash Commands, built on top of FastAPI. dismake-docs.netlify.app Topics python python3 slash-commands interactions discord-bot-framework discord-bots discord-interactions discord-slash-commands dismake Resources Readme License...
I will create you a fully customized discord bot for your server with Python and discord.py, pycord or disnake according to your choice Check out the attached PDF for all information (it does not fit here) Features (examples): slash commands text and user commands buttons select menus modal...
python3.9 MinecraftBot.py Minimal Reproducible Code import json, requests, discord, asyncio, time, itertools, os, topgg Expected Results Everything to run smoothly and the Slash commands to be working. Actual Results Traceback (most recent call last): File "/home/quartz_i_warrior/MinecraftBo...
在简单对比了 discord.js (JavaScript),discordgo (Go),discord.py (Python),Discord4J (Java),JDA (Java) 和 D++ (C++) 等项目后,我选择了discord.js。 为什么选择了discord.js 呢?因为它: 面向对象 快速高效 功能丰富 灵活 100% 基于 Promise ...
from discord.ext import commands from discord_ui import UI, SelectOption, SelectMenu import asyncio # Clients client = commands.Bot(' ') client.remove_command('help') ui = UI(client) @ui.slash.command() async def log(ctx): """Use this command to log trainings/tryouts""" ...