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
```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

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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) {

View file

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

View file

@ -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 (

View file

@ -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"
)

View file

@ -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 (

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

View file

@ -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"
)

View file

@ -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"
)

View file

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

View file

@ -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 {