13 sendAudio::sendAudio(
Chat C,
string audio) :
15 chat_id(to_string(C.getId())), audio(move(audio))
22 chat_id(to_string(chat_id)) , audio(move(audio))
29 chat_id(move(chat_id)) , audio(move(audio))
41 Outgoing[
"chat_id"] = getChat_id();
42 Outgoing[
"audio"] = getAudio();
45 Outgoing[
"caption"] = getCaption().value();
48 Outgoing[
"duration"] = getDuration().value();
51 Outgoing[
"performer"] = getPerformer().value();
54 Outgoing[
"title"] = getTitle().value();
56 if(getDisable_notification()){
57 Outgoing[
"disable_notification"] = getDisable_notification().value();
59 if(getReply_to_message_id()){
60 Outgoing[
"reply_to_message_id"] = getReply_to_message_id().value();
68 curl_formadd(start,end,
69 CURLFORM_COPYNAME,
"chat_id",
70 CURLFORM_COPYCONTENTS,chat_id.c_str(),
72 curl_formadd(start,end,
73 CURLFORM_COPYNAME,
"audio",
74 CURLFORM_FILE,audio.c_str(),
77 curl_formadd(start,end,
78 CURLFORM_COPYNAME,
"caption",
79 CURLFORM_COPYCONTENTS,caption.value().c_str(),
167 return disable_notification;
171 return reply_to_message_id;
const std::optional< std::string > & getCaption() const
void setCaption(const std::optional< std::string > &caption)
const std::optional< std::string > & getPerformer() const
sendAudio(std::int64_t chat_id, std::string audio)
void setDisable_notification(const std::optional< bool > &disable_notification)
const std::string & getChat_id() const
const std::string & getAudio() const
void setTitle(const std::optional< std::string > &title)
void setReply_to_message_id(const std::optional< int > &reply_to_message_id)
void setReplyMarkup(const ReplyKeyboardMarkup RKM)
const std::optional< std::string > & getTitle() const
const std::optional< ReplyMarkup > & getReply_markup() const
std::optional< bool > disable_notification
std::optional< ReplyMarkup > reply_markup
const std::optional< std::string > & getDuration() const
const std::optional< std::int32_t > & getReply_to_message_id() const
void add_to_post(struct curl_httppost **start, struct curl_httppost **end)
std::optional< std::int32_t > reply_to_message_id
std::optional< std::string > duration
void setDuration(const std::optional< std::string > &duration)
const std::optional< bool > & getDisable_notification() const
std::optional< std::string > title
std::optional< std::string > caption
void setPerformer(const std::optional< std::string > &performer)
std::optional< std::string > performer