KotatsuApp/Emanon-GO
A basic manga bot for the Kotatsu Discord server written in Go
Emanon-GO (the Totoro bot)
Emanon-GO (the Totoro bot) is a lightweight Discord bot written in Go that provides AniList-based
searching (anime/manga) and forum thread tagging helpers for communities using
Discord Forums. It is a Go port of the original Emanon Python bot with
improvements to embed styling and Docker support.
Example embed produced by Emanon-GO
Features
- Auto-search AniList when users post wrapped names (e.g.,
My Favorite Mangaor<My Manga>) - Pretty Discord embed with genres, shortened description and "(more)" link
- Stylized cover image using AniList media artwork
- Forum thread commands for staff to apply standard tags and prefixes (.solved, .duplicate, etc.)
- Forum thread commands for staff to apply standard tags and prefixes (.solved, .duplicate, etc.)
- Additional thread controls for staff:
.close,.open,.lock,.unlock(archive/unarchive and lock/unlock threads) - Config-driven: enable/disable search, restrict channels, and set allowed moderator roles
Requirements
- Go 1.20+ (for manual build)
- Docker (optional, for containerized deployment)
Getting started
Manual build
- Clone the repository:
git clone https://github.com/KotatsuApp/Emanon-GO.git && cd Emanon-GO- Build the binary:
go build -o emanon-go-
Open
config.yamland fill in your Discord bot token and other options. -
Run the bot:
./emanon-goDocker
Build the image:
docker build -t emanon-go:latest .Run the container:
docker run --name emanon-go emanon-go:latestNotes:
- The container expects
config.yamlat/app/config.yaml. You can also supply configuration via environment variables if supported.
Configuration
- Copy
example_config.yamltoconfig.yamland edit the values. Important options:discord_token: your bot token (or set via environment variables in your deployment)search_enabled: enable or disable automatic AniList scanningsearch_channels: optional list of channel IDs the bot will scanallowed_role_ids/allowed_permissions: restrict which users can run thread commands- New optional help embed customization (optional):
help_title: custom title for the.helpembed (string)help_repo_url: repository URL shown in the.helpembed (string)help_examples: free-form examples or usage text shown under the AniList examples field in.help(string)
Usage
AniList searching
-
Non-command messages (not starting with
.) are scanned for patterns matching anime/manga titles. Examples:#inline code:Emanon Wanderer- Curly braces: {Emanon Wanderer}
- Angle brackets for manga:
-
If the bot finds matches it will reply with a styled embed containing:
- Title and site link
- Genre list (deduplicated)
- Shortened description with a "(more)" link to AniList
- Stylized media image (sourced from AniList media endpoint)
- Footer showing format and release date (e.g., "Manga • October 28, 2025")
Forum thread commands (staff only)
- Commands are prefixed with
.and must be used in a thread channel. Example commands:.solved— mark thread title with[Solved]and apply the.Solvedforum tag.aware— mark thread title with[Devs aware]and apply the.Devs awaretag- Other available commands:
.duplicate,.false,.known,.wrong
Additional staff controls:
.close— immediately archive (close) the thread.open— unarchive (reopen) the thread.lock— lock the thread to prevent new messages.unlock— unlock the thread
Behavior note:
- When staff run tag-applying commands such as
.solved,.aware,.duplicate, etc., the bot will set the thread's "Hide After Inactivity" / auto-archive duration to 1 hour automatically. This helps posts be hidden after inactivity without requiring a separate.closecommand.
.help command:
.helpreplies to the triggering message with a nicely formatted embed listing available commands, usage hints (including AniList search examples), and a link to the project's GitHub repository. The.helpembed content can be customized viahelp_title,help_repo_url, andhelp_examplesinconfig.yaml.
The bot will only allow staff to run thread commands. Permissions are configurable via allowed_role_ids or allowed_permissions in the config.
Developer notes
- The code uses AniList GraphQL to fetch media data and then constructs a Discord embed that mirrors the original Python bot formatting.
- Image source:
https://img.anili.st/media/{id}is used to get the stylized artwork similar to the Python implementation.
Testing and contributing
- Run
go buildlocally and test in a private server before deploying. - Open PRs for improvements. Include unit tests where applicable.
Troubleshooting
- If embeds look wrong, ensure the AniList response contains
coverImage.colorandstartDate. - If forum tag changes fail, check the bot's Manage Threads/Manage Channels permissions and that the forum has the expected tag names.
License
This project follows the existing LICENSE in the repository.