Discless is a framework that lets you create Discord bots the FaaS way, meaning that you only need to write the commands and Discless handles the rest for you.
##🚀 Getting Started
Before creating your first function, install the Discless CLI by running
$ sudo env GOBIN=/bin go install github.com/discless/cli/cmd/discless@v0.0.2.1
Make sure you have go installed
First, run the new bot
command and enter your bots token
$ discless new bot <bot name> <prefix>
Created bot in bot.yaml
To create a new function, run
$ discless new function <function name>
Created the function <function name>
Edit its configuration in function.yaml or edit the function in <function name>.go
This creates a configuration file for the function (function.yaml
) and a golang file that looks like
package main
import (
"github.com/bwmarrin/discordgo"
"github.com/discless/discless/types"
)
func Handler(self *types.Self, s *discordgo.Session, m *discordgo.MessageCreate, args []string) error {
s.ChannelMessageSend(m.ChannelID, "Pong!")
return nil
}
You can freely edit this file.
First, create a new secret for your token
$ discless new secret token NDMyMTkx...
Created secret in secret.yaml
To use the token in your bots configuration, open your bots configuration and change the following
- token:
+ token: secret.token
Now you can run your bot
$ discless up bot.yaml
<bot-name> is running
To get your command up and running on the bot, run
$ discless deploy <bot name> <function configuration>.yaml
Succesfully uploaded the <function name> command
🔐 All API calls are secured by TLS
🧠 Simple and intuitive Command Line Interface
💨 Fast and easy to manage Discord applications
- SSL encryption
- Secret configuration
- Deployable commands and bots
- Support all Discord events
- Recursive command deployment
- Integrate databases
More coming soon...