underctrl-io / commandkit Goto Github PK
View Code? Open in Web Editor NEWOnly focus on what matters - Let CommandKit handle your commands and events in your Discord.js projects!
Home Page: https://commandkit.js.org
License: MIT License
Only focus on what matters - Let CommandKit handle your commands and events in your Discord.js projects!
Home Page: https://commandkit.js.org
License: MIT License
My new commands stopped being registering.
Old commands work if ran.
My bulk register option is set to true in my commandkit config (if that helps)
It doesn't even show the loaded commands console log..
✅ Loaded 3 developer commands in guild "Lean Development".
✅ Loaded 80 global commands.
Those messages don't even show.
It works on my machine but when i upload the code to my server to run on the production bot, it doesnt work..
My discord: rohan_ohio
Utilize INTERACTION_CREATE
event for ButtonKit instead of using collector.
This allows developers to resume listener without having to set timeout. But this raises a question, should we keep current implementation as well? Collectors are useful for quick prompts such as
Do you really want to kick this user?
[No] [Yes]
which ends after n seconds usually.
Would love to see seperate handler paths for buttons, selectmenus, modalsubmits, contextmenus and autocompletes. With the filenames corresponding to the custom ids off those components. e.g.
Really smooth transition between pages on your docs website - very cool! But I notice the search bar isn't working. Just opens a gray box when you click it.
We should be able to install guild slash commands without needing to use "devOnly" option.
Allow reloading the changes without restarting the bot when possible
https://commandkit.js.org/guide/validation-file-setup then using the ValidationProps
. Then if you use interaction.reply(...)
it will throw an error. Version: 0.1.10
As I was learning about the project, I stumbled across 5 files with broken links that pointed towards 404 pages of the documentation.
These are:
CommandKit.ts
at packages/commandkit/src/CommandKit.ts on line 20ping.js
at packages/create-commandkit/templates/JavaScript/cjs/src/commands/General/ping.js at line 17ping.js
at packages/create-commandkit/templates/JavaScript/esm/src/commands/General/ping.js at line 16ping.ts
at packages/create-commandkit/templates/TypeScript/cjs/src/commands/General/ping.ts at line 17ping.ts
at packages/create-commandkit/templates/TypeScript/esm/src/commands/General/ping.ts at line 17In order to fix:
CommandKit.ts
the correct link has /guide/ instead of /docs/I know its a really minor thing but I didn't see an issue about it on the repo nor in the Discord server and these are part of the template given to new projects, if I am not mistaken.
Hello, I've recently bumped into an error while coding a simple command that accepts a string option.
(I removed name & description for the sake of focusing on the main problem here)
export const data: CommandData = {
name: "",
description: "",
options: [
{
name: "",
description: "",
type: ApplicationCommandOptionType.String,
required: true,
},
],
};
Here it gives me an error:
Type 'ApplicationCommandOptionType.String' is not assignable to type 'ApplicationCommandOptionType.Subcommand | ApplicationCommandOptionType.SubcommandGroup'.
Looking at the CommandData
type here I've noticed that it might be lacking APIApplicationCommandBasicOption
in Array<APIApplicationCommandSubcommandOption | APIApplicationCommandSubcommandGroupOption>
.
type CommandData = {
name: string;
description: string;
type?: CommandType;
name_localizations?: Partial<Record<LocaleString, string | null>>;
description_localizations?: Partial<Record<LocaleString, string | null>>;
dm_permission?: boolean;
default_member_permissions?: string;
nsfw?: boolean;
options?: Array<APIApplicationCommandSubcommandOption | APIApplicationCommandSubcommandGroupOption>;
};
However, looking at the code in src/types/index.ts
:
type BaseCommandData = {
name: string;
type?: CommandType;
name_localizations?: Partial<Record<LocaleString, string | null>>;
dm_permission?: boolean;
default_member_permissions?: string;
nsfw?: boolean;
};
type ChatInputCommandData = BaseCommandData & {
type?: CommandType.ChatInput;
description: string;
description_localizations?: Partial<Record<LocaleString, string | null>>;
options?: Array<APIApplicationCommandOption>;
};
type UserOrMessageCommandData = BaseCommandData & {
type: CommandType.User | CommandType.Message;
};
export type CommandData = ChatInputCommandData | UserOrMessageCommandData;
You are actually using APIApplicationCommandOption
which kind of covers all the types as the official discord.js documentation suggests.
Not exactly sure what causes the issue here, but I thought it would be good to report a problem.
Currently, we cannot edit the logging and built-in validation messages.
✅ Loaded 1 global commands.
❌ Only developers can use this command
Make it so we can customize it with our desire
I wanna have a welcome bot. But I dont know how guildMembersAdd works
Would be really nice to just define a dev role ids as well as user ids so that i can have the option to just have roles or both
Add the option to easily set commands userinstallable or Not. Would be really cool because there is no easy way to use them yet.
https://discord.com/developers/docs/tutorials/developing-a-user-installable-app#developing-a-userinstallable-app
Are all type of Events working? I'm trying to create an messageReactionAdd event listener and its not responding.
I have this if statement in a critical event in my bot which is used to lockdown posting tweets to a specific channel and tagging the bot in a message.
if (
(message.channelId !== "1081589817680347186" &&
!message.content.includes("<@1100024221339504733>")) ||
message.author.bot
) return;
However, one of the server members pinged my bot and it posted his message on our twitter which is a huge problem for a 4.6K followers account which is used to publish information about a game. After looking at my and the compiled code I noticed that the compiler is the problem because the if in the resulting .mjs file is this
if (message.channelId !== "1081589817680347186" && !message.content.includes("<@1100024221339504733>") || message.author.bot) {
return;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.