Skip to content

Latest commit

 

History

History
61 lines (41 loc) · 3.07 KB

README.md

File metadata and controls

61 lines (41 loc) · 3.07 KB
Flyde is a powerful visual flow-based programming toolkit that enables you to create and edit code using a visual flow-based programming interface. With Flyde, you can build backend flows quickly and intuitively, making it ideal for novice developers, non-developer technical teams, and experienced developers who want to prototype and test ideas fast.

Official Website Discord Follow GitHub Repo stars @FlydeDev

Jokes Discord Bot - Flyde Example

This is a simple Discord bot using Flyde and Discord.js. It exposes a "/joke" command that will send a random joke (using https://jokeapi.dev/) to the channel where the command was sent.

This project implements a convention over configuration approach, where the bot will automatically load all the commands in the commands folder. Each command is a folder containing:

  • a config.json file, conforming to Discord's slash command schema
  • A Flyde based and a Handler.flyde file, containing the command's logic completely visual!

This example comes with 2 commands:

  1. /joke - Sends a random joke to the channel where the command was sent
  2. /ping - Sends a "pong" message to the channel where the command was sent

Running locally

Prerequisites

Steps

  1. Rename .env.example to .env
  2. Set your discord bot token and client ID in the .env file. See this guide
  3. npm install
  4. npm run dev

Adding a new command

  1. run npm run new-command
  2. Follow the instructions
  3. Once the command folder is created, edit the Handler.flyde flow using the Flyde VSCode extension as you wish. See the Flyde docs for more info.
  4. Restart the bot
  5. Done!

Deployment

A key design goal of Flyde is to be as integrable as possible with existing Node.js projects. Flyde flows are YAML files behind the scenes, which are loaded and executed using a library. This means that you can use Flyde in any Node.js project, and deploy it to any Node.js hosting service!

We've tested it on Railway and it works great!

Deploy on Railway

Note: accessing the visual debugger from a remote deployment is not supported yet. You can still use the visual debugger locally, and use the logs to debug your flows remotely.