Skip to content

Commit

Permalink
Merge branch 'release/0.3.1'
Browse files Browse the repository at this point in the history
Release v0.3.1
  • Loading branch information
0xDevansh committed Dec 22, 2021
2 parents bf0852a + d6a19f2 commit ff47966
Show file tree
Hide file tree
Showing 9 changed files with 46 additions and 50 deletions.
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/src/testing
/dist/testing
/dist/testing
/docs
20 changes: 15 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@

# djs-marshal

![npm](https://img.shields.io/npm/v/djs-marshal?style=for-the-badge)
![downloads](https://img.shields.io/npm/dm/djs-marshal?style=for-the-badge)
![discord](https://img.shields.io/discord/873232757508157470?color=5865F2&label=discord&style=for-the-badge)

A lightweight command handler for discord.js interactions

> This package requires discord.js v13 or higher to be installed
#### This package is currently under construction, more features will be added regularly. The docs are also pretty barebones at the moment and will be improved soon.

## Installation

```bash
Expand All @@ -22,17 +24,24 @@ npm install discord.js --save
## Quick Start

In your root file, preferably index.js/ts, initialize the bot like so

```js
import Marshal from 'djs-marshal'
import { Intents } from "discord.js";
import path from 'path';

// you can pass in the token to make the client login automatically
// you can pass in the token to make the client
// login automatically
// https://deathvenom54.github.io/djs-marshal/modules.html#initializeBot
const client = Marshal.initializeBot({
intents: [Intents.FLAGS.GUILDS],
token: 'your-token-here',
// this is the folder path that contains your commands
slashCommandsPath: path.join(__dirname, 'commands')
slashCommandsPath: path.join(__dirname, 'commands'),
// send all log messages
logLevel: 'verbose',
// logs messages in a detailed manner
logStyle: 'expanded'
});
```

Expand All @@ -54,6 +63,7 @@ export default {
command.reply('Pong!')
}
} as SlashCommand;
// https://deathvenom54.github.io/djs-marshal/modules.html#SlashCommand
```

```ts
Expand Down Expand Up @@ -92,4 +102,4 @@ export default {

## Contributing

Please read CONTRIBUTING.md for the guidelines to contribute to this project
Please read CONTRIBUTING.md for the guidelines to contribute to this project.
2 changes: 1 addition & 1 deletion docs/assets/search.js

Large diffs are not rendered by default.

17 changes: 8 additions & 9 deletions docs/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/interfaces/GlobalSlashCommand.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/interfaces/GuildSlashCommand.html

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions docs/interfaces/MarshalOptions.html

Large diffs are not rendered by default.

32 changes: 8 additions & 24 deletions docs/modules.html

Large diffs are not rendered by default.

4 changes: 1 addition & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ export * from './core/commands/loadCommands';
import { loadCommandsFromDir } from './core/commands/loadCommandsFromDir';
import { loadCommands } from './core/commands/loadCommands';

export * from './core/handlers/handleInteraction';
import { handleInteraction } from './core/handlers/handleInteraction';

export * from './core/logging/logger';
export * from './core/handlers/handleInteraction';

export default {
initializeBot,
Expand Down

0 comments on commit ff47966

Please sign in to comment.