1.0.3 • Published 3 years ago

wayzq v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

ℹ️ About

wayzq is a simple package make by wayzq, it's simply made to make your coding process faster by some functions


🔶 Support

In case you have idea's to improve the package, or maybe you found some bugs or you need help, you can contact us from our Discord Server


📥 Installation

To install wayzq package all you need is Node.js.

Then you can open your application terminal and type there:

$ npm install wayzq

➡️ Functions

The available functions are:

  • sleep - Function to set timeouts easily

➡️ More usages

There is currently only an event called inviteJoin in the package which allows you to get some informations about the invite such as the inviter and how many times it got used.


sleep

sleep is a simple function, where is make it easier and faster to make a timeout in your code. Example:

// Importing the package
const wayzq = require('wayzq')

// Destructure the sleep function from the package
const sleep = wayzq.sleep

// this will log "Start!" once i run the application
console.log('Start!')

// using the package sleep function to set a timeout
sleep(5000) // sleep(milliseconds)

// after the 5 seconds (5000 milliseconds) it will log "5 Seconds passed"
console.log('5 Seconds passed')

Invite Logger Event

This event is for logging invite uses. This is same as guildMemberAdd event but this is custom event which has invite and inviter in it.

// Defining the package
const wayzq = require("wayzq")

//defining discord
const discord = require('discord.js')

// new discord client
const client = new discord.Client()

// To Get The new event working we need to initilize it by:
wayzq.inviteLogger(client) // put here your discord client
// without above code event won't trigger.

// now below event will work
client.on('inviteJoin', (member, invite, inviter) => {
    console.log(`${member.user.tag} joined using invite code ${invite.code} from ${inviter.tag}. Invite was used ${invite.uses} times since its creation.`)
});

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago