Files
redux-scraper/sorbet/rbi/shims/telegram-bot-ruby.rbi
Dylan Knutson b6e2e5e502 Update telegram bot task, user view, and type definitions
- Modified telegram bot task implementation
- Updated domain users index view
- Updated telegram-bot-ruby type shims
2025-08-15 05:59:11 +00:00

61 lines
1.4 KiB
Ruby

# typed: strict
# Shim for telegram-bot-ruby to provide proper typing for Client.run method
module Telegram
module Bot
class Client
sig do
params(
args: T.untyped,
blk: T.proc.params(bot: Telegram::Bot::Client).void,
).void
end
def self.run(*args, &blk)
end
# Override the api method to properly type the return value
sig { returns(Telegram::Bot::Api) }
def api
end
end
class Api
# Define commonly used API methods
sig do
params(
chat_id: T.untyped,
text: String,
parse_mode: T.nilable(String),
reply_to_message_id: T.untyped,
).returns(Telegram::Bot::Types::Message)
end
def send_message(
chat_id:,
text:,
parse_mode: nil,
reply_to_message_id: nil
)
end
sig do
params(
chat_id: T.untyped,
message_id: T.untyped,
text: String,
parse_mode: T.nilable(String),
).returns(Telegram::Bot::Types::Message)
end
def edit_message_text(chat_id:, message_id:, text:, parse_mode: nil)
end
sig { params(file_id: String).returns(Telegram::Bot::Types::File) }
def get_file(file_id:)
end
sig { returns(Telegram::Bot::Types::User) }
def get_me
end
end
end
end