MCPcopy Create free account
hub / github.com/MMadmer/EpicAssetsNotifyBot / localizerForMessage

Method localizerForMessage

internal/discord/runtime.go:884–891  ·  view source on GitHub ↗
(message *commandContext)

Source from the content-addressed store, hash-verified

882}
883
884func (r *Runtime) localizerForMessage(message *commandContext) *i18n.Localizer {
885 if message.guildID == "" {
886 userID, _ := strconv.ParseInt(message.author.ID, 10, 64)
887 return r.localizer.ForLocale(r.userLocale(userID))
888 }
889 guildID, _ := strconv.ParseInt(message.guildID, 10, 64)
890 return r.localizer.ForLocale(r.guildLocale(guildID))
891}
892
893func (r *Runtime) guildConfigLocked(guildID int64) *model.GuildConfig {
894 return r.guildConfigs[guildID]

Callers 15

handleCommandMethod · 0.95
handleSubscribeMethod · 0.95
handleUnsubscribeMethod · 0.95
handleEnableMethod · 0.95
handleDisableMethod · 0.95
handleSetChannelMethod · 0.95
handleSetThreadMethod · 0.95
handleClearThreadMethod · 0.95
handleSetRoleMethod · 0.95
handleClearRoleMethod · 0.95
handleImagesMethod · 0.95
handleSettingsMethod · 0.95

Calls 3

userLocaleMethod · 0.95
guildLocaleMethod · 0.95
ForLocaleMethod · 0.80

Tested by

no test coverage detected