diff options
| author | Fuwn <[email protected]> | 2021-07-05 17:51:18 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-07-05 17:51:18 -0700 |
| commit | d2f17625a68ac93d4e96271440b0f943ab9770a1 (patch) | |
| tree | 1ad3099b916556ea74510c75a34e5e700614bf0d | |
| parent | feat(discord): setup bot (diff) | |
| download | munch-d2f17625a68ac93d4e96271440b0f943ab9770a1.tar.xz munch-d2f17625a68ac93d4e96271440b0f943ab9770a1.zip | |
refactor(discord): move prefix to config file
| -rw-r--r-- | config.example.yml | 1 | ||||
| -rw-r--r-- | pkg/discord/discord.go | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/config.example.yml b/config.example.yml index 9db10b5..907638f 100644 --- a/config.example.yml +++ b/config.example.yml @@ -10,3 +10,4 @@ worlds: discord: token: SoMetOKen22 + prefix: m~ diff --git a/pkg/discord/discord.go b/pkg/discord/discord.go index 30aa071..27d2498 100644 --- a/pkg/discord/discord.go +++ b/pkg/discord/discord.go @@ -15,7 +15,7 @@ func Do() { viper.GetString("discord.token"), commands, func(ctx *bot.Context) error { - ctx.HasPrefix = bot.NewPrefix("m~") + ctx.HasPrefix = bot.NewPrefix(viper.GetString("discord.prefix")) return nil }, |