build(go): rename module to use git.anhgelus.world instead of github

This commit is contained in:
Anhgelus Morhtuuzh 2025-08-21 14:59:23 +02:00
parent 166aadabfb
commit c04f4d9fff
Signed by: anhgelus
GPG key ID: CAD341EFA92DDDE5
14 changed files with 38 additions and 34 deletions

View file

@ -25,14 +25,11 @@ There are two ways to install the bot: docker and build.
1. Clone the repository 1. Clone the repository
```bash ```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 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 password of the database
3. Start the compose file 3. Build the image and start it
```bash
$ docker compose up -d --build
```
Now you have to edit `config/config.toml`. Now you have to edit `config/config.toml`.
You can understand how this config file works below. 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 1. Clone the repository
```bash ```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+ 2. Install Go 1.24+
3. Go into the repository and build the program 3. Go into the repository and build the program

View file

@ -4,11 +4,11 @@ import (
"fmt" "fmt"
"strings" "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/cmd"
"github.com/anhgelus/gokord/component" "github.com/anhgelus/gokord/component"
"github.com/anhgelus/gokord/logger" "github.com/anhgelus/gokord/logger"
"github.com/anhgelus/les-copaings-bot/config"
"github.com/anhgelus/les-copaings-bot/exp"
"github.com/bwmarrin/discordgo" "github.com/bwmarrin/discordgo"
) )

View file

@ -2,10 +2,11 @@ package commands
import ( import (
"fmt" "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/cmd"
"github.com/anhgelus/gokord/logger" "github.com/anhgelus/gokord/logger"
"github.com/anhgelus/les-copaings-bot/exp"
"github.com/anhgelus/les-copaings-bot/user"
"github.com/bwmarrin/discordgo" "github.com/bwmarrin/discordgo"
) )

View file

@ -1,10 +1,10 @@
package commands package commands
import ( import (
"git.anhgelus.world/anhgelus/les-copaings-bot/user"
"github.com/anhgelus/gokord" "github.com/anhgelus/gokord"
"github.com/anhgelus/gokord/cmd" "github.com/anhgelus/gokord/cmd"
"github.com/anhgelus/gokord/logger" "github.com/anhgelus/gokord/logger"
"github.com/anhgelus/les-copaings-bot/user"
"github.com/bwmarrin/discordgo" "github.com/bwmarrin/discordgo"
) )

View file

@ -2,13 +2,14 @@ package commands
import ( import (
"fmt" "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/cmd"
"github.com/anhgelus/gokord/logger" "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" "github.com/bwmarrin/discordgo"
"sync"
) )
func Top(_ *discordgo.Session, i *discordgo.InteractionCreate, _ cmd.OptionMap, resp *cmd.ResponseBuilder) { func Top(_ *discordgo.Session, i *discordgo.InteractionCreate, _ cmd.OptionMap, resp *cmd.ResponseBuilder) {

View file

@ -2,6 +2,7 @@ package main
import ( import (
"fmt" "fmt"
"github.com/anhgelus/gokord" "github.com/anhgelus/gokord"
"github.com/pelletier/go-toml/v2" "github.com/pelletier/go-toml/v2"
"gorm.io/driver/postgres" "gorm.io/driver/postgres"

View file

@ -1,11 +1,12 @@
package config package config
import ( import (
"strings"
"github.com/anhgelus/gokord/cmd" "github.com/anhgelus/gokord/cmd"
"github.com/anhgelus/gokord/component" "github.com/anhgelus/gokord/component"
"github.com/anhgelus/gokord/logger" "github.com/anhgelus/gokord/logger"
"github.com/bwmarrin/discordgo" "github.com/bwmarrin/discordgo"
"strings"
) )
const ( const (

View file

@ -5,11 +5,11 @@ import (
"strconv" "strconv"
"time" "time"
"git.anhgelus.world/anhgelus/les-copaings-bot/exp"
"github.com/anhgelus/gokord" "github.com/anhgelus/gokord"
"github.com/anhgelus/gokord/cmd" "github.com/anhgelus/gokord/cmd"
"github.com/anhgelus/gokord/component" "github.com/anhgelus/gokord/component"
"github.com/anhgelus/gokord/logger" "github.com/anhgelus/gokord/logger"
"github.com/anhgelus/les-copaings-bot/exp"
"github.com/bwmarrin/discordgo" "github.com/bwmarrin/discordgo"
) )

View file

@ -2,13 +2,14 @@ package main
import ( import (
"fmt" "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" "strings"
"time" "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 ( const (

2
go.mod
View file

@ -1,4 +1,4 @@
module github.com/anhgelus/les-copaings-bot module git.anhgelus.world/anhgelus/les-copaings-bot
go 1.24 go 1.24

View file

@ -7,12 +7,12 @@ import (
"os" "os"
"time" "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"
"github.com/anhgelus/gokord/cmd" "github.com/anhgelus/gokord/cmd"
"github.com/anhgelus/gokord/logger" "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/bwmarrin/discordgo"
"github.com/joho/godotenv" "github.com/joho/godotenv"
) )

View file

@ -5,10 +5,10 @@ import (
"sync" "sync"
"time" "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"
"github.com/anhgelus/gokord/logger" "github.com/anhgelus/gokord/logger"
"github.com/anhgelus/les-copaings-bot/config"
"github.com/anhgelus/les-copaings-bot/exp"
"github.com/bwmarrin/discordgo" "github.com/bwmarrin/discordgo"
) )

View file

@ -1,9 +1,10 @@
package user package user
import ( import (
"time"
"github.com/anhgelus/gokord" "github.com/anhgelus/gokord"
"github.com/anhgelus/gokord/logger" "github.com/anhgelus/gokord/logger"
"time"
) )
type Copaing struct { type Copaing struct {

View file

@ -1,13 +1,14 @@
package user package user
import ( 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" "slices"
"sync" "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 { type cXP struct {