rapierorg / telegram-bot-swift

Telegram Bot SDK for Swift (unofficial)
https://github.com/rapierorg/telegram-bot-swift/wiki
Apache License 2.0
375 stars 63 forks source link

Arguments.scanRestOfString() does not work at all on Linux #115

Closed cleanbit closed 2 years ago

cleanbit commented 3 years ago

Ubuntu 20.04.1 LTS Swift 5.3.2-RELEASE-ubuntu20.04 SDK Version: Latest

Arguments.scanRestOfString() will always return empty string on Linux due to the differences in SDK usage. scanOfTheRestOfString() will call Scanner.scanUpToString() on Linux with the parameter "" (empty string), however see this line, where empty string as a parameter will always return nil.

Calling context.args.scanner.scanUpToCharacters(from: .newLines) instead, fixes this issue.

nerzh commented 3 years ago

it seems they don't support it, maybe you try my package for Vapor https://github.com/nerzh/telegram-vapor-bot

zmeyc commented 2 years ago

@cleanbit Thank you for reporting the issue! This should now be fixed by https://github.com/rapierorg/telegram-bot-swift/pull/122