Discover Packages
github.com/willaiemi/go-bot
command
module
Version:
v0.0.0-...-330fccb
Opens a new window with list of versions in this module.
Published: Jul 11, 2025
License: MIT
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: ? modules, 0 packages
The first number is the count of modules that contain a package that imports this one.
The module count is a better indicator of popularity than the package count.
A module with 100 importing packages is counted only once instead of 100 times,
reflecting the fact that the choice to use the package was likely made only once,
not 100 times.
A '?' means that the value hasn't been computed yet.
Opens a new window with list of known importers.
README
README
¶
Go Discord Bot – TODO Manager
A lightweight Discord bot written in Go that helps users manage personal TODO items through simple slash commands. Built using discordgo .
Features
/ping: Check if the bot is responsive.
/add [title]: Add a new TODO item.
/list [filter]: View TODO items (all, pending, or completed).
/done [id]: Mark a TODO item as done.
/edit [id] [title]: Edit the title of a TODO.
/delete [id]: Delete a TODO item.
Buttons: Toggle between pending and completed items interactively.
Each user's TODOs are currently stored in-memory and scoped by Discord user ID.
Getting Started
Prerequisites
Go 1.20+
A Discord bot token
Local Setup
Clone the repository:
git clone https://github.com/willaiemi/go-bot
cd go-bot
Create a .env file with the following variables:
BOT_TOKEN=your_discord_bot_token
DB_USER=postgres
DB_PASSWORD=postgres
DB_NAME=tododb
DB_HOST=postgres
DB_PORT=5432
Install dependencies:
go mod tidy
Run the bot:
go run main.go
Docker Setup (Optional)
The project includes a working docker-compose.yml for spinning up both the bot and a PostgreSQL database.
Start the services:
docker-compose up --build
This setup builds the Go app and waits for the Postgres container to become healthy before launching the bot.
Note: The bot currently stores TODOs in memory, but PostgreSQL integration is in progress.
Project Structure
internal/commands: Handles slash command registration and interactions.
internal/todo: Manages in-memory TODO lists.
internal/database: PostgreSQL connection pool and DB setup (coming soon).
main.go: Application entry point.
Example Usage
/add title:Buy milk
/list filter:pending
> ▪ **Buy milk** (ID: 1)
/done id:1
> ✅ ~~**Buy milk**~~ (ID: 1)
/edit id:1 title:Buy chocolate milk
/delete id:1
Roadmap
Slash command support
Button-based navigation
PostgreSQL persistence
Add due dates or timestamps
Pagination for long lists
Unit tests and structured logging
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
internal
Click to show internal directories.
Click to hide internal directories.