-
-
Notifications
You must be signed in to change notification settings - Fork 183
/
translation.py
274 lines (184 loc) Β· 7.33 KB
/
translation.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton
BATCH_MESSAGE = BATCH = """
Need to shorten or convert links from all of your channel's posts? I've got you covered! Just make me an admin in your channel and use the following command:
<code>/batch [channel id or username]</code>
For example: <code>/batch -100xxx</code>
I'll handle the rest and get those links shortened or converted in a short time! πͺ
"""
START_MESSAGE = """Hi there {}
Send me a link or post and I'll shorten it for you!
To learn more about what I can do, just type /help.
Method: {}
Shortener website: {}
"""
HELP_MESSAGE = """Hey there! My name is {firstname} and I'm a link convertor and shortener bot here to make your work easier and help you earn more π°.
I have a ton of handy features to help you out, such as:
- [Hyperlink](https://t.me/{username}) support π
- Button conversion support π
- Domain inclusion and exclusion options π
- Header and footer text support π
- Replace username function π
- Banner image support πΌοΈ
- Batch conversion for channel admins only π
- Channel support for admins only π’
Useful commands:
- /start: Start me up! You probably already used this.
- /help: Send this message; I'll tell you more about myself!
- /batch -100xxx: To shorten or convert all posts in your channel
"""
ABOUT_TEXT = """
**My Details:**
`π€ Name:` ** {} **
`π Language:` [Python 3](https://www.python.org/)
`π§° Framework:` [Pyrogram](https://github.com/pyrogram/pyrogram)
`π¨βπ» Developer:` [Dev](t.me/ask_admin001)
`π’ Support:` [Talk Bot](https://t.me/ask_admin001)
`π Source Code:` [GitHub](https://github.com/kevinnadar22/URL-Shortener-V2/)
"""
METHOD_MESSAGE = """
Current Method: {method}
Methods Available:
> `mdlink` - Change all the links of the post to your MDisk account first and then short to {shortener} link.
> `shortener` - Short all the links of the post to {shortener} link directly.
> `mdisk` - Save all the links of the post to your Mdisk account.
To change method, choose it from the following options:
"""
CUSTOM_ALIAS_MESSAGE = """For custom alias, `[link] | [custom_alias]`, Send in this format
This feature works only in private mode only
Ex: https://t.me/example | Example"""
ADMINS_MESSAGE = """
List of Admins who has access to this Bot
{admin_list}
"""
CHANNELS_LIST_MESSAGE = """
Here is a list of the channels:
{channels}"""
HELP_REPLY_MARKUP = InlineKeyboardMarkup(
[
[
InlineKeyboardButton("Methods", callback_data="method_command"),
InlineKeyboardButton("Batch", callback_data="cbatch_command"),
],
[
InlineKeyboardButton("Custom Alias", callback_data="alias_conf"),
InlineKeyboardButton("Admins", callback_data="admins_list"),
],
[
InlineKeyboardButton("Channels", callback_data="channels_list"),
InlineKeyboardButton("Home", callback_data="start_command"),
],
]
)
ABOUT_REPLY_MARKUP = InlineKeyboardMarkup(
[
[
InlineKeyboardButton("Home", callback_data="start_command"),
InlineKeyboardButton("Help", callback_data="help_command"),
],
[InlineKeyboardButton("Close", callback_data="delete")],
]
)
START_MESSAGE_REPLY_MARKUP = InlineKeyboardMarkup(
[
[
InlineKeyboardButton("Help", callback_data="help_command"),
InlineKeyboardButton("About", callback_data="about_command"),
],
[
InlineKeyboardButton("Method", callback_data="method_command"),
InlineKeyboardButton("Close", callback_data="delete"),
],
]
)
METHOD_REPLY_MARKUP = InlineKeyboardMarkup(
[
[
InlineKeyboardButton(
"MDLINK", callback_data="change_method#mdlink"
),
InlineKeyboardButton(
"Shortener", callback_data="change_method#shortener"
),
InlineKeyboardButton("Mdisk", callback_data="change_method#mdisk"),
],
[
InlineKeyboardButton("Back", callback_data="help_command"),
InlineKeyboardButton("Close", callback_data="delete"),
],
]
)
BACK_REPLY_MARKUP = InlineKeyboardMarkup(
[[InlineKeyboardButton("Back", callback_data="help_command")]]
)
USER_ABOUT_MESSAGE = """
π§ Here are the current settings for this bot:
- π Shortener website: {base_site}
- π§° Method: {method}
- π {base_site} API: {shortener_api}
- πΎ Mdisk API: {mdisk_api}
- π Username: @{username}
- π Header text:
{header_text}
- π Footer text:
{footer_text}
πΌοΈ Banner image: {banner_image}
"""
MDISK_API_MESSAGE = """To add or update your Mdisk API, \n`/mdisk_api mdisk_api`
Ex: `/mdisk_api 6LZq851sXoPHugiKQq`
Others Mdisk Links will be automatically changed to the API of this Mdisk account
Get your Mdisk API from @VideoToolMoneyTreebot
Current Mdisk API: `{}`"""
SHORTENER_API_MESSAGE = """To add or update your Shortner Website API,
`/shortener_api [api]`
Ex: `/shortener_api 6LZq851sXofffPHugiKQq`
Current Website: {base_site}
To change your Shortener Website: /base_site
Current Shortener API: `{shortener_api}`"""
HEADER_MESSAGE = """π To set the header text for every message caption or text, just reply with the text you want to use. You can use \\n to add a line break.
π To remove the header text, use the following command:
`/header remove`
This is a helpful way to add a consistent header to all of your messages. Enjoy! π"""
FOOTER_MESSAGE = """π To set the footer text for every message caption or text, just reply with the text you want to use. You can use \\n to add a line break.
π To remove the footer text, use the following command:
`/footer remove`
This is a helpful way to add a consistent footer to all of your messages. Enjoy! π"""
USERNAME_TEXT = """Current username: {username}
To set the username that will be automatically replaced with other usernames in the post, use the following command:
`/username your_username`
__(Note: Do not include the @ symbol in your username.)__
To remove the current username, use the following command:
`/username remove`
This is a helpful way to make sure that all of your posts have a consistent username. Enjoy! π"""
BANNER_IMAGE = """
Usage: `/banner_image image_url` or reply to any Image with this command
This image will be automatically replaced with other images in the post
To remove custom image, `/banner_image remove`
Eg: `/banner_image https://www.nicepng.com/png/detail/436-4369539_movie-logo-film.png`"""
INCLUDE_DOMAIN_TEXT = """
Use this option if you want to short only links from the following domains list.
Current Include Domain:
{}
Usage: /include_domain domain
Ex: `/include_domain t.me, stack.com`
To remove a domain,
Ex: `/include_domain remove t.me`
To remove all domains,
Ex: `/include_domain remove_all`
"""
EXCLUDE_DOMAIN_TEXT = """
Use this option if you wish to short every link on your channel but exclude only the links from the following domains list
Current Exclude Domains:
{}
Usage: /exclude_domain domain
Ex: `/exclude_domain t.me, google.com`
To remove a domain,
Ex: `/exclude_domain remove t.me`
To remove all domains,
Ex: `/exclude_domain remove_all`
"""
BANNED_USER_TXT = """
Usage: `/ban [User ID]`
Usage: `/unban [User ID]`
List of users that are banned:
{users}
"""