Exemplo n.º 1
0
def set_user(bot: Bot, update: Update, args):
    msg = update.effective_message
    if args:
        user = update.effective_user.id
        username = "******".join(args)
        sql.set_user(user, username)
        msg.reply_text(f"Username set as {username}!")
    else:
        msg.reply_text("That's not how this works...\nRun /setuser followed by your username!")
Exemplo n.º 2
0
def set_user(bot: Bot, update: Update, args):
    msg = update.effective_message
    if args:
        user = update.effective_user.id
        username = "******".join(args)
        sql.set_user(user, username)
        msg.reply_text(f"Username set as {username}!")
    else:
        msg.reply_text(
            "Bukan begitu cara kerjanya...\nJalankan /setuser diikuti dengan nama pengguna Anda!"
        )
Exemplo n.º 3
0
def set_user(update: Update, context: CallbackContext):
    args = context.args
    msg = update.effective_message
    if args:
        user = update.effective_user.id
        username = "******".join(args)
        sql.set_user(user, username)
        msg.reply_text(f"Username set as {username}!")
    else:
        msg.reply_text(
            "That's not how this works...\nRun /setuser followed by your username!"
        )
Exemplo n.º 4
0
def clear_user(update: Update, _):
    user = update.effective_user.id
    sql.set_user(user, "")
    update.effective_message.reply_text(
        "Last.fm username successfully cleared from my database!")
Exemplo n.º 5
0
def clear_user(bot: Bot, update: Update):
    user = update.effective_user.id
    sql.set_user(user, "")
    update.effective_message.reply_text(
        "Nama pengguna Last.fm berhasil dihapus dari database saya!")