Skip to content

lord0p2005/flyde-discord-bot-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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. pnpm install
  4. pnpm run dev

Adding a new command

  1. run pnpm 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

As this is a regular Node.js project, you can deploy it to any Node.js hosting service. We've tested it on Railway and it works great!

Deploy on Railway

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published