async def _(event): if event.fwd_from: return reply_message = await event.get_reply_message() result = sql.get_warns(reply_message.from_id, event.chat_id) if result and result[0] != 0: num_warns, reasons = result limit, soft_warn = sql.get_warn_setting(event.chat_id) if reasons: text = "Bu kullanıcı, {}/{} uyarılarına sahip. Şu sebepten dolayı:".format( num_warns, limit) text += "\r\n" text += reasons await event.edit(text) else: await edit_or_reply(event, "Bu kullanıcının uyarıları var, {} / {} ancak hiçbirinin sebebi yok!".format(num_warns, limit)) else: await edit_or_reply(event, "Bu kullanıcının herhangi bir uyarısı yok!")
async def _(event): if event.fwd_from: return reply_message = await event.get_reply_message() result = sql.get_warns(reply_message.from_id, event.chat_id) if result and result[0] != 0: num_warns, reasons = result limit, soft_warn = sql.get_warn_setting(event.chat_id) if reasons: text = "This user has {}/{} warnings, for the following reasons:".format( num_warns, limit) text += "\r\n" text += reasons await event.edit(text) else: await event.edit( "this user has {} / {} warning, but no reasons for any of them." .format(num_warns, limit)) else: await event.edit("this user hasn't got any warnings!")