Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/symbux/turbo-discord

A Discord plugin that expands the Turbo engine to be able to work with and manage Discord bots, SSO with Discord and more using customised command controllers, with latest support for slash commands, buttons, select menus, autocomplete, events, modals and more.
https://github.com/symbux/turbo-discord

api bot-framework discord discord-bot discord-js turbo

Last synced: 18 days ago
JSON representation

A Discord plugin that expands the Turbo engine to be able to work with and manage Discord bots, SSO with Discord and more using customised command controllers, with latest support for slash commands, buttons, select menus, autocomplete, events, modals and more.

Awesome Lists containing this project

README

        





![GitHub Workflow Status](https://img.shields.io/github/workflow/status/Symbux/Turbo-Discord/Build)
![GitHub issues](https://img.shields.io/github/issues/Symbux/Turbo-Discord)
![NPM](https://img.shields.io/npm/l/@symbux/turbo-discord)
![npm (scoped)](https://img.shields.io/npm/v/@symbux/turbo-discord)
![npm](https://img.shields.io/npm/dw/@symbux/turbo-discord)

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.







We are on Discord!




---


## Installation

With Yarn:
```bash
yarn add @symbux/turbo @symbux/turbo-discord
```

With NPM:
```bash
npm install --save @symbux/turbo @symbux/turbo-discord
```


---


## Getting Started

[You can find the documentation here](https://github.com/Symbux/Turbo-Discord/wiki).

```typescript
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.