feat: Fix command description's prefix
This commit is contained in:
parent
6bb97c9ebd
commit
d96ae87d86
6 changed files with 16 additions and 14 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"fmt"
|
||||
"strconv"
|
||||
|
||||
"git.wh64.net/muffin/goMuffin/configs"
|
||||
"git.wh64.net/muffin/goMuffin/databases"
|
||||
"git.wh64.net/muffin/goMuffin/utils"
|
||||
"github.com/bwmarrin/discordgo"
|
||||
|
@ -37,7 +38,7 @@ var DataLengthCommand *Command = &Command{
|
|||
},
|
||||
Aliases: []string{"학습데이터량", "데이터량", "학습량"},
|
||||
DetailedDescription: &DetailedDescription{
|
||||
Usage: "머핀아 학습데이터량",
|
||||
Usage: fmt.Sprintf("%s학습데이터량", configs.Config.Bot.Prefix),
|
||||
},
|
||||
Category: Generals,
|
||||
MessageRun: func(ctx *MsgContext) {
|
||||
|
|
|
@ -3,9 +3,9 @@ package commands
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"git.wh64.net/muffin/goMuffin/configs"
|
||||
"git.wh64.net/muffin/goMuffin/databases"
|
||||
"git.wh64.net/muffin/goMuffin/utils"
|
||||
"github.com/bwmarrin/discordgo"
|
||||
|
@ -27,8 +27,8 @@ var DeleteLearnedDataCommand *Command = &Command{
|
|||
},
|
||||
Aliases: []string{"잊어", "지워"},
|
||||
DetailedDescription: &DetailedDescription{
|
||||
Usage: "머핀아 삭제 (삭제할 단어)",
|
||||
Examples: []string{"머핀아 삭제 머핀"},
|
||||
Usage: fmt.Sprintf("%s삭제 (삭제할 단어)", configs.Config.Bot.Prefix),
|
||||
Examples: []string{fmt.Sprintf("%s삭제 머핀", configs.Config.Bot.Prefix)},
|
||||
},
|
||||
Category: Chattings,
|
||||
MessageRun: func(ctx *MsgContext) {
|
||||
|
@ -124,9 +124,9 @@ func deleteLearnedDataRun(c *Command, s *discordgo.Session, m any, args *[]strin
|
|||
options = append(options, discordgo.SelectMenuOption{
|
||||
Label: fmt.Sprintf("%d번 지식", i+1),
|
||||
Description: data.Result,
|
||||
Value: utils.DeleteLearnedData + data.Id.Hex() + `&No.` + strconv.Itoa(i+1),
|
||||
Value: fmt.Sprintf("%s%s&No.%d", utils.DeleteLearnedData, data.Id.Hex(), i+1),
|
||||
})
|
||||
description += strconv.Itoa(i+1) + ". " + data.Result + "\n"
|
||||
description += fmt.Sprintf("%d. %s\n", i+1, data.Result)
|
||||
}
|
||||
|
||||
embed := &discordgo.MessageEmbed{
|
||||
|
|
|
@ -34,8 +34,8 @@ var HelpCommand *Command = &Command{
|
|||
},
|
||||
Aliases: []string{"도움", "명령어", "help"},
|
||||
DetailedDescription: &DetailedDescription{
|
||||
Usage: "머핀아 도움말 [명령어]",
|
||||
Examples: []string{"머핀아 도움말", "머핀아 도움말 배워"},
|
||||
Usage: fmt.Sprintf("%s도움말 [명령어]", configs.Config.Bot.Prefix),
|
||||
Examples: []string{fmt.Sprintf("%s도움말", configs.Config.Bot.Prefix), fmt.Sprintf("%s도움말 배워", configs.Config.Bot.Prefix)},
|
||||
},
|
||||
Category: Generals,
|
||||
MessageRun: func(ctx *MsgContext) {
|
||||
|
|
|
@ -12,10 +12,10 @@ import (
|
|||
var InformationCommand *Command = &Command{
|
||||
ApplicationCommand: &discordgo.ApplicationCommand{
|
||||
Name: "정보",
|
||||
Description: "머핀봇의 정보를 알ㄹ려줘요.",
|
||||
Description: fmt.Sprintf("머핀봇의 정보를 알ㄹ려줘요."),
|
||||
},
|
||||
DetailedDescription: &DetailedDescription{
|
||||
Usage: "머핀아 정보",
|
||||
Usage: fmt.Sprintf("%s정보", configs.Config.Bot.Prefix),
|
||||
},
|
||||
Category: Generals,
|
||||
MessageRun: func(ctx *MsgContext) {
|
||||
|
|
|
@ -35,10 +35,10 @@ var LearnCommand *Command = &Command{
|
|||
},
|
||||
Aliases: []string{"공부"},
|
||||
DetailedDescription: &DetailedDescription{
|
||||
Usage: "머핀아 배워 (등록할 단어) (대답)",
|
||||
Usage: fmt.Sprintf("%s배워 (등록할 단어) (대답)", configs.Config.Bot.Prefix),
|
||||
Examples: []string{"머핀아 배워 안녕 안녕!",
|
||||
"머핀아 배워 \"야 죽을래?\" \"아니요 ㅠㅠㅠ\"",
|
||||
"머핀아 배워 미간은_누구야? 이봇의_개발자요",
|
||||
fmt.Sprintf("%s배워 \"야 죽을래?\" \"아니요 ㅠㅠㅠ\"", configs.Config.Bot.Prefix),
|
||||
fmt.Sprintf("%s배워 미간은_누구야? 이봇의_개발자요", configs.Config.Bot.Prefix),
|
||||
},
|
||||
},
|
||||
Category: Chattings,
|
||||
|
|
|
@ -5,6 +5,7 @@ import (
|
|||
"fmt"
|
||||
"strings"
|
||||
|
||||
"git.wh64.net/muffin/goMuffin/configs"
|
||||
"git.wh64.net/muffin/goMuffin/databases"
|
||||
"git.wh64.net/muffin/goMuffin/utils"
|
||||
"github.com/bwmarrin/discordgo"
|
||||
|
@ -20,7 +21,7 @@ var LearnedDataListCommand *Command = &Command{
|
|||
},
|
||||
Aliases: []string{"list", "목록", "지식목록"},
|
||||
DetailedDescription: &DetailedDescription{
|
||||
Usage: "머핀아 리스트",
|
||||
Usage: fmt.Sprintf("%s리스트", configs.Config.Bot.Prefix),
|
||||
},
|
||||
Category: Chattings,
|
||||
MessageRun: func(ctx *MsgContext) {
|
||||
|
|
Loading…
Reference in a new issue