From 6034e01a6c0d62546f10247aa481304699ed4155 Mon Sep 17 00:00:00 2001 From: ilotterytea Date: Wed, 8 May 2024 22:15:48 +0500 Subject: feat: new command - !join --- src/localization/line_id.cpp | 18 ++++++++++++++++++ src/localization/line_id.hpp | 11 ++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) (limited to 'src/localization') diff --git a/src/localization/line_id.cpp b/src/localization/line_id.cpp index 2eca697..560ac90 100644 --- a/src/localization/line_id.cpp +++ b/src/localization/line_id.cpp @@ -10,6 +10,10 @@ namespace bot { return LineId::PingResponse; } + else if (str == "msg.owner") { + return LineId::MsgOwner; + } + else if (str == "argument.subcommand") { return LineId::ArgumentSubcommand; } else if (str == "argument.message") { @@ -56,6 +60,20 @@ namespace bot { return LineId::NotifyUnsub; } + else if (str == "join.response") { + return LineId::JoinResponse; + } else if (str == "join.response_in_chat") { + return LineId::JoinResponseInChat; + } else if (str == "join.already_in") { + return LineId::JoinAlreadyIn; + } else if (str == "join.rejoined") { + return LineId::JoinRejoined; + } else if (str == "join.from_other_chat") { + return LineId::JoinFromOtherChat; + } else if (str == "join.not_allowed") { + return LineId::JoinNotAllowed; + } + else { return std::nullopt; } diff --git a/src/localization/line_id.hpp b/src/localization/line_id.hpp index 264be15..da9a4a2 100644 --- a/src/localization/line_id.hpp +++ b/src/localization/line_id.hpp @@ -6,6 +6,8 @@ namespace bot { namespace loc { enum LineId { + MsgOwner, + ArgumentSubcommand, ArgumentMessage, ArgumentInterval, @@ -30,7 +32,14 @@ namespace bot { EventOff, NotifySub, - NotifyUnsub + NotifyUnsub, + + JoinResponse, + JoinResponseInChat, + JoinAlreadyIn, + JoinRejoined, + JoinFromOtherChat, + JoinNotAllowed }; std::optional string_to_line_id(const std::string &str); -- cgit v1.2.3