npm.io
1.0.16 • Published 6 years ago

@kyflx-dev/akairo

Licence
MIT
Version
1.0.16
Deps
0
Size
160 kB
Vulns
0
Weekly
0
Stars
1

@kyflx-dev/akairo

This is basically just a fork of discord-akairo but It's in Typescript and it uses CommandContext for prompts and shit.

Caveats

Here are some caveats of using this package:

  • Said Context
    • You have to use a CommandContext class instead of a traditional discord.js Message class for commands and prompts.
    • pre and post type inhibitors use the CommandContext; whereas all uses the traditional Message class therefore typecasting ahaha... don't yell at us
  • Typescript
    • Typescript is fucking weird... that's all for this point lol.
    • This is real buggy because some errors wouldn't occur in JavaScript so we had to do some weird type casting and rearranging.
  • Made for Kyflx (Discord Bot)
    • Support will only be given to the developers and/or friends of the developers.
    • There might be features that might break your current bot or won't fit well with your ideas.

if you find an issue please join our discord server: https://discord.gg/BnQECNd

Customization

The only customizable class as of right now is CommandContext

import { Structures } from "@kyflx-dev/akairo";

Structures.extend(
  "CommandContext",
  (BaseContext) =>
    class KyflxContext extends BaseContext {
      public get lol() {
        return "lol";
      }
    }
);

declare module "@kyflx-dev/akairo" {
  interface CommandContext {
    lol: string;
  }
}

Installation

We do not provide support for this package as it was made for [Kyflx].

npm install @kyflx-dev/akairo