项目作者: mouse484

项目描述 :
The easiest JavaScript/TypeScript Discord bot framework.
高级语言: TypeScript
项目地址: git://github.com/mouse484/Ecstar.git
创建时间: 2019-04-07T23:26:45Z
项目社区:https://github.com/mouse484/Ecstar

开源协议:MIT License

下载


image

Ecstar


ESLint badge

document badge


npm version


npm download


github starts


LICENC


discord.js version


discord


Gitpod Ready-to-Code

📃Introduction

Ecstar is the easiest framework Discord.js.

📖Document

https://ecstar.js.org

📥Installation

Install Ecstar using npm or yarn.

  1. npm install ecstar
  1. yarn add ecstar

💬Usage

📄Main File

/index.js

```js main.js
const { Client } = require(‘ecstar’);

const client = new Client(options);

client.login(‘Your token here’);

  1. options: [EcstarOptions](https://ecstar.js.org/interfaces/_client_.ecstaroptions.html)
  2. ### 📄Command File
  3. `/commands/filename.js`
  4. ```js
  5. const { Command } = require('ecstar');
  6. module.exports = class extends Command {
  7. constructor(client) {
  8. super(client, options);
  9. }
  10. run(message) {
  11. // What to do
  12. }
  13. };

options: commandOptions

📄Event File

/events/filename.js

  1. const { Event } = require('ecstar');
  2. module.exports = class extends Event {
  3. constructor(client) {
  4. super(client, 'Receive event name');
  5. }
  6. run(/* callback here */) {
  7. // What to do
  8. }
  9. };

📄Args File

/args/filename.js

  1. const { Args } = require('ecstar');
  2. module.exports = class extends Args {
  3. constructor(client) {
  4. super(client, 'args name');
  5. }
  6. run(message){
  7. // What to do
  8. }
  9. };

📄Lang File

  1. const { Lang } = require('ecstar');
  2. module.exports = class extends Lang {
  3. LOADING_COMMANDS = '';
  4. ...
  5. };

See Here

🎫License

👀Author