Code Monkey home page Code Monkey logo

commandkit's People

Contributors

lassejlv avatar notm1dev avatar notunderctrl avatar ramfidev avatar twlite avatar xcfio avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

commandkit's Issues

Commands Won't Register

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

refactor: utilize `INTERACTION_CREATE` event for ButtonKit instead of using collector

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.

Search bar not working on docs website

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.

Outdated/broken documentation links in new project templates

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:

In order to fix:

  • CommandKit.ts the correct link has /guide/ instead of /docs/
  • For the rest of the files, you should only add /docs/ before /typedef/ in order to point to the right documentation.

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.

CommandData typings

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.

Feature Dev Role IDS

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

Compiler removes nested if statements

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;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.