Git Product home page Git Product logo

framework's Introduction

DEPRECATED USE oasis INSTEAD and make sure to star the oasis repo!

Natico

Natico is designed to be a low level and extendable framework for Discordeno

Discord lines lines

Simple setup

Normal natico Using the natico plugin
import { 
         NaticoClient, 
         NaticoClientOptions, 
         NaticoCommandHandler 
} from "https://deno.land/x/natico/mod.ts";
class BotClient extends NaticoClient {
  constructor(public options: NaticoClientOptions) {
    super(options);
  }
  commandHandler: NaticoCommandHandler = new NaticoCommandHandler(this, {
    directory: "./commands",
    prefix: "!",
  });
  async start() {
    await this.commandHandler.loadALL();
    return this.login();
  }
}
const botClient = new BotClient({
  intents: ["Guilds", "GuildMessages", "GuildVoiceStates"],
  token: "your token",
});
botClient.start();

you will have to apply the plugins manually using the naticoclient.plugn() function

import { enableNaticoPlugin, NaticoBot, NaticoPluginOptions, withPlugins } from "../src/plugins/NaticoPlugin.ts";
import { enableCachePlugin, enableCacheSweepers } from "https://deno.land/x/[email protected]/mod.ts";

const pluginOps: NaticoPluginOptions = {
  commandHandler: {
    directory: "examples/template/commands",
    prefix: "!",
  },
};

const bot = withPlugins<NaticoBot<any>>(
  //@ts-ignore -
  {
    token: Deno.env.get("DISCORD_TOKEN")!,
    intents: ["Guilds", "GuildMessages"],
    botId: BigInt(Deno.env.get("BOT_ID")!),
    cache: {
      isAsync: false,
    },
  },
  [enableNaticoPlugin, pluginOps],
  enableCachePlugin,
  enableCacheSweepers
);
async function startUp() {
  await bot.commandHandler.loadALL();
  return await bot.login();
}
startUp();

Features

  • flexible
    • Natico is built using classes allowing you to extend everything and add features to your liking
  • Command handling
    • Natico is a slashcommand only framework
  • Listeners
    • Natico comes included with a listener(events) handler which makes it very easy to use events
  • Inhibitors
    • Natico has easy to use inhibitors
  • Interaction handling
    • Theres built in button and interaction support
  • And much more

This project is inspired by discord-akairo

For more information/docs visit the examples page

framework's People

Contributors

hypelevels avatar link-discord avatar skyblockdev avatar tricked-dev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

framework's Issues

Module Compile Error

Console output these when compiling my mod.ts

error: TS2345 [ERROR]: Argument of type '{ name: string; description: string; choices: ApplicationCommandOptionChoice[] | undefined; options: ApplicationCommandOption[] | undefined; ... 5 more ...; autocomplete: any; }' is not assignable to parameter of type 'ApplicationCommandOption'.
  Object literal may only specify known properties, and 'channel_types' does not exist in type 'ApplicationCommandOption'.      
            channel_types: option.channel_types,
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/x/[email protected]/src/struct/commands/CommandHandler.ts:417:13

TS2339 [ERROR]: Property 'channel_types' does not exist on type 'ArgOptions'.
            channel_types: option.channel_types,
                                  ~~~~~~~~~~~~~
    at https://deno.land/x/[email protected]/src/struct/commands/CommandHandler.ts:417:35

TS2339 [ERROR]: Property 'min_value' does not exist on type 'ArgOptions'.
            min_value: option.min_value,
                              ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/struct/commands/CommandHandler.ts:418:31

TS2339 [ERROR]: Property 'max_value' does not exist on type 'ArgOptions'.
            max_value: option.max_value,
                              ~~~~~~~~~
    at https://deno.land/x/[email protected]/src/struct/commands/CommandHandler.ts:419:31

TS2339 [ERROR]: Property 'autocomplete' does not exist on type 'ArgOptions'.
            autocomplete: option.autocomplete,
                                 ~~~~~~~~~~~~
    at https://deno.land/x/[email protected]/src/struct/commands/CommandHandler.ts:420:34

Found 5 errors.

Natoco Version: 3.0.2
Deno version: 1.17.3

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.