Shouw.js is a simple, string-based package that makes interacting with the Discord API easily, and fun. Inspired by Aoi.js, it allows developers to build Discord bots with minimal setup using a clean string-based command syntax, extensibility.
npm install shouw.jsOr use the CLI directly to initialize a new project:
npx shouw.js initconst { ShouwClient } = require('shouw.js');
const client = new ShouwClient({
token: 'YOUR_BOT_TOKEN',
prefix: '!',
intents: ['Guilds', 'GuildMessages', 'MessageContent'],
events: ['messageCreate'],
});
// Add a simple command
client.command({
name: 'ping',
code: `Pong! $pingms`,
});
// Load commands from a directory
client.loadCommands('./commands', true); // `true` enables debug loggingproject/
├── index.js
├── commands/
│ ├── ping.shouw
│ ├── greet.sho
│ ├── meow.shw
│ └── fun.js
Shouw.js comes with a CLI to help you bootstrap projects easily.
npx shouw initThis will:
- Create a new folder structure
- Generate a template bot file
- Install dependencies
- Provide instructions to get started
Shouw.js also supports extensions!
const client = new ShouwClient({
extensions: [
new MyExtension({ /* options */ })
],
...
});- Music - Allows you to play music in Discord voice channels.
- Database - Allows you to store and access a database for your bot.
If you want to create your own extension, you can see the extension templates for more info.
Shouw.js also supports .shouw, .sho, and .shw file extensions for commands with decorator-like syntax!
// commands/example.shouw
@Command({
name: 'hello',
});
Hello there!
This is a command code 1
@Command({
name: 'bye',
})
Goodbye!
This is a command code 2
/* Also support comments! */
// Line and block comments is supported.These decorators are parsed by Shouw.js internally, no compilation needed.