UNPKG

modernirc

Version:

IRC library for creating modern IRC bots

106 lines (104 loc) 1.85 kB
import { send } from './channel.js' export default [ { path: '/identity', method: 'get', handler: async (req) => { return await send({ action: 'get-identity' }) }, }, { path: '/channels', method: 'get', handler: async (req) => { return await send({ action: 'get-channels' }) }, }, { path: '/modules', method: 'get', handler: async (req) => { return await send({ action: 'get-modules' }) }, }, { path: '/nick', method: 'post', handler: async (req) => { return await send({ action: 'nick', args: req.body, }) }, }, { path: '/join', method: 'post', handler: async (req) => { return await send({ action: 'join', args: req.body, }) }, }, { path: '/part', method: 'post', handler: async (req) => { return await send({ action: 'part', args: req.body, }) }, }, { path: '/privmsg', method: 'post', handler: async (req) => { return await send({ action: 'privmsg', args: req.body, }) }, }, { path: '/action', method: 'post', handler: async (req) => { return await send({ action: 'action', args: req.body, }) }, }, { path: '/notice', method: 'post', handler: async (req) => { return await send({ action: 'notice', args: req.body, }) }, }, { path: '/kick', method: 'post', handler: async (req) => { return await send({ action: 'kick', args: req.body, }) }, }, { path: '/module', method: 'post', handler: async (req) => { return await send({ action: 'message-to-module', args: req.body, }) }, }, ]