Hryra is a Expansive Client for Discord.JS.
Support: Discord
Email
Main Client
DEPRECATED
const Hryra = require('hryra.js');
const client = new Hryra.MainClient('SuperSecretBotTokenHere', {
// Discord.Client Settings
})
client.login(); // Uses the given token
Advanced Client uses the Command Class
const Hryra = require('hryra.js')
const client = new Hryra.AdvancedClient('SuperSecretBotTokenHere', {
// Discord.Client Settings
}, {
name: 'Boto1000',
desc: 'A Awesome Bot',
prefix: '!',
owners: ['YourID'],
builtin: true, // Must have this if you want to have the built in Command Caller and Handler
commanddir: require('path').join(__dirname, 'commands'),
defaultHelpCmd: false,
mentionsPrefix: true
});
client.login() // Login (if enabled) w/ Automatic Command Handler and Command Caller :)
Make Sure all of the settings are there, they dont have to be filled in.
let { AdvancedClient, Command, Message } = require('hryra.js');
module.exports = class LogCommand extends Command {
constructor() {
super({
name: 'log', // Command Name ex: !log
desc: 'logs to the console', // Command Desc
usage: '[message]', // Command Usage
group: 'util', // Command Category
subof: 'None', // For Sub Category Commands
aliases: ['console.log'], // Command Aliases
disabled: false, // Disabled Command
guildOnly: false, // Guild Only Command
ownerOnly: false, // Owner Only Command
permissions: ['MANAGE_MESSAGES']; // User Perms
});
};
/**
* @param {AdvancedClient} client
* @param {Message} message
* @param {Array<String>} args
*/
async process(client, message, args) {
if(!args[0]) return message.channel.send('Please give me something to log');
console.log(args.join(" "));
message.channel.send(`Logged ${args.join(" ")}`);
}
}
Copyright © 2018-2019 DefyDevelopments