diff options
| author | ilotterytea <iltsu@alright.party> | 2025-07-03 18:05:11 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-07-03 18:05:47 +0500 |
| commit | e23ccfb00c8fa39926b32e94be6bc379e70ba11d (patch) | |
| tree | ad4758e8a1b947782186f11f1739dde1aca9ca23 /bot/src/localization | |
| parent | 1e8f182b083679b06d8e30fe52b1ed1130a19287 (diff) | |
feat: separated requester from request
Diffstat (limited to 'bot/src/localization')
| -rw-r--r-- | bot/src/localization/localization.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bot/src/localization/localization.cpp b/bot/src/localization/localization.cpp index b8659ea..fe7a02a 100644 --- a/bot/src/localization/localization.cpp +++ b/bot/src/localization/localization.cpp @@ -105,7 +105,7 @@ namespace bot { const command::Request &request, const LineId &line_id, const std::vector<std::string> &args) const { std::optional<std::string> o_line = this->get_formatted_line( - request.channel_preferences.get_locale(), line_id, args); + request.requester.channel_preferences.get_locale(), line_id, args); if (!o_line.has_value()) { return std::nullopt; @@ -114,10 +114,11 @@ namespace bot { std::string line = o_line.value(); std::map<std::string, std::string> token_map = { - {"{sender.alias_name}", request.user.get_alias_name()}, - {"{source.alias_name}", request.channel.get_alias_name()}, + {"{sender.alias_name}", request.requester.user.get_alias_name()}, + {"{source.alias_name}", request.requester.channel.get_alias_name()}, {"{default.prefix}", DEFAULT_PREFIX}, - {"{channel.prefix}", request.channel_preferences.get_prefix()}}; + {"{channel.prefix}", + request.requester.channel_preferences.get_prefix()}}; for (const auto &pair : token_map) { int pos = line.find(pair.first); |
