Giter Club home page Giter Club logo

snowtransfer's Introduction

A minimalistic rest client for the discord api


GitHub stars npm npm

Part of the WeatherStack

SnowTransfer is a small library specially made to only cover the REST/HTTP area of the discord api. It makes no assumptions about the rest of your stack, therefore you can use it anywhere as long as you use node 14 or higher.

Some of the things that make SnowTransfer awesome:

  • No requirement for other components
  • Full coverage of the discord rest api
  • Well documented
  • Supports both Bot and Bearer tokens (Bearer tokens will have much more limited access than Bot tokens)

General Usecase:

SnowTransfer is not your everyday library, especially compared to other libraries, it makes sense to use it when you:

  • Want to build a microservice based bot, where casual discord libraries would not be suitable since they assume the availability of other components like a gateway or a cache
  • Only need a simple rest client that can be wrapped easily.

Microservice Bots:

I've written a general whitepaper on the idea of microservice bots, which you can find on gist: Microservice Bot Whitepaper

Documentation:

You can find the docs at https://daswolke.github.io/SnowTransfer/

Installation:

To install SnowTransfer, make sure that you have node 14 or higher and npm installed on your computer.

Then run the following command in a terminal npm install snowtransfer

Example:

const { SnowTransfer } = require('snowtransfer');
const client = new SnowTransfer('DISCORD BOT TOKEN');
const request = async () => {
	const message = await client.channel.createMessage('channel id', 'hi there');
	console.log(message);
};
request().then(() => {
	// message was sent to discord
}).catch(e => {
	// an error occurred
});

snowtransfer's People

Contributors

papiophidian avatar daswolke avatar zoddo avatar dependabot[bot] avatar anothergenz avatar awoocado avatar cloudrac3r avatar hegyok avatar mrjvs avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.