A Discord bot that can create issues on a user's behalf.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Toastie 3767534fc1
Some checks failed
Test / build (push) Has been cancelled
Release / Build Package (push) Has been cancelled
Release / Build Package-1 (push) Has been cancelled
Release / Build Package-2 (push) Has been cancelled
Release / Build Package-3 (push) Has been cancelled
Release / Build Package-4 (push) Has been cancelled
Release / Build Package-5 (push) Has been cancelled
Release / publish-binaries (push) Has been cancelled
Release / Create Release (push) Has been cancelled
Updated changelog and upped version to 1.0.6
2026-04-30 00:25:24 +12:00
.forgejo/workflows chg: cleaned some comments in the code. 2026-04-26 01:53:11 +12:00
assets Fixed some weird indentation in CommandHandler.cs and cleaned up the README and added an example of the issue footer. 2026-04-17 15:09:52 +12:00
src Updated changelog and upped version to 1.0.6 2026-04-30 00:25:24 +12:00
.gitignore First iteration of this Bot 2026-04-17 00:41:43 +12:00
CHANGELOG.md Updated changelog and upped version to 1.0.6 2026-04-30 00:25:24 +12:00
Kaede.sln chg: cleaned some comments in the code. 2026-04-26 01:53:11 +12:00
LICENSE.md chg: cleaned some comments in the code. 2026-04-26 01:53:11 +12:00
README.md Added a command where the bot owner can set the bot's status 2026-04-30 00:23:14 +12:00

Kaede

A Discord bot written in C# with Discord.Net that lets users create issues in any Toastielab repository via a slash command and modal form and post suggestions to a specified Discord channel

Latest Release Build Status Release status


Table of contents:


Requirements


Setup

1. Discord Bot

  1. Go to the Discord Developer Portal and create a new application.
  2. Navigate to Bot and click Add Bot.
  3. Copy the Token — you'll need it for config.yaml.
  4. Under Privileged Gateway Intents, no extra intents are needed for slash commands.
  5. Go to OAuth2 → URL Generator, select:
    • Scopes: bot, applications.commands
    • Bot Permissions: Send Messages, Embed Links
  6. Copy the generated URL and invite the bot to your server.

2. Toastielab API Token

  1. Log in to your Toastielab instance (e.g. https://toastielab.dev).
  2. Go to Settings → Applications → Access Tokens.
  3. Create a token with at least Issue write permission.
  4. Copy the token.

Note

The token you create will only be able to see the repositories you have access to.

3. Configuration

Run the bot once to generate a default config.yaml, then fill it in and restart:

Field Description
discord_token Your Discord bot token
toastielab_base_url Base URL of your Toastielab instance (no trailing slash)
toastielab_token Toastielab personal access token
guild_id Discord server ID for instant guild commands. Set to 0 for global commands (up to 1 hour delay)
suggestions_channel_id Discord channel ID for suggestions, (this is where the suggestion embeds are sent)
staff_role_id The id of the staff role which will be used to allow staff members to accept suggestions
staff_id The id of the user who is the bot owner (used for the setstatus command)

Running

Running locally from the .csproj file

cd src
dotnet restore
dotnet run

Building then running

dotnet publish -c Release -o output
cd output
dotnet Kaede.dll

Commands

Name Command Description
Create Issue /create-issue Create an issue in a Toastielab repository via a modal form.
Stats /stats Display Kaede's current runtime statistics including uptime, latency, memory usage,
guild count, .NET version, and bot version.
Suggest /suggest Submit a suggestion for the server. Staff can accept or deny suggestions directly in the suggestions channel.
Help /help List all available commands and how to use them.
Set Status /setstatus Set the bot's status. This requires the user to be the owner of
the bot set via the bot_owner variable in the config.yaml file

Project Structure

Kaede/
├── Commands/
│   ├── ICommand.cs                 # Interface all command modules implement
│   ├── CreateIssueCommand.cs       # /create-issue — modal form, posts issue to Toastielab
│   ├── StatsCommand.cs             # /stats — runtime statistics embed
│   ├── SuggestCommand.cs           # /suggest — modal form, posts suggestion embed to channel
│   ├── HelpCommand.cs              # /help — shows all available commands
│   └── SetStatusCommand.cs         # /setstatus — allows the bot owner to set the bot's status
├── BotConfig.cs                    # Config loading and migration from config.yaml (YamlDotNet)
├── CommandHandler.cs               # Registers commands and routes interactions to ICommand modules
├── ToastielabService.cs            # Toastielab REST API calls
├── Logger.cs                       # Coloured console logger
├── Program.cs                      # Entry point, dependency injection setup
└── Kaede.csproj

Adding a new command

  1. Create a new file in Commands/ implementing ICommand.
  2. Add the command to the CommandService file. (Check line 19 in the file for more information)

CommandHandler will automatically pick it up, register it with Discord, and route interactions to it.

LICENSE

Copyright 2026 EllieBotDevs

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.