Socket
Socket
Sign inDemoInstall

discord-14-easy

Package Overview
Dependencies
4
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    discord-14-easy

use a v14 de uma forma fácil


Version published
Maintainers
1
Created

Readme

Source
npm install discord-14-easy

BASE INDEX

const { Client, Embed, Button } = require('discord-14-easy');
const bot = new Client() //não precisa colocar as intents, ele já vem com todas elas!
const { ActionRowBuilder } = require('discord.js')



bot.login('token do seu bot aqui')

bot.client.on('ready', () => {
    console.log(`[ MANAGER ] - BOT ONLINE COMO ${bot.client.user.tag} | ${bot.client.users.cache.size} Users, ${bot.client.guilds.cache.size} Guilds, ${bot.client.channels.cache.size} Channels`)
})

bot.client.on('messageCreate', (message) => {
    if(message.content === 'test') {
        let embed = new Embed()
        .setTitle('titulo')
        .setDescription('descrição')
        .setColor('DarkVividPink') //cores do djs V14
        let button = new Button({label: 'label',
        emoji: '⭐',
        style: 'SUCCESS', //styles do djs v13.9.2
        customId: 'teste' //caso o type não for link isso é necessário
    }).view()

    /*
    {
        emoji: 'emoji',
        style: 'style', //SUCCESS, LINK, SECONDARY, PRIMARY, DANGER
        customId: 'customId',
        label: 'label'
    }
    */

    const row = new ActionRowBuilder().addComponents(button)
        message.reply({ embeds: [embed], components: [row]})
    }
})

Criar Botão

const { Button } = require('discord-14-easy')
const { ActionRowBuilder } = require('discord.js')
let button = new Button({label: 'label',
        emoji: '⭐',
        style: 'SUCCESS', //styles do djs v13.9.2
        customId: 'teste' //caso o type não for link isso é necessário
    }).view()
const row = new ActionRowBuilder().addComponents(button)

Setar o status do bot

bot.setStatus('Sou um bot perfeito', 'online') //['online', 'stream', 'watch', 'listen']

acessar o client do bot

bot.client //vc pode usar igual o djs normal, tipo bot.client.on('event', () => {})

Desligar o bot

bot.destroy()

Fazer login no bot

bot.login('Seu token aqui')

Servidor de suporte Servidor de suporte 2

Keywords

FAQs

Last updated on 01 Aug 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc