feat(credits): better message

This commit is contained in:
Anhgelus Morhtuuzh 2025-08-21 15:07:18 +02:00
parent c04f4d9fff
commit d98e5704f9
Signed by: anhgelus
GPG key ID: CAD341EFA92DDDE5

View file

@ -1,36 +1,18 @@
package commands package commands
import ( import (
"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/bwmarrin/discordgo" "github.com/bwmarrin/discordgo"
) )
func Credits(_ *discordgo.Session, i *discordgo.InteractionCreate, _ cmd.OptionMap, resp *cmd.ResponseBuilder) { func Credits(_ *discordgo.Session, i *discordgo.InteractionCreate, _ cmd.OptionMap, resp *cmd.ResponseBuilder) {
err := resp.AddEmbed(&discordgo.MessageEmbed{ 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"
Type: discordgo.EmbedTypeRich, msg += "Host du bot : " + gokord.BaseCfg.GetAuthor() + "\n\n"
Title: "Crédits", msg += "Utilise :\n- [anhgelus/gokord](<https://github.com/anhgelus/gokord>)"
Description: "Auteur du bot : @anhgelus (https://github.com/anhgelus)\nLangage : Go 1.24\nLicence : AGPLv3", err := resp.SetMessage(msg).Send()
Color: 0x10E6AD,
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()
if err != nil { if err != nil {
logger.Alert("commands/credits.go - Sending credits", err.Error(), "guild_id", i.GuildID) logger.Alert("commands/credits.go - Sending credits", err.Error(), "guild_id", i.GuildID)
} }