tlgr-cli 2.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tlgr/__init__.py +3 -0
- tlgr/__main__.py +6 -0
- tlgr/actions/__init__.py +45 -0
- tlgr/actions/forward.py +74 -0
- tlgr/actions/reply.py +32 -0
- tlgr/cli/__init__.py +259 -0
- tlgr/cli/confirm.py +55 -0
- tlgr/cli/errors.py +84 -0
- tlgr/cli/gen.py +690 -0
- tlgr/cli/globals.py +273 -0
- tlgr/cli/introspect.py +170 -0
- tlgr/cli/params.py +189 -0
- tlgr/cli/render.py +418 -0
- tlgr/core/__init__.py +0 -0
- tlgr/core/accounts.py +384 -0
- tlgr/core/config.py +358 -0
- tlgr/core/custom_tl.py +170 -0
- tlgr/core/errors.py +687 -0
- tlgr/core/eventtypes.py +1170 -0
- tlgr/core/identity.py +127 -0
- tlgr/core/launchd.py +122 -0
- tlgr/core/logging.py +194 -0
- tlgr/core/media.py +134 -0
- tlgr/core/output.py +251 -0
- tlgr/core/pagination.py +227 -0
- tlgr/core/paths.py +360 -0
- tlgr/core/peers.py +427 -0
- tlgr/core/process.py +138 -0
- tlgr/core/signing.py +38 -0
- tlgr/core/systemd.py +96 -0
- tlgr/core/telethon_compat.py +295 -0
- tlgr/core/text.py +211 -0
- tlgr/core/timefmt.py +199 -0
- tlgr/core/tl.py +98 -0
- tlgr/daemon/__init__.py +0 -0
- tlgr/daemon/app.py +869 -0
- tlgr/daemon/dispatch.py +446 -0
- tlgr/daemon/events.py +723 -0
- tlgr/daemon/files.py +431 -0
- tlgr/daemon/idle.py +119 -0
- tlgr/daemon/jobs.py +68 -0
- tlgr/daemon/main.py +161 -0
- tlgr/daemon/peercred.py +75 -0
- tlgr/daemon/policy.py +113 -0
- tlgr/daemon/preauth.py +366 -0
- tlgr/daemon/ratelimit.py +391 -0
- tlgr/daemon/server.py +24 -0
- tlgr/daemon/session.py +648 -0
- tlgr/daemon/sessions.py +274 -0
- tlgr/daemon/singleton.py +114 -0
- tlgr/daemon/stream.py +193 -0
- tlgr/daemon/transfers.py +219 -0
- tlgr/daemon/webhook.py +390 -0
- tlgr/data/catalog_index.json +1 -0
- tlgr/data/parity_waivers.toml +90 -0
- tlgr/filters/__init__.py +42 -0
- tlgr/filters/compose.py +121 -0
- tlgr/filters/content.py +85 -0
- tlgr/filters/context.py +114 -0
- tlgr/filters/message.py +161 -0
- tlgr/filters/temporal.py +87 -0
- tlgr/filters/user.py +36 -0
- tlgr/gateway/__init__.py +1 -0
- tlgr/gateway/config.py +161 -0
- tlgr/gateway/engine.py +215 -0
- tlgr/gateway/event.py +22 -0
- tlgr/jobs/__init__.py +0 -0
- tlgr/jobs/base.py +81 -0
- tlgr/jobs/client.py +37 -0
- tlgr/models/__init__.py +1220 -0
- tlgr/models/admin.py +744 -0
- tlgr/models/auth.py +510 -0
- tlgr/models/base.py +81 -0
- tlgr/models/bot.py +576 -0
- tlgr/models/business.py +265 -0
- tlgr/models/call.py +586 -0
- tlgr/models/config.py +101 -0
- tlgr/models/contact.py +481 -0
- tlgr/models/daemon.py +336 -0
- tlgr/models/dialog.py +626 -0
- tlgr/models/envelope.py +68 -0
- tlgr/models/error.py +30 -0
- tlgr/models/event.py +79 -0
- tlgr/models/export.py +66 -0
- tlgr/models/gift.py +275 -0
- tlgr/models/inline.py +84 -0
- tlgr/models/location.py +115 -0
- tlgr/models/media.py +507 -0
- tlgr/models/message.py +584 -0
- tlgr/models/net.py +232 -0
- tlgr/models/notify.py +105 -0
- tlgr/models/page.py +32 -0
- tlgr/models/payment.py +172 -0
- tlgr/models/peer.py +400 -0
- tlgr/models/poll.py +119 -0
- tlgr/models/premium.py +161 -0
- tlgr/models/privacy.py +93 -0
- tlgr/models/profile.py +217 -0
- tlgr/models/reaction.py +160 -0
- tlgr/models/resolve.py +175 -0
- tlgr/models/settings.py +103 -0
- tlgr/models/stars.py +101 -0
- tlgr/models/sticker.py +243 -0
- tlgr/models/story.py +467 -0
- tlgr/models/sync.py +105 -0
- tlgr/models/todo.py +36 -0
- tlgr/models/webapp.py +89 -0
- tlgr/ops/__init__.py +63 -0
- tlgr/ops/_admin.py +313 -0
- tlgr/ops/_auth.py +599 -0
- tlgr/ops/_bots.py +586 -0
- tlgr/ops/_calls.py +535 -0
- tlgr/ops/_common.py +160 -0
- tlgr/ops/_layer.py +46 -0
- tlgr/ops/_media.py +592 -0
- tlgr/ops/_params.py +212 -0
- tlgr/ops/_rights.py +402 -0
- tlgr/ops/_send.py +593 -0
- tlgr/ops/_serialize.py +667 -0
- tlgr/ops/_settings.py +306 -0
- tlgr/ops/_spec.py +167 -0
- tlgr/ops/_story.py +743 -0
- tlgr/ops/account.py +2604 -0
- tlgr/ops/agent.py +937 -0
- tlgr/ops/auth.py +1282 -0
- tlgr/ops/bot.py +4880 -0
- tlgr/ops/business.py +1520 -0
- tlgr/ops/call.py +1610 -0
- tlgr/ops/chat.py +4025 -0
- tlgr/ops/chat_admin.py +929 -0
- tlgr/ops/chat_extra.py +1061 -0
- tlgr/ops/chat_invite.py +716 -0
- tlgr/ops/chat_manage.py +1691 -0
- tlgr/ops/chat_member.py +1357 -0
- tlgr/ops/chat_stats.py +902 -0
- tlgr/ops/chat_topic.py +905 -0
- tlgr/ops/conference.py +791 -0
- tlgr/ops/config.py +1698 -0
- tlgr/ops/contact.py +2330 -0
- tlgr/ops/daemon.py +1397 -0
- tlgr/ops/draft.py +299 -0
- tlgr/ops/emoji.py +343 -0
- tlgr/ops/events.py +1327 -0
- tlgr/ops/export.py +596 -0
- tlgr/ops/folder.py +1322 -0
- tlgr/ops/gif.py +522 -0
- tlgr/ops/gift.py +1546 -0
- tlgr/ops/giveaway.py +541 -0
- tlgr/ops/inline.py +773 -0
- tlgr/ops/job.py +799 -0
- tlgr/ops/location.py +917 -0
- tlgr/ops/media.py +4495 -0
- tlgr/ops/message.py +3769 -0
- tlgr/ops/net.py +536 -0
- tlgr/ops/notify.py +840 -0
- tlgr/ops/passport.py +464 -0
- tlgr/ops/payment.py +907 -0
- tlgr/ops/poll.py +1078 -0
- tlgr/ops/premium.py +488 -0
- tlgr/ops/privacy.py +794 -0
- tlgr/ops/profile.py +1481 -0
- tlgr/ops/proxy.py +750 -0
- tlgr/ops/reaction.py +1475 -0
- tlgr/ops/resolve.py +1140 -0
- tlgr/ops/search.py +521 -0
- tlgr/ops/settings.py +1066 -0
- tlgr/ops/stars.py +594 -0
- tlgr/ops/sticker.py +1602 -0
- tlgr/ops/story.py +3216 -0
- tlgr/ops/sync.py +788 -0
- tlgr/ops/todo.py +514 -0
- tlgr/ops/user.py +1406 -0
- tlgr/ops/vc.py +2351 -0
- tlgr/ops/webapp.py +717 -0
- tlgr/ops/webhook.py +418 -0
- tlgr/parity.py +386 -0
- tlgr/processors/__init__.py +125 -0
- tlgr/processors/regex.py +26 -0
- tlgr/processors/text.py +56 -0
- tlgr/registry.py +519 -0
- tlgr/schema.py +173 -0
- tlgr/transport/__init__.py +30 -0
- tlgr/transport/autostart.py +293 -0
- tlgr/transport/client.py +805 -0
- tlgr/transport/ndjson.py +44 -0
- tlgr/version.py +31 -0
- tlgr_cli-2.0.1.dist-info/METADATA +957 -0
- tlgr_cli-2.0.1.dist-info/RECORD +192 -0
- tlgr_cli-2.0.1.dist-info/WHEEL +5 -0
- tlgr_cli-2.0.1.dist-info/entry_points.txt +2 -0
- tlgr_cli-2.0.1.dist-info/licenses/LICENSE +21 -0
- tlgr_cli-2.0.1.dist-info/top_level.txt +1 -0
tlgr/models/settings.py
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"""Cloud-synced account settings, languages and cloud themes.
|
|
2
|
+
|
|
3
|
+
`settings get`/`settings set` are one generic pair over a dozen unrelated
|
|
4
|
+
RPCs, so the model is a *key and a value* rather than a struct per toggle.
|
|
5
|
+
That is not laziness: every key prints the exact token vocabulary its setter
|
|
6
|
+
accepts, which makes `tlgr settings get X | tlgr settings set X -` a real
|
|
7
|
+
round trip and keeps twelve near-identical commands out of the surface.
|
|
8
|
+
|
|
9
|
+
`previous` is always reported on a write. A setting that was already in the
|
|
10
|
+
wanted state answers `already: true` with `previous == value`, which is the
|
|
11
|
+
only way a script can tell "I changed it" from "it was like that".
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from __future__ import annotations
|
|
15
|
+
|
|
16
|
+
from typing import Any
|
|
17
|
+
|
|
18
|
+
from tlgr.models.base import Model
|
|
19
|
+
|
|
20
|
+
__all__ = [
|
|
21
|
+
"CloudTheme",
|
|
22
|
+
"Language",
|
|
23
|
+
"SettingChange",
|
|
24
|
+
"SettingUnset",
|
|
25
|
+
"SettingValue",
|
|
26
|
+
"ThemeInstalled",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class SettingValue(Model):
|
|
31
|
+
"""One cloud setting, read.
|
|
32
|
+
|
|
33
|
+
`changeable` is false when the server will refuse the write for a reason
|
|
34
|
+
that is not an error — Premium-only keys, and the sensitive-content
|
|
35
|
+
toggle in regions that require an age check first.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
key: str
|
|
39
|
+
value: Any = None
|
|
40
|
+
changeable: bool = True
|
|
41
|
+
#: server | app-config | derived — where the value came from.
|
|
42
|
+
source: str = "server"
|
|
43
|
+
accepts: str = ""
|
|
44
|
+
reason: str | None = None
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class SettingChange(Model):
|
|
48
|
+
key: str
|
|
49
|
+
value: Any = None
|
|
50
|
+
previous: Any = None
|
|
51
|
+
already: bool = False
|
|
52
|
+
#: `auto-delete --apply-to-existing`: how many chats were rewritten.
|
|
53
|
+
applied_to: int | None = None
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class SettingUnset(Model):
|
|
57
|
+
key: str
|
|
58
|
+
removed: int
|
|
59
|
+
values: list[str] = []
|
|
60
|
+
already: bool = False
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class Language(Model):
|
|
64
|
+
lang_code: str
|
|
65
|
+
name: str = ""
|
|
66
|
+
native_name: str = ""
|
|
67
|
+
official: bool = False
|
|
68
|
+
beta: bool = False
|
|
69
|
+
rtl: bool = False
|
|
70
|
+
strings_count: int = 0
|
|
71
|
+
translated_count: int = 0
|
|
72
|
+
translations_url: str | None = None
|
|
73
|
+
plural_code: str | None = None
|
|
74
|
+
base_lang_code: str | None = None
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class CloudTheme(Model):
|
|
78
|
+
"""A cloud theme's metadata. tlgr has no theming engine and renders none."""
|
|
79
|
+
|
|
80
|
+
id: int = 0
|
|
81
|
+
access_hash: int | None = None
|
|
82
|
+
slug: str = ""
|
|
83
|
+
title: str = ""
|
|
84
|
+
creator: bool = False
|
|
85
|
+
default: bool = False
|
|
86
|
+
for_chat: bool = False
|
|
87
|
+
installs_count: int | None = None
|
|
88
|
+
document_id: int | None = None
|
|
89
|
+
emoticon: str | None = None
|
|
90
|
+
settings: list[dict[str, Any]] = []
|
|
91
|
+
link: str | None = None
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class ThemeInstalled(Model):
|
|
95
|
+
slug: str | None = None
|
|
96
|
+
id: int | None = None
|
|
97
|
+
title: str | None = None
|
|
98
|
+
installed: bool = False
|
|
99
|
+
saved: bool = False
|
|
100
|
+
removed: bool = False
|
|
101
|
+
dark: bool = False
|
|
102
|
+
document_id: int | None = None
|
|
103
|
+
already: bool = False
|
tlgr/models/stars.py
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"""Telegram Stars: the balance, the ledger, subscriptions and revenue.
|
|
2
|
+
|
|
3
|
+
A Stars amount is `(amount, nanos)` on the wire, and both halves are kept:
|
|
4
|
+
collapsing them to a float loses the ninth digit that a ledger reconciliation
|
|
5
|
+
depends on, and TON amounts arrive in the same shape with nine decimals of
|
|
6
|
+
their own.
|
|
7
|
+
|
|
8
|
+
Nothing here moves value. The withdrawal command produces a Fragment URL for
|
|
9
|
+
a human to open, which is why `StarsUrl` is a URL and not a receipt.
|
|
10
|
+
"""
|
|
11
|
+
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
from typing import Any
|
|
15
|
+
|
|
16
|
+
from tlgr.models.base import Model
|
|
17
|
+
from tlgr.models.peer import Peer
|
|
18
|
+
|
|
19
|
+
__all__ = [
|
|
20
|
+
"StarsBalance",
|
|
21
|
+
"StarsRating",
|
|
22
|
+
"StarsRefulfill",
|
|
23
|
+
"StarsRevenue",
|
|
24
|
+
"StarsTransaction",
|
|
25
|
+
"StarsUrl",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class StarsBalance(Model):
|
|
30
|
+
"""`payments.getStarsStatus`. `ton` is in nanotons, never rounded."""
|
|
31
|
+
|
|
32
|
+
stars: int = 0
|
|
33
|
+
nanos: int = 0
|
|
34
|
+
ton: int | None = None
|
|
35
|
+
currency: str = "XTR"
|
|
36
|
+
subscriptions_missing_balance: int | None = None
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class StarsTransaction(Model):
|
|
40
|
+
id: str = ""
|
|
41
|
+
date: str | None = None
|
|
42
|
+
date_unix: int | None = None
|
|
43
|
+
#: Signed: negative is money leaving the balance.
|
|
44
|
+
stars: int = 0
|
|
45
|
+
nanos: int = 0
|
|
46
|
+
refund: bool = False
|
|
47
|
+
pending: bool = False
|
|
48
|
+
failed: bool = False
|
|
49
|
+
peer: int | None = None
|
|
50
|
+
peer_kind: str = ""
|
|
51
|
+
peer_ref: Peer | None = None
|
|
52
|
+
title: str | None = None
|
|
53
|
+
description: str | None = None
|
|
54
|
+
msg_id: int | None = None
|
|
55
|
+
subscription_period: int | None = None
|
|
56
|
+
transaction_url: str | None = None
|
|
57
|
+
#: gift | reaction | subscription | resale | upgrade | ads | …
|
|
58
|
+
kind: str = ""
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class StarsRating(Model):
|
|
62
|
+
level: int = 0
|
|
63
|
+
stars: int = 0
|
|
64
|
+
current_level_stars: int = 0
|
|
65
|
+
next_level_stars: int | None = None
|
|
66
|
+
pending_stars: int | None = None
|
|
67
|
+
pending_date: str | None = None
|
|
68
|
+
learnmore_url: str | None = None
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class StarsRevenue(Model):
|
|
72
|
+
chat_id: int = 0
|
|
73
|
+
current_balance: int | None = None
|
|
74
|
+
available_balance: int | None = None
|
|
75
|
+
overall_revenue: int | None = None
|
|
76
|
+
withdrawal_enabled: bool = False
|
|
77
|
+
next_withdrawal_at: str | None = None
|
|
78
|
+
usd_rate: float | None = None
|
|
79
|
+
revenue_graph: dict[str, Any] | None = None
|
|
80
|
+
top_hours_graph: dict[str, Any] | None = None
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
class StarsUrl(Model):
|
|
84
|
+
"""A Fragment URL. Opening it — and the transfer — is the human's job."""
|
|
85
|
+
|
|
86
|
+
#: withdrawal | ads
|
|
87
|
+
kind: str
|
|
88
|
+
url: str = ""
|
|
89
|
+
chat_id: int = 0
|
|
90
|
+
amount: int | None = None
|
|
91
|
+
ton: bool = False
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class StarsRefulfill(Model):
|
|
95
|
+
"""Re-joining a lapsed Star subscription, reported and not performed."""
|
|
96
|
+
|
|
97
|
+
id: str
|
|
98
|
+
ok: bool
|
|
99
|
+
can_refulfill: bool | None = None
|
|
100
|
+
stars: int | None = None
|
|
101
|
+
reason: str = ""
|
tlgr/models/sticker.py
ADDED
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
"""Stickers, GIFs and custom emoji.
|
|
2
|
+
|
|
3
|
+
Three surfaces that look like three products in the GUI and are one thing on
|
|
4
|
+
the wire: a `Document` carrying `DocumentAttributeSticker` or
|
|
5
|
+
`DocumentAttributeCustomEmoji`, grouped into sets. Modelling them once is why
|
|
6
|
+
`sticker set list --type emoji` and `emoji set list` can be the same
|
|
7
|
+
operation, and why a saved GIF and a sticker share the file handle.
|
|
8
|
+
|
|
9
|
+
The split that *is* real is `set` versus `pack`: a **set** is somebody's
|
|
10
|
+
collection you install, archive or reorder; a **pack** is one you created and
|
|
11
|
+
can edit. Every model here keeps that boundary, because the API does: the
|
|
12
|
+
`stickers.*` namespace answers only to a set's creator.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
from tlgr.models.base import Model
|
|
18
|
+
from tlgr.models.media import MediaFile
|
|
19
|
+
|
|
20
|
+
__all__ = [
|
|
21
|
+
"EmojiGroup",
|
|
22
|
+
"EmojiKeyword",
|
|
23
|
+
"FaveResult",
|
|
24
|
+
"GifResult",
|
|
25
|
+
"GifSaved",
|
|
26
|
+
"GifSent",
|
|
27
|
+
"PackCreated",
|
|
28
|
+
"PackDeleted",
|
|
29
|
+
"PackEdited",
|
|
30
|
+
"PackStickerAdded",
|
|
31
|
+
"PackStickerRemoved",
|
|
32
|
+
"RecentResult",
|
|
33
|
+
"SavedGif",
|
|
34
|
+
"Sticker",
|
|
35
|
+
"StickerSet",
|
|
36
|
+
"StickerSetOrder",
|
|
37
|
+
"StickerSetsChanged",
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class Sticker(Model):
|
|
42
|
+
"""One sticker or custom-emoji document.
|
|
43
|
+
|
|
44
|
+
`emoji` is `DocumentAttributeSticker.alt` — the plain emoji the sticker
|
|
45
|
+
stands for — and `index` is its position in the set, which is what
|
|
46
|
+
`message send --sticker <set>/<n>` consumes.
|
|
47
|
+
"""
|
|
48
|
+
|
|
49
|
+
doc_id: int
|
|
50
|
+
access_hash: int | None = None
|
|
51
|
+
file_reference_b64: str | None = None
|
|
52
|
+
emoji: str | None = None
|
|
53
|
+
keywords: list[str] = []
|
|
54
|
+
index: int | None = None
|
|
55
|
+
set_id: int | None = None
|
|
56
|
+
set_short_name: str | None = None
|
|
57
|
+
set: str | None = None
|
|
58
|
+
mime: str | None = None
|
|
59
|
+
size: int | None = None
|
|
60
|
+
width: int | None = None
|
|
61
|
+
height: int | None = None
|
|
62
|
+
dc_id: int | None = None
|
|
63
|
+
premium: bool = False
|
|
64
|
+
mask: bool = False
|
|
65
|
+
#: Custom emoji only: `free` says a non-Premium account may send it, and
|
|
66
|
+
#: `text_color` that it renders in the message's text colour.
|
|
67
|
+
custom_emoji: bool = False
|
|
68
|
+
free: bool | None = None
|
|
69
|
+
text_color: bool | None = None
|
|
70
|
+
file_id: str | None = None
|
|
71
|
+
path: str | None = None
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class StickerSet(Model):
|
|
75
|
+
"""A sticker, mask or custom-emoji set.
|
|
76
|
+
|
|
77
|
+
`stickers`, `packs` and `keywords` are filled only by `sticker set get`;
|
|
78
|
+
a listing carries the metadata and, for a search result, the cover
|
|
79
|
+
stickers the server sent with it.
|
|
80
|
+
"""
|
|
81
|
+
|
|
82
|
+
id: int
|
|
83
|
+
access_hash: int | None = None
|
|
84
|
+
short_name: str = ""
|
|
85
|
+
title: str = ""
|
|
86
|
+
count: int = 0
|
|
87
|
+
type: str = "sticker"
|
|
88
|
+
installed: bool = False
|
|
89
|
+
archived: bool = False
|
|
90
|
+
official: bool = False
|
|
91
|
+
creator: bool = False
|
|
92
|
+
unread: bool = False
|
|
93
|
+
text_color: bool = False
|
|
94
|
+
installed_date: str | None = None
|
|
95
|
+
thumb: MediaFile | None = None
|
|
96
|
+
link: str | None = None
|
|
97
|
+
stickers: list[Sticker] = []
|
|
98
|
+
covers: list[Sticker] = []
|
|
99
|
+
#: emoji → the document ids in this set that carry it.
|
|
100
|
+
packs: dict[str, list[int]] = {}
|
|
101
|
+
#: document id → its search keywords.
|
|
102
|
+
keywords: dict[str, list[str]] = {}
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
class StickerSetsChanged(Model):
|
|
106
|
+
"""The result of installing, removing, archiving or unarchiving sets.
|
|
107
|
+
|
|
108
|
+
Counts rather than booleans because every one of these verbs is variadic,
|
|
109
|
+
and `already` because asking for a state the account is already in is a
|
|
110
|
+
no-op, not a failure.
|
|
111
|
+
"""
|
|
112
|
+
|
|
113
|
+
short_names: list[str] = []
|
|
114
|
+
installed: int = 0
|
|
115
|
+
removed: int = 0
|
|
116
|
+
archived: int = 0
|
|
117
|
+
unarchived: int = 0
|
|
118
|
+
already: bool = False
|
|
119
|
+
#: Sets the server archived to keep under the installed-sets limit.
|
|
120
|
+
archived_sets: list[str] = []
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
class StickerSetOrder(Model):
|
|
124
|
+
type: str = "sticker"
|
|
125
|
+
order: list[int] = []
|
|
126
|
+
ok: bool = True
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
class FaveResult(Model):
|
|
130
|
+
doc_ids: list[int] = []
|
|
131
|
+
faved: int = 0
|
|
132
|
+
unfaved: int = 0
|
|
133
|
+
already: bool = False
|
|
134
|
+
evicted: list[int] = []
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
class RecentResult(Model):
|
|
138
|
+
doc_ids: list[int] = []
|
|
139
|
+
removed: int = 0
|
|
140
|
+
cleared: bool = False
|
|
141
|
+
already: bool = False
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
class PackCreated(Model):
|
|
145
|
+
id: int = 0
|
|
146
|
+
short_name: str = ""
|
|
147
|
+
title: str = ""
|
|
148
|
+
type: str = "sticker"
|
|
149
|
+
count: int = 0
|
|
150
|
+
link: str | None = None
|
|
151
|
+
stickers: list[Sticker] = []
|
|
152
|
+
#: `--dry-run`: the short name the server would accept.
|
|
153
|
+
available: bool | None = None
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
class PackStickerAdded(Model):
|
|
157
|
+
short_name: str
|
|
158
|
+
doc_id: int = 0
|
|
159
|
+
position: int | None = None
|
|
160
|
+
count: int = 0
|
|
161
|
+
replaced: int | None = None
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
class PackStickerRemoved(Model):
|
|
165
|
+
short_name: str
|
|
166
|
+
removed: list[int] = []
|
|
167
|
+
count: int = 0
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
class PackEdited(Model):
|
|
171
|
+
short_name: str
|
|
172
|
+
title: str | None = None
|
|
173
|
+
thumb: MediaFile | None = None
|
|
174
|
+
sticker: int | None = None
|
|
175
|
+
changed: list[str] = []
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
class PackDeleted(Model):
|
|
179
|
+
short_name: str
|
|
180
|
+
deleted: bool = False
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
class SavedGif(Model):
|
|
184
|
+
doc_id: int
|
|
185
|
+
access_hash: int | None = None
|
|
186
|
+
file_reference_b64: str | None = None
|
|
187
|
+
index: int | None = None
|
|
188
|
+
mime: str | None = None
|
|
189
|
+
size: int | None = None
|
|
190
|
+
duration: int | None = None
|
|
191
|
+
width: int | None = None
|
|
192
|
+
height: int | None = None
|
|
193
|
+
file_id: str | None = None
|
|
194
|
+
path: str | None = None
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
class GifSaved(Model):
|
|
198
|
+
doc_ids: list[int] = []
|
|
199
|
+
saved: int = 0
|
|
200
|
+
removed: int = 0
|
|
201
|
+
already: bool = False
|
|
202
|
+
evicted: list[int] = []
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
class GifResult(Model):
|
|
206
|
+
"""One inline-bot result from the GIF search bot."""
|
|
207
|
+
|
|
208
|
+
result_id: str = ""
|
|
209
|
+
query_id: int = 0
|
|
210
|
+
type: str = "gif"
|
|
211
|
+
title: str | None = None
|
|
212
|
+
url: str | None = None
|
|
213
|
+
thumb: str | None = None
|
|
214
|
+
duration: int | None = None
|
|
215
|
+
width: int | None = None
|
|
216
|
+
height: int | None = None
|
|
217
|
+
doc_id: int | None = None
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
class GifSent(Model):
|
|
221
|
+
chat_id: int
|
|
222
|
+
msg_id: int = 0
|
|
223
|
+
doc_id: int | None = None
|
|
224
|
+
via_bot: str | None = None
|
|
225
|
+
saved: bool = False
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
class EmojiGroup(Model):
|
|
229
|
+
"""A category chip above the sticker / emoji / GIF search box."""
|
|
230
|
+
|
|
231
|
+
kind: str = "groups"
|
|
232
|
+
title: str = ""
|
|
233
|
+
icon_emoji_id: int | None = None
|
|
234
|
+
emoticons: list[str] = []
|
|
235
|
+
document_ids: list[int] = []
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
class EmojiKeyword(Model):
|
|
239
|
+
emoticon: str = ""
|
|
240
|
+
keyword: str = ""
|
|
241
|
+
lang: str = ""
|
|
242
|
+
doc_id: int | None = None
|
|
243
|
+
set_short_name: str | None = None
|