@ryanforever/context-converter

0.3.2 • Public • Published

context-converter

acdc

a tool for converting different channel contexts into a unified context


UNDER DEVELOPMENT! NOT FOR PRODUCTION USE

Current Supported Platforms

  • Discord
  • Facebook Messenger
  • iMessage
  • Telegram
  • Twilio
  • Twitch
const ContextConverter = require("@ryanforever/context-converter")

const discord = new ContextConverter.DiscordContext()

Example Usage

const { DiscordContext, TwitchContext } = require("@ryanforever/context-converter")

discordClient.on("message", (data) => {
	let discordBotId = "123456789"
	let context = new DiscordContext(data, discordBotId)
	console.log(context)

})

twitchClient.on("message", (channel, userstate, message, self) => {
	let twitchBotId = "123456789"
	let context = new TwitchContext(channel, userstate, message, twitchBotId)
	console.log(context)
})

Package Sidebar

Install

npm i @ryanforever/context-converter

Weekly Downloads

1

Version

0.3.2

License

ISC

Unpacked Size

51.8 kB

Total Files

50

Last publish

Collaborators

  • ryanforever