(client, m: Message)
| 273 | |
| 274 | @Client.on_message(filters.command('api') & filters.private) |
| 275 | async def shortener_api_handler(client, m: Message): |
| 276 | user_id = m.from_user.id |
| 277 | user = await get_user(user_id) |
| 278 | cmd = m.command |
| 279 | |
| 280 | if len(cmd) == 1: |
| 281 | s = script.SHORTENER_API_MESSAGE.format(base_site=user["base_site"], shortener_api=user["shortener_api"]) |
| 282 | return await m.reply(s) |
| 283 | |
| 284 | elif len(cmd) == 2: |
| 285 | api = cmd[1].strip() |
| 286 | await update_user_info(user_id, {"shortener_api": api}) |
| 287 | await m.reply("<b>Shortener API updated successfully to</b> " + api) |
| 288 | |
| 289 | # Don't Remove Credit Tg - @VJ_Bots |
| 290 | # Subscribe YouTube Channel For Amazing Bot https://youtube.com/@Tech_VJ |
nothing calls this directly
no test coverage detected