0.8.8 • Published 2 years ago

@symbux/turbo-discord v0.8.8

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
2 years ago

GitHub Workflow Status GitHub issues NPM npm (scoped) npm

The Turbo Plugin Discord is an extension to the Turbo engine that offers support for managing and controlling a discord bot, to work inline with the familiar controller structure.


Installation

With Yarn:

yarn add @symbux/turbo @symbux/turbo-discord

With NPM:

npm install --save @symbux/turbo @symbux/turbo-discord

Getting Started

You can find the documentation here.

import { Engine, HttpPlugin } from '@symbux/turbo';
import DiscordPlugin from '@symbux/turbo-discord';

// Initialise engine instance.
const engine = new Engine({
	autowire: true,
});

// Register the http plugin for Discord SSO.
engine.use(new HttpPlugin({
	port: parseInt(String(process.env.PORT)) || 5500,
}));

// Register the discord plugin.
engine.use(new DiscordPlugin({
	bot: {
		token: String(process.env.BOT_TOKEN),
		interval: 5,
		activities: [
			{ type: 'WATCHING', text: 'the server.' },
			{ type: 'WATCHING', text: 'the economy.' },
			{ type: 'WATCHING', text: 'the farms.' },
			{ type: 'WATCHING', text: 'the factions.' },
		],
	},
	oauth: {
		id: String(process.env.CLIENT_ID),
		baseUrl: 'http://localhost:5500/auth',
		scopes: ['identify', 'guilds', 'email', 'connections'],
		secret: String(process.env.CLIENT_SECRET),
	},
}));

// Start engine.
engine.start().catch((err) => {
	console.error(err);
});

Features

  • Discord bot slash command support.
  • Helper functions for creating intuitive user experiences.
  • Embed builder and quick access functionality.
  • Built in OAuth functionality for SSO with Discord.
  • Support for command option autocomplete using built in class router.
  • Support for context menu's in commands and generic context menu classes.
0.8.8

2 years ago

0.8.5

2 years ago

0.8.4

2 years ago

0.8.6

2 years ago

0.8.1

2 years ago

0.8.3

2 years ago

0.8.2

2 years ago

0.8.0

3 years ago

0.7.0

3 years ago

0.5.10

3 years ago

0.5.8

3 years ago

0.5.7

3 years ago

0.5.9

3 years ago

0.5.4

3 years ago

0.5.3

3 years ago

0.5.6

3 years ago

0.5.5

3 years ago

0.5.2

3 years ago

0.6.0

3 years ago

0.5.0

3 years ago

0.5.1

3 years ago

0.3.9

3 years ago

0.2.14

3 years ago

0.2.13

3 years ago

0.2.12

3 years ago

0.2.11

3 years ago

0.2.10

3 years ago

0.3.0

3 years ago

0.2.1

3 years ago

0.1.2

4 years ago

0.2.0

3 years ago

0.3.6

3 years ago

0.2.7

3 years ago

0.1.8

3 years ago

0.2.6

3 years ago

0.1.7

3 years ago

0.3.8

3 years ago

0.2.9

3 years ago

0.3.7

3 years ago

0.2.8

3 years ago

0.1.9

3 years ago

0.4.1

3 years ago

0.2.3

3 years ago

0.1.4

3 years ago

0.4.0

3 years ago

0.2.2

3 years ago

0.1.3

4 years ago

0.3.4

3 years ago

0.2.5

3 years ago

0.1.6

3 years ago

0.3.3

3 years ago

0.2.4

3 years ago

0.1.5

3 years ago

0.1.1

4 years ago

0.1.0

4 years ago