From c04f4d9fff2e753f0477a07a9f8f43fbcba8969e Mon Sep 17 00:00:00 2001 From: Anhgelus Morhtuuzh Date: Thu, 21 Aug 2025 14:59:23 +0200 Subject: [PATCH] build(go): rename module to use git.anhgelus.world instead of github --- README.md | 9 +++------ commands/config.go | 4 ++-- commands/rank.go | 5 +++-- commands/reset.go | 2 +- commands/top.go | 9 +++++---- config.go | 1 + config/channel.go | 3 ++- config/xp_role.go | 2 +- events.go | 11 ++++++----- go.mod | 2 +- main.go | 6 +++--- user/level.go | 4 ++-- user/member.go | 3 ++- user/xp.go | 11 ++++++----- 14 files changed, 38 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 800e1d2..fea1593 100644 --- a/README.md +++ b/README.md @@ -25,14 +25,11 @@ There are two ways to install the bot: docker and build. 1. Clone the repository ```bash -$ git clone https://github.com/anhgelus/les-copaings-bot.git +$ git clone https://git.anhgelus.world/anhgelus/les-copaings-bot.git ``` 2. Go into the repository, rename `.env.example` into `.env` and customize it: add your token, change the user and the password of the database -3. Start the compose file -```bash -$ docker compose up -d --build -``` +3. Build the image and start it Now you have to edit `config/config.toml`. You can understand how this config file works below. @@ -45,7 +42,7 @@ You can stop the compose file with `docker compose down` 1. Clone the repository ```bash -$ git clone https://github.com/anhgelus/les-copaings-bot.git +$ git clone https://git.anhgelus.world/anhgelus/les-copaings-bot.git ``` 2. Install Go 1.24+ 3. Go into the repository and build the program diff --git a/commands/config.go b/commands/config.go index b62d413..41fb60e 100644 --- a/commands/config.go +++ b/commands/config.go @@ -4,11 +4,11 @@ import ( "fmt" "strings" + "git.anhgelus.world/anhgelus/les-copaings-bot/config" + "git.anhgelus.world/anhgelus/les-copaings-bot/exp" "github.com/anhgelus/gokord/cmd" "github.com/anhgelus/gokord/component" "github.com/anhgelus/gokord/logger" - "github.com/anhgelus/les-copaings-bot/config" - "github.com/anhgelus/les-copaings-bot/exp" "github.com/bwmarrin/discordgo" ) diff --git a/commands/rank.go b/commands/rank.go index 9673089..48a893f 100644 --- a/commands/rank.go +++ b/commands/rank.go @@ -2,10 +2,11 @@ package commands import ( "fmt" + + "git.anhgelus.world/anhgelus/les-copaings-bot/exp" + "git.anhgelus.world/anhgelus/les-copaings-bot/user" "github.com/anhgelus/gokord/cmd" "github.com/anhgelus/gokord/logger" - "github.com/anhgelus/les-copaings-bot/exp" - "github.com/anhgelus/les-copaings-bot/user" "github.com/bwmarrin/discordgo" ) diff --git a/commands/reset.go b/commands/reset.go index 653a1d9..128354f 100644 --- a/commands/reset.go +++ b/commands/reset.go @@ -1,10 +1,10 @@ package commands import ( + "git.anhgelus.world/anhgelus/les-copaings-bot/user" "github.com/anhgelus/gokord" "github.com/anhgelus/gokord/cmd" "github.com/anhgelus/gokord/logger" - "github.com/anhgelus/les-copaings-bot/user" "github.com/bwmarrin/discordgo" ) diff --git a/commands/top.go b/commands/top.go index 09fa91f..fedea45 100644 --- a/commands/top.go +++ b/commands/top.go @@ -2,13 +2,14 @@ package commands import ( "fmt" + "sync" + + "git.anhgelus.world/anhgelus/les-copaings-bot/config" + "git.anhgelus.world/anhgelus/les-copaings-bot/exp" + "git.anhgelus.world/anhgelus/les-copaings-bot/user" "github.com/anhgelus/gokord/cmd" "github.com/anhgelus/gokord/logger" - "github.com/anhgelus/les-copaings-bot/config" - "github.com/anhgelus/les-copaings-bot/exp" - "github.com/anhgelus/les-copaings-bot/user" "github.com/bwmarrin/discordgo" - "sync" ) func Top(_ *discordgo.Session, i *discordgo.InteractionCreate, _ cmd.OptionMap, resp *cmd.ResponseBuilder) { diff --git a/config.go b/config.go index 7a8c57b..ff0472e 100644 --- a/config.go +++ b/config.go @@ -2,6 +2,7 @@ package main import ( "fmt" + "github.com/anhgelus/gokord" "github.com/pelletier/go-toml/v2" "gorm.io/driver/postgres" diff --git a/config/channel.go b/config/channel.go index 355b0e1..7c70443 100644 --- a/config/channel.go +++ b/config/channel.go @@ -1,11 +1,12 @@ package config import ( + "strings" + "github.com/anhgelus/gokord/cmd" "github.com/anhgelus/gokord/component" "github.com/anhgelus/gokord/logger" "github.com/bwmarrin/discordgo" - "strings" ) const ( diff --git a/config/xp_role.go b/config/xp_role.go index f815cc2..a0bef71 100644 --- a/config/xp_role.go +++ b/config/xp_role.go @@ -5,11 +5,11 @@ import ( "strconv" "time" + "git.anhgelus.world/anhgelus/les-copaings-bot/exp" "github.com/anhgelus/gokord" "github.com/anhgelus/gokord/cmd" "github.com/anhgelus/gokord/component" "github.com/anhgelus/gokord/logger" - "github.com/anhgelus/les-copaings-bot/exp" "github.com/bwmarrin/discordgo" ) diff --git a/events.go b/events.go index 4821e38..17a83a0 100644 --- a/events.go +++ b/events.go @@ -2,13 +2,14 @@ package main import ( "fmt" - "github.com/anhgelus/gokord/logger" - "github.com/anhgelus/les-copaings-bot/config" - "github.com/anhgelus/les-copaings-bot/exp" - "github.com/anhgelus/les-copaings-bot/user" - "github.com/bwmarrin/discordgo" "strings" "time" + + "git.anhgelus.world/anhgelus/les-copaings-bot/config" + "git.anhgelus.world/anhgelus/les-copaings-bot/exp" + "git.anhgelus.world/anhgelus/les-copaings-bot/user" + "github.com/anhgelus/gokord/logger" + "github.com/bwmarrin/discordgo" ) const ( diff --git a/go.mod b/go.mod index df8f3bb..f6b1b2d 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/anhgelus/les-copaings-bot +module git.anhgelus.world/anhgelus/les-copaings-bot go 1.24 diff --git a/main.go b/main.go index 684ff6e..9c0a3b7 100644 --- a/main.go +++ b/main.go @@ -7,12 +7,12 @@ import ( "os" "time" + "git.anhgelus.world/anhgelus/les-copaings-bot/commands" + "git.anhgelus.world/anhgelus/les-copaings-bot/config" + "git.anhgelus.world/anhgelus/les-copaings-bot/user" "github.com/anhgelus/gokord" "github.com/anhgelus/gokord/cmd" "github.com/anhgelus/gokord/logger" - "github.com/anhgelus/les-copaings-bot/commands" - "github.com/anhgelus/les-copaings-bot/config" - "github.com/anhgelus/les-copaings-bot/user" "github.com/bwmarrin/discordgo" "github.com/joho/godotenv" ) diff --git a/user/level.go b/user/level.go index 2b7e869..b859268 100644 --- a/user/level.go +++ b/user/level.go @@ -5,10 +5,10 @@ import ( "sync" "time" + "git.anhgelus.world/anhgelus/les-copaings-bot/config" + "git.anhgelus.world/anhgelus/les-copaings-bot/exp" "github.com/anhgelus/gokord" "github.com/anhgelus/gokord/logger" - "github.com/anhgelus/les-copaings-bot/config" - "github.com/anhgelus/les-copaings-bot/exp" "github.com/bwmarrin/discordgo" ) diff --git a/user/member.go b/user/member.go index a0e50fc..afc94a6 100644 --- a/user/member.go +++ b/user/member.go @@ -1,9 +1,10 @@ package user import ( + "time" + "github.com/anhgelus/gokord" "github.com/anhgelus/gokord/logger" - "time" ) type Copaing struct { diff --git a/user/xp.go b/user/xp.go index c446977..d116c56 100644 --- a/user/xp.go +++ b/user/xp.go @@ -1,13 +1,14 @@ package user import ( - "github.com/anhgelus/gokord" - "github.com/anhgelus/gokord/logger" - "github.com/anhgelus/les-copaings-bot/config" - "github.com/anhgelus/les-copaings-bot/exp" - "github.com/bwmarrin/discordgo" "slices" "sync" + + "git.anhgelus.world/anhgelus/les-copaings-bot/config" + "git.anhgelus.world/anhgelus/les-copaings-bot/exp" + "github.com/anhgelus/gokord" + "github.com/anhgelus/gokord/logger" + "github.com/bwmarrin/discordgo" ) type cXP struct {