How to use the eris function in eris

To help you get started, we’ve selected a few eris examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github caf203 / loggerv2 / Logger.js View on Github external
import bluebird from 'bluebird'
import Eris from 'eris'
import { log } from './system/log'
import redis from 'redis'
import sleep from 'sleep'
import * as request from 'superagent'
import spawn from 'cross-spawn'
import { getUserDocument, loadToRedis } from './handlers/read'

process.title = 'Logger v2.5'

const Config = require('./botconfig.json')
let bot
if (Config.shardMode === true) {
  bot = new Eris(Config.core.token, {
    getAllUsers: true,
    maxShards: Config.shardCount,
    restMode: true
  })
} else {
  bot = new Eris(Config.core.token, {
    getAllUsers: true,
    restMode: true
  })
}
bluebird.promisifyAll(redis.RedisClient.prototype)
bluebird.promisifyAll(redis.Multi.prototype)
const Redis = redis.createClient()
const middleware = require('./system/middleware').handle
const Raven = require('raven')
Raven.config(Config.raven.url).install()