1.1.0 • Published 3 years ago

easier-discordbot v1.1.0

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

Easier Discord Bot!

Everyone can make a bot with this package!

Example code:

const easierDiscord = require('easier-discordbot');

// Create a Discord client
const bot = easierDiscord.createClient();

// Log in to your bot (change 'BOT TOKEN' with your own Discord bot token)
bot.login('BOT TOKEN');

// Change bot prefix (default prefix is '!')
bot.setPrefix('?');

// A Basic Command that replies with 'Pong!' when '?ping' is typed
bot.addCommand('ping', 'Pong!');

// Another Basic Command but has a cooldown of 2500 miliseconds (2.5 sec) this time 
bot.addCommand('hello', 'Hello!', { cooldown: 2500 });

// A Function Command that replies with an embed with authors info when '?myinfo' is typed
bot.addCommand('myinfo', (msg) => {
    var embed = easierDiscord.createMessageEmbed('Your Info', '#ffffff', 'Some basic information about your Discord Account:', {url: msg.author.avatarURL()}, {text: 'YOUR INFORMATION'})
        .addField('Full Tag', msg.author.tag)
        .addField('Username', msg.author.username)
        .addField('Discriminator', msg.author.discriminator)
        .addField('ID', msg.author.id);
    if(msg.channel.type == 'text'){
        embed.addField('Server Nickname', msg.member.displayName);
        embed.addField('Highest Role', msg.member.roles.highest);
    }
    msg.channel.send(embed);
}, { cooldown: 5000 });
1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago