This is a Golang-based Discord bot using the disgo library. The project is configured with a CI pipeline using GitHub Actions for building and testing the application. All secrets (such as the Discord bot token) are stored in GitHub Secrets.
I trust him.
- Build Voice-Master Functionality.
- Basic Discord message handling using 'disgo'.
- CI Pipeline setup using GitHub Actions for build and test.
- CD Pipeline setup (Where are we hosting? What tool are we going to use?).
- Full unit testing suite for basic features.
- Develop a modular progress structure for easy scalability.
Replace all third-party bots. llm integration? Twitter integration? Automatic cracked unc event organization in your local metropolitian area?
uncord-bot-go/
│
├── cmd/
│ └── main.go # Main entry point for the bot
│
├── config/
│ └── config.go # Configuration loader (e.g., environment variables)
│
├── handlers/
│ ├── message_handler.go # Handles messages
│ └── interaction_handler.go # Handles slash commands & interactions
│
├── services/
│ └── discord_service.go # Business logic for interacting with Discord API using disgo
│
├── internal/
│ └── util.go # Utility functions (logging, parsing, etc.)
│
├── .github/
│ └── workflows/
│ └── ci.yml # CI pipeline configuration for GitHub Actions
│
├── go.mod # Go module file
└── go.sum # Go dependencies
- Go 1.20+
- TODO: Describe the process for obtaining and setting bot token locally
Set the required environment variables:
export DISCORD_BOT_TOKEN="your_discord_bot_token"
-
Clone the repository:
git clone https://github.com/yourusername/uncord-bot-go.git cd uncord-bot-go
-
Install dependencies:
go mod download
-
Run the bot:
go run cmd/main.go
The CI pipeline is set up using GitHub Actions. It runs on every push or pull request to the main
branch, and it performs the following steps:
- Build: Compiles the Golang bot.
- Test: Runs tests for the project.
The GitHub Actions workflow is defined in .github/workflows/ci.yml
:
name: uncord-bot-go CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.20
- name: Install dependencies
run: go mod download
- name: Run tests
run: go test ./...
- name: Build the bot
run: go build -o uncord-bot-go cmd/main.go
Make sure the following secret is added in your GitHub repository:
DISCORD_BOT_TOKEN
: Your Discord bot token.
Feel free to fork this repository, make your changes in a new branch, and submit a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.