fuwa.js
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

The new, simple, and easy way to create progressive Discord bots.

Table of Contents

Features

  • ☕️ | Express-like syntax
  • 📦 | Lightweight (only two dependencies)*
  • 🔨 | Built-In Command Handler & Parser
  • 🌎 | Safe (complete runtime safety for your bot.)
  • ⚡️ | Blazing Fast
  • 🗂 | Customizable Cache

* Excluding Peer (and of course) development dependencies

Quickstart

This assumes you have already setup a discord bot application in Discord. See

📁 - Create a new NodeJS project

Run this in your Powershell, command prompt, terminal, console or whatever you call it:

$ npm init -y

📦 - Install FuwaJS

The Lightweight version

$ npm install Fuwajs/Fuwa.js --no-optional

The Full version for increased speed (better for production)

$ npm install Fuwajs/Fuwa.js

Create a file called index.js

$ echo > index.js

Open index.js in your IDE of choice and copypaste this code

const fuwa = require('fuwa.js');

const client = new fuwa.Client('?'); // Your bot prefix here

client.on('ready', () => console.log('I am alive!'));

client.command(['hi', 'hello'], (req, res) => {
    res.reply(`Hello there, my name is ${client.bot.username}!`);
});

// replace with your bot token
client.login('<your bot token>');

Make sure to replace <your bot token> with your actual bot token!

🧪 - Test it out

Add your bot to a discord server and type ?hi or ?hello in any visible channel. It should respond with Hello there, my name is <bot name>!

Useful links

Check the docs for reference.

Follow the tutorial for a ground up approach.

Join our discord to interact with our community and ask questions!

If you find any bugs please post them to our issues and we'll respond ASAP.

Package Sidebar

Install

npm i fuwa.js

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

116 kB

Total Files

46

Last publish

Collaborators

  • artrix9095