Skip to content

discless/discless

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discless Go

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

1. Install Discless

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

2. Create a function and bot

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.

3. Configure your bot's token

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

4. Run the bot and deploy your function

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

📝 Features

🔐 All API calls are secured by TLS
🧠 Simple and intuitive Command Line Interface
💨 Fast and easy to manage Discord applications

🗺️ Roadmap

  • SSL encryption
  • Secret configuration
  • Deployable commands and bots
  • Support all Discord events
  • Recursive command deployment
  • Integrate databases

    More coming soon...

📕 License

MIT License

About

🤖 Framework for creating Discord bots the FaaS way. Discless creates an environment where you can easily build and deploy discord bots.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published