snowyjs
v1.3.8
Published
This is a package that makes it easier to code with discord.js and get your bot online
Downloads
11
Maintainers
Readme
SnowyJS, snowy.js is a package that make it possible to startup a nodejs ( discord.js ) project within a few seconds.
TypeScript / NodeJS / Discord.js Usage:
const { botready, snowyjs, ping, math } = require("snowyjs");
const discord = require("discord.js");
const fs = require("fs");
const ms = require("ms")
const bot = new discord.Client();
bot.on("ready", () => {
botready();
snowyjs();
});
bot.on('message', msg => {
if (msg.content === 'ping') {
msg.reply('pong');
ping();
}
});
bot.on('message', msg => {
if (msg.content === 'math') {
var answer = math(args[0], args[1])
msg.reply(answer);
}
});
bot.login('BOT TOKEN HERE');