Skip to content
JustCarry edited this page Apr 30, 2018 · 7 revisions

Welcome to the JC-Codes wiki!

  • How can i install the package ?

By writing npm i jc-codes command!

  • How can i use the package ?

require the package then write <packagename>.setClient(<client>);

then write the code you wanna exec <packagename>.add(<codenumber>[,<options>])

then exec it! <packagename>.exec()

Example:

const Discord = require('discord.js');
const jc = require('jc-codes');
const client = new Discord.Client();

jc.setClient( client ) // Put client
jc.add('onMessage', { message: 'ping', reply: '[user], Pong!' }); // Using onMessage code, example for ping pong,
jc.add('onJoin', { message: 'Welcome there, [user] have joined to our server', channel: 'channel-id', role: 'role-id' } )
jc.exec( ); // Exec codes

client.login('token');

Note: this package is only using for "Discord.js"

Clone this wiki locally