Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/symbux/turbo-discord
- Owner: Symbux
- License: apache-2.0
- Created: 2021-12-13T19:01:17.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-10-11T09:17:58.000Z (about 1 year ago)
- Last Synced: 2024-10-24T03:33:25.504Z (27 days ago)
- Topics: api, bot-framework, discord, discord-bot, discord-js, turbo
- Language: TypeScript
- Homepage:
- Size: 317 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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.
---
## 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.