1.0.73 • Published 4 years ago
discord-rw v1.0.73
DiscordRW
Quick Start
JavaScript
const { Client, Status, addCommand, log } = require('discord-rw');
const client = new Client([PREFIX]);
client.on('ready', () => {
client.setStatus(Status.WATCHING, 'Status');
})
client.useAutoHelp();
Discord.addCommand({
name: "name",
desc: "description",
trigger: (msg, args) => {
log(args); // To view these logs type 'logs' when the bot terminal shows up
}}
)
client.handleCommands(); // Handle the commands
client.login([BOT_TOKEN]);
TypeScript
import { Client, Status, addCommand, Message, log } from 'discord-rw';
const client = new Client([PREFIX]);
client.on('ready', () => {
client.setStatus(Status.WATCHING, 'Status');
})
client.useAutoHelp();
addCommand({
name: "name",
desc: "description",
trigger: (msg : Message, args : string[]) => {
log(args); // To view these logs type 'logs' when the bot terminal shows up
}}
)
client.handleCommands(); // Handle the commands
client.login([BOT_TOKEN]);
Using the bot terminal
Commands
- commands : List commands
- events : List events
- logs : List everything written to
log()
method - exit : Exit the bot
Using the source
DiscordRW is written over DiscordJS meaning you can still access DiscordJS through the Source
object.