New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

discord-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

discord-wrapper

A Discord wrapper written in TypeScript

latest
Source
npmnpm
Version
0.0.4
Version published
Weekly downloads
6
Maintainers
1
Weekly downloads
 
Created
Source

discord-wrapper

A Discord wrapper written in TypeScript

Example usage:

const Discord = require('discord-wrapper');
const bot = new Discord.Bot();

bot.on('ready', () => console.log(bot.user.username + ' ready.'));

bot.connect('your bot token');

Commands:

discord-wrapper allows you to easily register commands.

bot.commands.addCommand({
    name: '8ball',
    prefix: '!',
}, (message, args) => {
    const awnsers = ['Yes', 'Not sure', 'No'];
    message.reply(awnsers[Math.round(Math.random() * awnsers.length)]);
});

Embeds:

let embed = {
    color: '#006666',
    author: {
        name: 'JanotLeLapin',
        icon_url: 'https://cdn.discordapp.com/avatars/437953881914474523/fba9184bfbea41951a6b322bd5b6a3b6.webp?size=128',
        url: 'https://github.com/JanotLeLapin',
    },
    url: 'https://github.com/JanotLeLapin/discord-wrapper',
    title: 'Embed',
    description: 'discord-wrapper is cool',
    fields: [
        {
            name: 'Field',
            value: 'This is a field',
        },
        {
            name: 'Another Field',
            value: 'Even more fields',
        },
        {
            name: 'In...',
            value: 'And that is an...',
            inline: true,
        },
        {
            name: '...line',
            value: '...inline field',
            inline: true,
        },
    ],
    footer: {
        text: 'Give a star to my repo please',
    },
};

// Or

let embed = new Discord.Embed()
    .setColor('#006666')
    .setAuthor('JanotLeLapin', 'https://github.com/JanotLeLapin', 'https://cdn.discordapp.com/avatars/437953881914474523/fba9184bfbea41951a6b322bd5b6a3b6.webp?size=128')
    .setURL('https://github.com/JanotLeLapin/discord-wrapper')
    .setTitle('Embed')
    .setDescription('discord-wrapper is cool')
    .addField('Field', 'This is a field')
    .addField('Another Field', 'Even more fields')
    .addField('In...', 'And that is an...', true)
    .addField('...line', '...inline field')
    .setFooter('Give a star to my repo please');

Sending an embed is as easy as sending a regular message:

channel.send(embed);

FAQs

Package last updated on 01 Nov 2020

Did you know?

Socket

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