Update bot.lua

This commit is contained in:
mohamadkhoshnava 2016-04-19 08:31:37 +04:30
parent eff97c40ee
commit b0db1d8ec1

23
bot.lua
View File

@ -6,8 +6,8 @@ JSON = require('dkjson')
HTTPS = require('ssl.https') HTTPS = require('ssl.https')
dofile('utilities.lua') dofile('utilities.lua')
----config---- ----config----
local bot_api_key = "" --التوكم هنا local bot_api_key = "145907392:AAFjCN-_5ChWZuGvp6R2VbdbKZ3g6nK4X8U" --التوكم هنا
local You = --خلي ايدي حسابك local You = 188548712 --خلي ايدي حسابك
local BASE_URL = "https://api.telegram.org/bot"..bot_api_key local BASE_URL = "https://api.telegram.org/bot"..bot_api_key
local BASE_FOLDER = "" local BASE_FOLDER = ""
local start = [[ ]] local start = [[ ]]
@ -19,20 +19,21 @@ local help = [[
*commands:*`for admin` *commands:*`for admin`
`/ban` `/ban`
*حظر عضو من ارسال رساله بالرد على رسالته*
`/unban` `/unban`
*فتح الحظر عن عضو عن طريق الرد على رسالته*
`/users` `/users`
*معرفه عدد الاعضاء المشتركين*
`/broadcast` `/broadcast`
*ارسل هذا الامر وكل رساله كانت بعده سترسل لجميع المشتركين*
`/unbroadcast` `/unbroadcast`
*لكي تتوقف ارسال الرسائل وتفعيل الاوامر البقيه*
`/start` `/start`
*لأظهار رساله ترحيب للاعضاٱء*
`/id` `/id`
*بالرد على رساله موجهه يضهر لك المعلومات*
M.KH @cruel0098
]]--اوامر المساعدة ]]--اوامر المساعدة
------- -------
@ -262,7 +263,7 @@ function bot_run()
if not ban then if not ban then
ban = load_data('ban.db') ban = load_data('ban.db')
end end
local bot_info = "Username = @"..bot.username.."\nName = "..bot.first_name.."\nId = "..bot.id.." \nBASED BY :- @DEV_MICO , @MALVOO" local bot_info = "Username = @"..bot.username.."\nName = "..bot.first_name.."\nID = "..bot.id.." \n[jon the cruel channel](https://telegram.me/joinchat/Cz0GaD5yj9_VLaNXOOg3ag)"
print(bot_info) print(bot_info)
for k,v in pairs(add.id) do for k,v in pairs(add.id) do
@ -295,7 +296,7 @@ user = bot.username
else else
user = msg.from.username user = msg.from.username
end end
local text = "مرحبا بك يا ["..msg.from.first_name.."](www.telegram.me/"..user..")" local text = " سلام ["..msg.from.first_name.."](www.telegram.me/"..user..")"
sendMessage(msg.chat.id,text.."\n"..start,true,false,true) sendMessage(msg.chat.id,text.."\n"..start,true,false,true)
elseif msg.text == "/start" and is_add(msg) then elseif msg.text == "/start" and is_add(msg) then
print(#add.id) print(#add.id)