yagop / telegram-bot

UNMAINTAINED - A Telegram Bot based on plugins

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

send file

drig0 opened this issue · comments

commented

hello, I am trying to make the bot send files to me
these files are on the data folder,, along with : moderation.json, config.lua
his name is android.apk,,,

this and the command that I have::


local function run(msg, matches)
send_document(receiver, 'data/android.apk', ok_cb, false)
end

  return {

description = "send file",
usage = "/file ",
patterns = {
"^/file",
"^!file"
},
run = run
}


but he did not send the file
what could be wrong?

commented

you forgot
local receiver = get_receiver(msg)
before send_document

commented

@Brawl345 work
works, very thank you master

commented

Don't forget to close the issue ;)