Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Sep 3, 2021. It is now read-only.
/ hershel Public archive

๐Ÿค– Modular and minimal Discord bot framework for Node.js

License

hershel/hershel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

This project is no longer maintained.

Seeing the evolution of Discord's decisions regarding the bot ecosystem, I am no longer interested in contributing to the creation and maintenance of Discord bots. More informations here


Hershel

A framework for modular and blazing fast Discord bots

Hershel on npm Travis CI Coveralls Prettier MIT License


demo

Hershel is a small, highly modular Discord bots framework based on the fact that you don't need to embed unnecessary features / code in your bot project. Hershel allows you to write your own message processing logic or to use the packages at your disposal to build an awesome Discord bot.

Install

npm i hershel

Example

// require Hershel's Client
const { Client } = require('hershel')

// instantiate it
const bot = new Client({
  logger: true,
})

bot.use(({ message, state }, next) => {
  if (message.author.bot) return

  state.permission = getPermissionFor(message.author)

  next() // call next middleware
})

bot.use(async ({ message, createReply, state }) => {
  // use Hershel's reply API
  const response = createReply()

  await response // response is an embed by default
    .setTitle('Echo... Echo... Echo...')
    .setAuthor(`${message.author} with perm ${state.permission.level}`)
    .setDescription(message.content)
    .setFooter('Powered by Hershel')
    .send() // returns a promise

  await response.setTitle('Update embed title ๐Ÿ™ˆ').update()
})

bot.login(process.env.DISCORD_TOKEN)

Do you want to know more? Head to the Getting Started.

Features

  • Modular: Hershel supports plugin and decorator to make it extremely modular and extensible.
  • Logging: We all like clean and clear logs. We use Pino, a super fast, json logger.
  • Fast: No more useless feature loading you don't use.

Documentation

Related

Thanks

Thanks to Algorythmis for his corrections of the code. Thanks also to Bit My Code for their support and their ๐Ÿ’–.

Hershel uses part of Fastify's theoretical logic & documentation layout, a fast and low overhead web framework for Node.js.

License

MIT

About

๐Ÿค– Modular and minimal Discord bot framework for Node.js

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •