yatbcpp  0.0.1
Yet another Telegram Bot CPP Library
forwardMessage.cc
Go to the documentation of this file.
1 #include <string>
2 #include <jsoncpp/json/json.h>
5 
6 using namespace std;
7 using namespace yatbcpp;
8 
10 // Constructor Section //
12 
13 forwardMessage::forwardMessage(Chat chat_id, Message from) :
14  telegram_methodJSON("forwardMessage"),
15  chat_id(to_string(chat_id.getId())), from_chat_id(to_string(from.getChat().getId())), message_id(from.getMessage_id())
16 {
17 
18 }
19 
21  telegram_methodJSON("forwardMessage"),
23 {
24 
25 }
26 
28  telegram_methodJSON("forwardMessage"),
30 {
31 
32 }
33 
35 // Outgoing Section //
37 
38 Json::Value forwardMessage::toJson(){
39  Json::Value Outgoing;
40  Outgoing["chat_id"] = getChat_id();
41  Outgoing["from_chat_id"] = getFrom_chat_id();
42  Outgoing["message_id"] = getMessage_id();
44  Outgoing["disable_notification"] = getDisable_notification().value();
45  }
46  return Outgoing;
47 }
48 
50 // Setter Section //
52 
55 }
56 
58 // Getter Section //
60 
61 const string &forwardMessage::getChat_id() const {
62  return chat_id;
63 }
64 
65 const string &forwardMessage::getFrom_chat_id() const {
66  return from_chat_id;
67 }
68 
69 const optional<bool> &forwardMessage::getDisable_notification() const {
70  return disable_notification;
71 }
72 
74  return message_id;
75 }
void setDisable_notification(const std::optional< bool > &disable_notification)
std::optional< bool > disable_notification
const std::string & getChat_id() const
Definition: Bot.h:27
const std::string & getFrom_chat_id() const
telegram_methodJSON(std::string functionname)
const std::optional< bool > & getDisable_notification() const
forwardMessage(std::string chat_id, std::string from_chat_id, std::int32_t message_id)
std::int32_t getMessage_id() const