# easyuse

> this for pm code only but is used for node,js

Latest version **4.0.0** (published 2021-08-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install easyuse
pnpm add easyuse
yarn add easyuse
bun add easyuse
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2021-08-09 |
| First published | 2021-06-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 41.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ifsnip |
| Keywords | easy loging hangman |

## Links

- npm: https://www.npmjs.com/package/easyuse
- npm.io page: https://npm.io/package/easyuse

## Dependencies (2)

- [quick.db](https://npm.io/package/quick.db.md) ^7.1.3
- [discord.js](https://npm.io/package/discord.js.md) ^12.5.3

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 4.0.0 (latest) — 2021-08-09
- 3.9.0 — 2021-08-09
- 3.8.0 — 2021-08-09
- 3.7.0 — 2021-07-23
- 3.6.0 — 2021-06-26
- 3.5.0 — 2021-06-24
- 3.4.0 — 2021-06-24
- 3.3.0 — 2021-06-24
- 3.2.0 — 2021-06-24
- 3.1.0 — 2021-06-24
- 3.0.0 — 2021-06-19
- 2.9.0 — 2021-06-19
- 2.8.0 — 2021-06-19
- 2.7.0 — 2021-06-19
- 2.6.0 — 2021-06-19
- … 16 more at https://npm.io/package/easyuse/versions

## README

const Discord = require('discord.js');

const client = new Discord.Client();

const { log } = require('easyuse');



log();

client.login("");

# or you can use a diffrent way!

const Discord = require('discord.js');

const client = new Discord.Client();  

const { log, sum } = require('easyuse'); 


sum(77,99);

log();


client.login("");

# new ticket system

const Discord = require('discord.js')

const client = new Discord.Client()

const { easyticket } = require('easyuse')

const ticket = new easyticket()


// When bot is ready

client.on('ready', () => {

    console.log(`${client.user.tag} is now online!`)

    console.log("Bot: Hosting " +

      `${client.users.cache.size}` +

      " users, in " +

      `${client.channels.cache.size}` +


      " channels of " +

      `${client.guilds.cache.size}` +

      " guilds."

  );)

  
  // Example: Bot: Hosting 1053 users, in 265 channels of 10 guilds.

})


client.on('message', async message => {

    let prefix = "+";

    const args = message.content.slice(prefix.length).split(" ");

    const command = args.shift().toLowerCase();

    if ( command == 'ticket' ) {


       
        const reason = args.join(" ") ? args.join(" ") : "No Reason Provoided"
        
        ticket.makeTicket(message, reason)


        /*
         Creates a new ticket

         if no reason is provoided the reason is "No Reason Provoided"

         Reason is optional and not needed to create a channel

         if you want the message author to be dmed that he created a

         ticket pls use >>> ticket.makeTicket(message, args.join(" "), true)

         for default its set for false

        */

    } else if ( command == 'close' ) {

       
        ticket.closeTicket(message)
   
    } else if ( command == 'role' ) {


        ticket.setRole(message)

        // Seting a support role

        // Support roles gets pinged whenever a ticket is maded

    
    } else if ( command == 'remove-role' ) {

        ticket.DelRole(message, client)

        // Remove a support role

    } else if ( command == 'send' ) {

        ticket.msgTicketChannel(message, prefix)

        // send a message to a ticket

    } else if ( command == 'category' ) {

        ticket.Category(message, client, args.join(" "))

        // creates a ticket at the selected Category

    } else if ( command == 'delcategory' ) {

        ticket.DelCategory(message, client)

        // Deleated the selected category from the list of creating 

        // tickets, next time tickets will not be created at that category

    } else if ( command == 'embed-message' ) {

        ticket.editEmbed(message, args.join(" "))

        // Set's a message when user creates a ticket

    } else if ( command == 'remove-embed' ) {

        ticket.DelEmbed(message, client)

        // Removes the embed message that are used in every ticket getting 

        // created
    } else if ( command == `adduser` ) {

        ticket.ticketAddUser(message);

        // Add's a user to a ticket
        
    } else if ( command === `id` ) {
        ticket.fetchChanID(message, args.join(" "))
        // gets a channel id
    }
})
client.login('TOKEN')


# Hangman 

 if(!message.member.hasPermission("MANAGE_MESSAGES")) return message.channel.send('You need manage messages permission.')

        const channel = message.mentions.channels.first() || message.guild.channels.cache.get(args[0])

        if(!channel) return message.channel.send('Please specify a channel')
        
        const word = args.slice(1).join(" ")

        if(!word) return  message.channel.send('Please specify a word to guess.')

        const hang = new hangman({

            message: message,

            word: word,

            client: client,

            channelID: channel.id,
            
        })

        hang.start();
# made by Snip#0009 and Ledroid#9999

---
_Source: https://npm.io/package/easyuse · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
