telega/reply

Values

pub fn answer_callback_query(
  ctx ctx: Context(a, b),
  parameters parameters: AnswerCallbackQueryParameters,
) -> Result(Bool, TelegaError)

Use this method to send answers to callback queries sent from inline keyboards. The answer will be displayed to the user as a notification at the top of the chat screen or as an alert. On success, True is returned.

Official reference: https://core.telegram.org/bots/api#answercallbackquery

pub fn edit_text(
  ctx ctx: Context(a, b),
  parameters parameters: EditMessageTextParameters,
) -> Result(Message, TelegaError)

Use this method to edit text and game messages. On success, if the edited message is not an inline message, the edited Message is returned, otherwise True is returned.

Official reference: https://core.telegram.org/bots/api#editmessagetext

pub fn forward(
  ctx ctx: Context(a, b),
  parameters parameters: ForwardMessageParameters,
) -> Result(Message, TelegaError)

Use this method to forward messages of any kind. Service messages and messages with protected content can’t be forwarded. On success, the sent Message is returned.

Official reference: https://core.telegram.org/bots/api#forwardmessage

pub fn with_dice(
  ctx ctx: Context(a, b),
  parameters parameters: Option(SendDiceParameters),
) -> Result(Message, TelegaError)

Use this method to send an animated emoji that will display a random value.

Official reference: https://core.telegram.org/bots/api#senddice

pub fn with_file_link(
  ctx ctx: Context(a, b),
  file_id file_id: String,
) -> Result(String, TelegaError)

Get download link for the file.

pub fn with_invoice(
  ctx ctx: Context(a, b),
  title title: String,
  description description: String,
  payload payload: String,
  currency currency: String,
  prices prices: List(#(String, Int)),
) -> Result(Message, TelegaError)

Use this method to send an invoice.

Official reference: https://core.telegram.org/bots/api#sendinvoice

pub fn with_markup(
  ctx ctx: Context(a, b),
  text text: String,
  markup reply_markup: SendMessageReplyMarkupParameters,
) -> Result(Message, TelegaError)

Use this method to send text messages with keyboard markup.

Official reference: https://core.telegram.org/bots/api#sendmessage

pub fn with_poll(
  ctx ctx: Context(a, b),
  question question: String,
  options options: List(String),
) -> Result(Message, TelegaError)

Use this method to send a native poll.

Official reference: https://core.telegram.org/bots/api#sendpoll

pub fn with_sticker(
  ctx ctx: Context(a, b),
  sticker sticker: FileOrString,
) -> Result(Message, TelegaError)

Use this method to send a sticker.

Official reference: https://core.telegram.org/bots/api#sendsticker

pub fn with_text(
  ctx ctx: Context(a, b),
  text text: String,
) -> Result(Message, TelegaError)

Use this method to send text messages.

Official reference: https://core.telegram.org/bots/api#sendmessage

Search Document