BacoTell

module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 6, 2023 License: GPL-3.0

README

BacoTell

Pluggable bot client and associated framework for Discord

Usage

Download the latest release from GitHub Releases for your platform. Then rename the executable and run the following command:

bacotell -n <bot_name> -t <bot_token> -p <path_to_plugin_dir>

Developing Plugins

To use this bot framework, you must take the following steps. An example can be seen in cmd/example_plugin/.

  1. For each application command, message component and/or modal create a struct and implement the respective interface.
  2. Either register the implementations using the setters in bacotell_plugin or create a custom implementation of the Plugin interface.
  3. Either call bacotell_plugin.Run() or bacotell_plugin.RunCustom() depending on your choice in step 2. During development you can use bacotell_plugin.Debug() and bacotell_plugin.DebugCustom() respectively.

That's it! For complete API documentation, see GoDoc.

Building

Download the latest protoc release from GitHub Releases for your platform and add it to your PATH. More information can be found on their GitHub repo.

Then install the compiler extensions for Go using the following commands. Make sure that your Go tools are also in your PATH.

go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest

If you made changes to the protobuf definitions, build them with the following command. After that you can adjust source code referencing the generated protobuf code.

protoc --go_out=. --go_opt=module=github.com/EliasStar/BacoTell --go-grpc_out=. --go-grpc_opt=module=github.com/EliasStar/BacoTell proto/*

To compile the BacoTell executable, use this command:

go build ./cmd/bacotell/

License

BacoTell - Pluggable bot client and associated framework for Discord
Copyright (C) 2023 Elias*

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.

Directories

Path Synopsis
cmd
internal
bacotell
Package bacotell provides the BacoTell entrypoint and the core subsystems of the framework.
Package bacotell provides the BacoTell entrypoint and the core subsystems of the framework.
codec
Package codec provides go-plugin boilerplate and encoding and decoding functions for protobuf messages.
Package codec provides go-plugin boilerplate and encoding and decoding functions for protobuf messages.
proxy
Package proxy provides default implementations for the different proxies in bacotell_common.
Package proxy provides default implementations for the different proxies in bacotell_common.
pkg
bacotell_common
Package bacotell_common provides interfaces and structs to be used by plugins and BacoTell alike.
Package bacotell_common provides interfaces and structs to be used by plugins and BacoTell alike.
bacotell_plugin
Package bacotell_plugin provides the plugin entrypoint.
Package bacotell_plugin provides the plugin entrypoint.
bacotell_util
Package bacotell_util provides utilities for plugins and BacoTell.
Package bacotell_util provides utilities for plugins and BacoTell.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL