MCPcopy Create free account
hub / github.com/VJBots/VJ-File-Store / shortener_api_handler

Function shortener_api_handler

plugins/commands.py:275–287  ·  view source on GitHub ↗
(client, m: Message)

Source from the content-addressed store, hash-verified

273
274@Client.on_message(filters.command('api') & filters.private)
275async 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

Callers

nothing calls this directly

Calls 2

get_userFunction · 0.90
update_user_infoFunction · 0.90

Tested by

no test coverage detected