diff options
| author | William Hergès <william@herges.fr> | 2025-09-04 16:30:54 +0200 |
|---|---|---|
| committer | William Hergès <william@herges.fr> | 2025-09-04 16:30:54 +0200 |
| commit | fa9b7767ab81471d15c29d77a85968e505b3b433 (patch) | |
| tree | 481f2ac867a7709e263802e842b9e12835f6ac0c /commands/credits.go | |
| parent | 7508627d86a4f2ef9b3caebd88d92fe8be854816 (diff) | |
| parent | 30ecd60b041398390f11fccdf46444fa28690bd8 (diff) | |
Merge branch 'main' into feat/xp-boost
Diffstat (limited to 'commands/credits.go')
| -rw-r--r-- | commands/credits.go | 39 |
1 files changed, 11 insertions, 28 deletions
diff --git a/commands/credits.go b/commands/credits.go index 0943761..f0a8c46 100644 --- a/commands/credits.go +++ b/commands/credits.go @@ -1,36 +1,19 @@ package commands import ( - "github.com/anhgelus/gokord/utils" - "github.com/bwmarrin/discordgo" + "github.com/anhgelus/gokord" + "github.com/anhgelus/gokord/cmd" + "github.com/anhgelus/gokord/logger" + discordgo "github.com/nyttikord/gokord" ) -func Credits(s *discordgo.Session, i *discordgo.InteractionCreate, optMap utils.OptionMap, resp *utils.ResponseBuilder) { - err := resp.AddEmbed(&discordgo.MessageEmbed{ - - Type: discordgo.EmbedTypeRich, - Title: "Crédits", - Description: "Auteur du bot : @anhgelus (https://github.com/anhgelus)\nLangage : Go 1.24\nLicence : AGPLv3", - Color: utils.Success, - Fields: []*discordgo.MessageEmbedField{ - { - Name: "anhgelus/gokord", - Value: "v0.10.0 - MPL 2.0", - Inline: true, - }, - { - Name: "bwmarrin/discordgo", - Value: "v0.29.0 - BSD-3-Clause", - Inline: true, - }, - { - Name: "gorm", - Value: "v1.30.0 - MIT", - Inline: true, - }, - }, - }).Send() +func Credits(_ *discordgo.Session, i *discordgo.InteractionCreate, _ cmd.OptionMap, resp *cmd.ResponseBuilder) { + msg := "**Les Copaings**, le bot gérant les serveurs privés de [anhgelus](<https://anhgelus.world/>).\n" + msg += "Code source : <https://git.anhgelus.world/anhgelus/les-copaings-bot>\n\n" + msg += "Host du bot : " + gokord.BaseCfg.GetAuthor() + ".\n\n" + msg += "Utilise :\n- [anhgelus/gokord](<https://github.com/anhgelus/gokord>)" + err := resp.SetMessage(msg).Send() if err != nil { - utils.SendAlert("commands/credits.go - Sending credits", err.Error(), "guild_id", i.GuildID) + logger.Alert("commands/credits.go - Sending credits", err.Error(), "guild_id", i.GuildID) } } |
