XVE

Polyfill

XVE needs polyfills to work with your specific library. It is based around the discord.js library, but has been abstracted away so it doesn’t rely on any particular library and can be easily polyfilled to fit your sdk.

Events

Events are as written in the Discord documentation, except for the following rules:

Async

Async is not supported. The then callback is used for everything. Instead of await channel.send() its, channel.send().then(callback);

Functions

Expected functions and their parameters:

Function Parameters D.JS Equiv
sendMessage Channel / Snowflake, String channel.send(string)

TODO: Implement more of these

Objects

Objects passed to graphs are expected to match the Discord API’s responses. There are some rules to govern how objects should look and behave:

System

XVE requires some system-related polyfills, to make it easier and more cross-compatiable with different platforms. It also provides a collection of utility functions such as a wait(duration : number) : Promise<void> .

It can be found at the system.mjs

Examples

Discord.JS