Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shysolocup/willclient
Custom Discord API mod made in Node.JS that combines elements from Discord.PY and Discord.JS
https://github.com/shysolocup/willclient
bot discord discord-api discord-bot discord-js discord-js-v14 discordjs discordjs-v14 javascript js nodejs package stews voice-support willclient
Last synced: 2 months ago
JSON representation
Custom Discord API mod made in Node.JS that combines elements from Discord.PY and Discord.JS
- Host: GitHub
- URL: https://github.com/shysolocup/willclient
- Owner: shysolocup
- License: mit
- Created: 2023-01-27T05:32:50.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-22T02:54:39.000Z (over 1 year ago)
- Last Synced: 2024-04-30T03:22:28.408Z (8 months ago)
- Topics: bot, discord, discord-api, discord-bot, discord-js, discord-js-v14, discordjs, discordjs-v14, javascript, js, nodejs, package, stews, voice-support, willclient
- Language: JavaScript
- Homepage: https://npmjs.com/package/willclient
- Size: 865 KB
- Stars: 4
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
---
WillClient (WC) is a custom Discord API mod that combines elements from [Discord.JS](https://discord.js.org/) and [Discord.PY](https://github.com/Rapptz/discord.py) made in [Node.JS](https://nodejs.org/en/) to solve most of the annoying parts of Discord.JS and possibly welcome users into Node.JS
*__THIS IS A VERY EARLY VERSION AND I WILL UPDATE IT OVER TIME__*
for a look at some examples check out the [examples folder](https://github.com/paigeroid/willclient/tree/main/examples)
for a full look at everything go check out the [wiki pages](https://github.com/paigeroid/willclient/wiki)
---
## Usage
WillClient simplifies prefix commands and is heavily inspried by the design and functionality of Discord.PY while still being made with Discord.JS
```js
// willclient
wc.command( "ping", async (ctx) => {
await ctx.reply("Pong!");
});
```
```py
# discord.py
@bot.command()
async def ping(ctx):
await ctx.reply("Pong!")
```
It also has aliases for commands
```js
// works with avatar or av
wc.command( {name: "avatar", aliases: ["av"]}, (ctx) => {
ctx.reply(wc.author.avatar());
});
```
It has built in arguments or parameters whatever you prefer to call them that you can use
```js
// tagify <@id> or id
wc.command( "tagify", (ctx, cmd) => {
let user = await wc.fetchUser(cmd.args[0]);
ctx.reply(user.tag);
});
```
And built in cooldowns
```js
wc.command( {name: "ping", cooldown: "30s"}, (ctx, cmd) => {
if (cmd.onCooldown) return wc.reply("Command is on cooldown!", {deleteAfter: "3s"});
ctx.reply("Pong!");
});
```
## Installation
```console
npm i willclient
```
```console
npm i paigeroid/willclient
```
## Setting Up
### **Discord.JS Client**
WC is built off of Discord.JS so for it to work you need Discord.JS.
```js
const { Client } = require('discord.js');
const client = new Client({
// your stuff here
});
```
### **WC Client**
once you have your Discord.JS client you can add in WC
```js
const { WillClient } = require('willclient');
const wc = new WillClient({
client: client,
prefix: "!",
token: token
});
```
once you have your client set up and working you can run it using either of these:
```js
client.login(token); // normal discord.jswc.run(token); // optional alternative
```## Disclaimer
This mod is not associated with the creators of [Discord](https://discord.com), [Discord.JS](https://discord.js.org), or [Discord.PY](https://github.com/Rapptz/discord.py) this was created out of love for Discord bot development because I wanted to make things easier for people. I do not condone harassment of the original developers and or anyone else involved in the creation of them.
I am not responsible for anything made with this mod and be sure to follow [Discord's terms of service](https://discord.com/terms) and their [community guildlines](https://discord.com/guidelines) while developing.