Home¶
class OpenTeleException¶
class OpenTeleException(BaseException)
Base exception of the library.
class TFileNotFound¶
class TFileNotFound(OpenTeleException)
Could not find or open the file
class TDataInvalidMagic¶
class TDataInvalidMagic(OpenTeleException)
TData file has an invalid magic data, which is the first 4 bytes of the filen
This usually mean that the file is corrupted or not in the supported formats
class TDataInvalidCheckSum¶
class TDataInvalidCheckSum(OpenTeleException)
TData file has an invalid checksumn
This usually mean that the file is corrupted or not in the supported formats
class TDataBadDecryptKey¶
class TDataBadDecryptKey(OpenTeleException)
Could not decrypt the data with this keyn
This usually mean that the file is password-encrypted
class TDataWrongPasscode¶
class TDataWrongPasscode(OpenTeleException)
Wrong passcode to decrypt tdata foldern
class TDataBadEncryptedDataSize¶
class TDataBadEncryptedDataSize(OpenTeleException)
The encrypted data size part of the file is corrupted
class TDataBadDecryptedDataSize¶
class TDataBadDecryptedDataSize(OpenTeleException)
The decrypted data size part of the file is corrupted
class TDataBadConfigData¶
class TDataBadConfigData(OpenTeleException)
TData contains bad config data that couldn't be parsed
class QDataStreamFailed¶
class QDataStreamFailed(OpenTeleException)
Could not stream data from QDataStreamn
Please check the QDataStream.status() for more information
class AccountAuthKeyNotFound¶
class AccountAuthKeyNotFound(OpenTeleException)
Account.authKey is missing, something went wrong
class TDataReadMapDataFailed¶
class TDataReadMapDataFailed(OpenTeleException)
Could not read map data
class TDataReadMapDataIncorrectPasscode¶
class TDataReadMapDataIncorrectPasscode(OpenTeleException)
Could not read map data because of incorrect passcode
class TDataAuthKeyNotFound¶
class TDataAuthKeyNotFound(OpenTeleException)
Could not find authKey in TData
class MaxAccountLimit¶
class MaxAccountLimit(OpenTeleException)
Maxed out limit for accounts per tdesktop client
class TDesktopUnauthorized¶
class TDesktopUnauthorized(OpenTeleException)
TDesktop client is unauthorized
class TelethonUnauthorized¶
class TelethonUnauthorized(OpenTeleException)
Telethon client is unauthorized
class TDataSaveFailed¶
class TDataSaveFailed(OpenTeleException)
Could not save TDesktop to tdata folder
class TDesktopNotLoaded¶
class TDesktopNotLoaded(OpenTeleException)
TDesktop instance has no account
class TDesktopHasNoAccount¶
class TDesktopHasNoAccount(OpenTeleException)
TDesktop instance has no account
class TDAccountNotLoaded¶
class TDAccountNotLoaded(OpenTeleException)
TDesktop account hasn't been loaded yet
class NoPasswordProvided¶
class NoPasswordProvided(OpenTeleException)
You can't live without a password bro
class PasswordIncorrect¶
class PasswordIncorrect(OpenTeleException)
incorrect passwrd
class LoginFlagInvalid¶
class LoginFlagInvalid(OpenTeleException)
Invalid login flag
class NoInstanceMatched¶
class NoInstanceMatched(OpenTeleException)
Invalid login flag
Expects()¶
@typing.overload
def Expects(condition: bool, message: str = None, done: typing.Callable[[], None] = None, fail: typing.Callable[[OpenTeleException], None] = None, silent: bool = False, stack_index: int = 1) -> bool
Expect a condition to be True, raise an OpenTeleException if it's not.
Arguments:
Name | Type | Default | Description |
---|---|---|---|
condition | bool | Condition that you're expecting. | |
message | str | None | Custom exception message |
done | lambda | None | lambda to execute when done without error |
fail | lambda | None | lambda to execute when the condition is False, the lambda will be execute before raising the exception. |
silent | bool | False | if True then it won't raise the exception, only execute fail lambda. |
stack_index | int | 1 | stack index to raise the exception with trace back to where it happens, intended for internal usage. |
Raises:
OpenTeleException : exception
Expects()¶
@typing.overload
def Expects(condition: bool, exception: OpenTeleException = None, done: typing.Callable[[], None] = None, fail: typing.Callable[[OpenTeleException], None] = None, silent: bool = False, stack_index: int = 1) -> bool
Expect a condition to be True, raise an OpenTeleException if it's not.
Arguments:
Name | Type | Default | Description |
---|---|---|---|
condition | bool | Condition that you're expecting. | |
message | OpenTeleException | None | Custom exception. |
done | lambda | None | lambda to execute when done without error. |
fail | lambda | None | lambda to execute when the condition is False, the lambda will be execute before raising the exception. |
silent | bool | False | if True then it won't raise the exception, only execute fail lambda. |
stack_index | int | 1 | stack index to raise the exception with trace back to where it happens, intended for internal usage. |
Raises:
OpenTeleException : exception