This bot is written in Golang and designed to help you get more active users on your Discord server.
Features:
- Check attendance
- Get points from reactions
- Check your points
- Check ranking points
- Download and install the required dependencies
- Clone the repository to your machine
- Run
go run cmd/main.go
in the project directory - Invite the bot to your Discord server
- Enjoy using the bot!
- Using the
-stage
flaggo run cmd/main.go -stage="dev"
go run cmd/main.go -stage dev
- Run with
go build
go build -o bot ./cmd/main.go
- Build:
./bot -stage dev
--> development stage
For more detailed installation and usage instructions, refer to the DappBot.
Application Structure
cmd/
: This directory should contain the main package and entry point of your application, as well as any utility scripts or tools for deployment, monitoring, and testing.pkg/
: This directory should contain reusable packages and libraries that can be shared across multiple services or components of your application. Each package should have a clear and single responsibility, and should follow best practices for performance and concurrency.internal/
: This directory should contain internal packages and modules that are specific to your application, and should not be exposed outside of your organization or team. This can help with security and code isolation.api/
: This directory should contain the API handlers, middleware, and controllers for your application, as well as any OpenAPI or Swagger specifications. Use standard HTTP methods and status codes, and follow best practices for RESTful API design.config/
: This directory should contain configuration files for your application, including environment variables, database settings, and logging parameters. Use a configuration management tool to manage and deploy these settings across multiple environments.database/
: This directory should contain database migrations, schema definitions, and queries for your application. Use a database management tool to automate schema changes and backups, and follow best practices for database design and indexing.models/
: This directory should contain domain models, value objects, and data transfer objects for your application, following best practices for object-oriented design and encapsulation.services/
: This directory should contain service components and workers for your application, as well as any message brokers or queues for asynchronous processing. Use a distributed systems architecture that can scale horizontally and handle failures gracefully.tests/
: This directory should contain unit tests, integration tests, and end-to-end tests for your application, as well as any mock or fake dependencies. Use a testing framework that can run tests in parallel and generate coverage reports.vendor/
: This directory should contain the dependencies and libraries used by your application, managed by a package manager like Go modules or Dep.
- Here is an example structure tree for a Dapp Discord Bot App
- main.go
- deploy.sh
- monitor.sh
- test.sh
- pkg/
- logger/
- logger.go
- logger_test.go
- cache/
- cache.go
- cache_test.go
- utils/
- utils.go
- utils_test.go
- internal/
- auth/
- auth.go
- auth_test.go
- billing/
- billing.go
- billing_test.go
- api/
- handlers/
- users.go
- users_test.go
- middleware/
- auth.go
- auth_test.go
- controllers/
- users.go
- users_test.go
- openapi.yml
- config/
- dev.env
- staging.env
- prod.env
- log.conf
- database/
- migrations/
- 001_init.sql
- 002_add_users.sql
- schema.sql
- queries.sql
- models/
- user.go
- order.go
- address.go
- services/
- users/
- users.go
- users_test.go
- orders/
- orders.go
- orders_test.go
- messages/
- kafka.go
- kafka_test.go
- tests/
- unit/
- logger_test.go
- cache_test.go
- integration/
- auth_test.go
- users_test.go
- e2e/
- api_test.go
- vendor/
- github.com/
- gorilla/
- mux/
- mux.go
- websocket/
- websocket.go
- confluent/
- kafka/
- kafka.go