warithm.js

1.0.0 • Public • Published

warithmjs

A package that gives more Discord.js events.



Information

  • warithm.js is a module intended to make bot coding easier for you.
  • Support discord.js version: v14

Install

npm i warithm.js

Setup

  • Example for setup;
const { Client, GatewayIntentBits, Partials } = require('discord.js');
const warithm = require('warithm.js');

const GATEWAY_INTENT_BITS = [
  GatewayIntentBits.Guilds,
  GatewayIntentBits.GuildMembers,
  GatewayIntentBits.GuildMessages,
  GatewayIntentBits.MessageContent
]

const CLIENT_PARTIALS = [
  Partials.Channel,
  Partials.Message,
  Partials.User,
  Partials.GuildMember
]

const client = new Client({
  intents: GATEWAY_INTENT_BITS,
  partials: CLIENT_PARTIALS
});

// Init the package, otherwise the events will not be emitted.
warithm.init(client);

client.on('ready', () => {
   console.log(`Logged in as ${client.user.username}`);
});


/**
 * creating event
 */
client.on('channelNameUpdate', (channel, oldName, newName) => {
	console.log(`A channel's name has been updated: "${oldName}" => "${newName}"`);
});

Package Sidebar

Install

npm i warithm.js

Weekly Downloads

3

Version

1.0.0

License

Apache-2.0

Unpacked Size

60.3 kB

Total Files

20

Last publish

Collaborators

  • warfdev