feat: add argument description in learn command

This commit is contained in:
Siwoo Jeon 2025-05-05 10:29:35 +09:00
parent ba5b45d5eb
commit 7127a57eb0
Signed by: migan
GPG key ID: 036E9A8C5E8E48DA
3 changed files with 10 additions and 3 deletions

View file

@ -106,6 +106,13 @@ func helpRun(s *discordgo.Session, m any, args *[]string) {
}, },
} }
if command.Name == LearnCommand.Name {
embed.Fields = append(embed.Fields, &discordgo.MessageEmbedField{
Name: "대답에 쓸 수 있는 인자",
Value: learnArguments,
})
}
if command.Aliases != nil { if command.Aliases != nil {
embed.Fields = append(embed.Fields, &discordgo.MessageEmbedField{ embed.Fields = append(embed.Fields, &discordgo.MessageEmbedField{
Name: "별칭", Name: "별칭",

View file

@ -13,7 +13,7 @@ import (
"github.com/bwmarrin/discordgo" "github.com/bwmarrin/discordgo"
) )
var arguments = utils.InlineCode("{user.name}") + "\n" + var learnArguments = utils.InlineCode("{user.name}") + "\n" +
utils.InlineCode("{user.mention}") + "\n" + utils.InlineCode("{user.mention}") + "\n" +
utils.InlineCode("{user.globalName}") + "\n" + utils.InlineCode("{user.globalName}") + "\n" +
utils.InlineCode("{user.id}") + "\n" + utils.InlineCode("{user.id}") + "\n" +
@ -91,7 +91,7 @@ func learnRun(c *Command, s *discordgo.Session, m any, args *[]string) {
}, },
{ {
Name: "사용 가능한 인자", Name: "사용 가능한 인자",
Value: arguments, Value: learnArguments,
Inline: true, Inline: true,
}, },
{ {

View file

@ -63,7 +63,7 @@ func main() {
}() }()
for _, cmd := range commands.Discommand.Commands { for _, cmd := range commands.Discommand.Commands {
if cmd.Name == "도움말" { if cmd.Name == commands.HelpCommand.Name {
// 극한의 성능 똥망 코드 탄생! // 극한의 성능 똥망 코드 탄생!
// 무려 똑같은 걸 반복해서 돌리는! // 무려 똑같은 걸 반복해서 돌리는!
for _, a := range commands.Discommand.Commands { for _, a := range commands.Discommand.Commands {