asdqwex/discobot

View on GitHub
src/modules/fortune.js

Summary

Maintainability
A
45 mins
Test Coverage
'use strict'

const teller = require('fortune-teller')

module.exports = {
  names: ['fortune'],
  onMessage: function (bot, user, userID, channelID, message, rawEvent) {
    let fortune = teller.fortune()
    bot.sendMessage({
      to: channelID,
      message: fortune
    })
  }
}