Team Ai
Apppublic

azils3/bash

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
snips_db.py37 linesDownload Raw Back to dB
1# Ultroid - UserBot2# Copyright (C) 2021-2025 TeamUltroid3#4# This file is a part of < https://github.com/TeamUltroid/Ultroid/ >5# PLease read the GNU Affero General Public License in6# <https://github.com/TeamUltroid/pyUltroid/blob/main/LICENSE>.7 8from .. import udB9 10 11def get_all_snips():12    return udB.get_key("SNIP") or {}13 14 15def add_snip(word, msg, media, button):16    ok = get_all_snips()17    ok.update({word: {"msg": msg, "media": media, "button": button}})18    udB.set_key("SNIP", ok)19 20 21def rem_snip(word):22    ok = get_all_snips()23    if ok.get(word):24        ok.pop(word)25        udB.set_key("SNIP", ok)26 27 28def get_snips(word):29    ok = get_all_snips()30    if ok.get(word):31        return ok[word]32    return False33 34 35def list_snip():36    return "".join(f"👉 ${z}\n" for z in get_all_snips())37