Git Product home page Git Product logo

tdbot's People

Contributors

levlam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tdbot's Issues

Update clilua.cpp

@levlam Hello , please update clilua.cpp to 1.7.0

[ 3][t 0][1631121313.249387502][clilua.cpp:133][!Td] {"@type":"setChatMemberStatus","chat_id":-1001268341952,"member_id":1995170343,"status":{"@type":"chatMemberStatusLeft"}}
[ 1][t 0][1631121313.249459981][clilua.cpp:149][!Td] FAILED TO PARSE LUA: [Error : 0 : Expected Object, got Number]

Error Compile

Hi , when i try to compile i will face this error :

In file included from /root/tdbot/main.cpp:20:0:
/root/tdbot/cliclient.hpp:49:22: error: expected ‘)’ before ‘stdin_’
CliStdFd (td::Fd stdin_, td::Fd stdout_, CliClient *cli_);
^
/root/tdbot/cliclient.hpp:57:9: error: ‘Fd’ in namespace ‘td’ does not name a type
td::Fd stdin_;
^
/root/tdbot/cliclient.hpp:58:9: error: ‘Fd’ in namespace ‘td’ does not name a type
td::Fd stdout_;
^
In file included from /root/tdbot/td/tdactor/td/actor/actor.h:14:0,
from /root/tdbot/main.cpp:15:
/root/tdbot/td/tdactor/td/actor/impl/Scheduler.h: In instantiation of ‘td::ActorOwn td::Scheduler::create_actor(td::Slice, Args&& ...) [with ActorT = td::ClientActor; Args = {std::unique_ptr<td::TdCallback, std::default_deletetd::TdCallback >}]’:
/root/tdbot/td/tdactor/td/actor/impl/Scheduler.h:366:87: required from ‘td::ActorOwn td::create_actor(td::Slice, Args&& ...) [with ActorT = td::ClientActor; Args = {std::unique_ptr<td::TdCallback, std::default_deletetd::TdCallback >}]’
/root/tdbot/cliclient.hpp:212:86: required from here
/root/tdbot/td/tdactor/td/actor/impl/Scheduler.h:81:111: error: no matching function for call to ‘td::ClientActor::ClientActor(std::unique_ptrtd::TdCallback)’
, new ActorT(std::forward(args)...), Actor::Deleter::Destroy, sched_id_);
^
In file included from /root/tdbot/cliclient.hpp:10:0,
from /root/tdbot/main.cpp:20:
/root/tdbot/td/td/telegram/ClientActor.h:59:3: note: candidate: td::ClientActor::ClientActor(td::ClientActor&&)
ClientActor(ClientActor &&other);
^
/root/tdbot/td/td/telegram/ClientActor.h:59:3: note: no known conversion for argument 1 from ‘std::unique_ptrtd::TdCallback’ to ‘td::ClientActor&&’
/root/tdbot/td/td/telegram/ClientActor.h:34:12: note: candidate: td::ClientActor::ClientActor(td::unique_ptrtd::TdCallback)
explicit ClientActor(unique_ptr callback);
^
/root/tdbot/td/td/telegram/ClientActor.h:34:12: note: no known conversion for argument 1 from ‘std::unique_ptrtd::TdCallback’ to ‘td::unique_ptrtd::TdCallback’
CMakeFiles/telegram-bot.dir/build.make:62: recipe for target 'CMakeFiles/telegram-bot.dir/main.cpp.o' failed
make[3]: *** [CMakeFiles/telegram-bot.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:74: recipe for target 'CMakeFiles/telegram-bot.dir/all' failed
make[2]: *** [CMakeFiles/telegram-bot.dir/all] Error 2
CMakeFiles/Makefile2:86: recipe for target 'CMakeFiles/telegram-bot.dir/rule' failed
make[1]: *** [CMakeFiles/telegram-bot.dir/rule] Error 2
Makefile:162: recipe for target 'telegram-bot' failed
make: *** [telegram-bot] Error 2

prevent caching

hi
i get view count of message using bellow function but seems cached and not update in every call i also disable message_db in config file . how i can prevent caching getmessage function?
{"_":"getMessage", "chat_id":....

use directly script

Hi, I want to use my script directly because my source is not open, How can i do this?
A) How to save script in config file
or
B) How to set source directly like tgcli and -s parameter

How to run via luajit?

Hi. Tnx for your great job. How can we make it work through luajit or tarantool instead of lua?

i need help

i complied and works but json output is like this how to change @type to _

also i tested this code but not work
if (data["@type"] == "updateNewMessage") then

{"@type":"updateUserStatus","user_id":368342230,"status":{"@type":"userStatusOnline","expires":1518259696}}
{"@type":"updateUserStatus","user_id":252626505,"status":{"@type":"userStatusOffline","was_online":1518259397}}
{"@type":"updateUserStatus","user_id":252626505,"status":{"@type":"userStatusOnline","expires":1518259698}}
{"@type":"updateUserStatus","user_id":301402981,"status":{"@type":"userStatusOffline","was_online":1518259404}}
{"@type":"updateUserStatus","user_id":301402981,"status":{"@type":"userStatusOffline","was_online":1518259404}}
{"@type":"updateUserStatus","user_id":135291594,"status":{"@type":"userStatusOffline","was_online":1518259409}}
{"@type":"updateUserStatus","user_id":353204519,"status":{"@type":"userStatusOnline","expires":1518259722}}
{"@type":"updateUserStatus","user_id":329584738,"status":{"@type":"userStatusOnline","expires":1518259722}}
{"@type":"updateUserStatus","user_id":225996088,"status":{"@type":"userStatusOnline","expires":1518259724}}
{"@type":"updateUserStatus","user_id":86239803,"status":{"@type":"userStatusOnline","expires":1518259728}}
{"@type":"updateUserStatus","user_id":254806916,"status":{"@type":"userStatusOnline","expires":1518259739}}
{"@type":"updateUserStatus","user_id":181674063,"status":{"@type":"userStatusOffline","was_online":1518259440}}
{"@type":"updateUserStatus","user_id":181674063,"status":{"@type":"userStatusOffline","was_online":1518259440}}
{"@type":"updateUserStatus","user_id":181674063,"status":{"@type":"userStatusOnline","expires":1518259743}}
{"@type":"updateUserStatus","user_id":252626505,"status":{"@type":"userStatusOffline","was_online":1518259473}}
{"@type":"updateUserStatus","user_id":252626505,"status":{"@type":"userStatusOffline","was_online":1518259473}}

Problem installing with tdlib 1.5

I am experiencing the following error while installing, and thank you for publishing the TDLIb-compatible files:

Scanning dependencies of target telegram-bot
[ 98%] Building CXX object CMakeFiles/telegram-bot.dir/main.cpp.o
In file included from /root/tdbot/cliclient.hpp:20:0,
                 from /root/tdbot/main.cpp:20:
/root/tdbot/td/td/tl/tl_json.h:45:63: error: ‘to_json’ is not a member of ‘td::td_api’
 auto lazy_to_json(JsonValueScope &jv, const T &t) -> decltype(td_api::to_json(jv, t)) {
                                                               ^
/root/tdbot/td/td/tl/tl_json.h:45:63: note: suggested alternative:
/root/tdbot/td/td/tl/tl_json.h:37:13: note:   ‘td::to_json’
 inline void to_json(JsonValueScope &jv, const JsonVectorInt64 &vec) {
             ^
/root/tdbot/td/td/tl/tl_json.h:45:63: error: ‘to_json’ is not a member of ‘td::td_api’
 auto lazy_to_json(JsonValueScope &jv, const T &t) -> decltype(td_api::to_json(jv, t)) {
                                                               ^
/root/tdbot/td/td/tl/tl_json.h:45:63: note: suggested alternative:
/root/tdbot/td/td/tl/tl_json.h:37:13: note:   ‘td::to_json’
 inline void to_json(JsonValueScope &jv, const JsonVectorInt64 &vec) {
             ^
CMakeFiles/telegram-bot.dir/build.make:62: recipe for target 'CMakeFiles/telegram-bot.dir/main.cpp.o' failed
make[3]: *** [CMakeFiles/telegram-bot.dir/main.cpp.o] Error 1
CMakeFiles/Makefile2:74: recipe for target 'CMakeFiles/telegram-bot.dir/all' failed
make[2]: *** [CMakeFiles/telegram-bot.dir/all] Error 2
CMakeFiles/Makefile2:86: recipe for target 'CMakeFiles/telegram-bot.dir/rule' failed
make[1]: *** [CMakeFiles/telegram-bot.dir/rule] Error 2
Makefile:162: recipe for target 'telegram-bot' failed
make: *** [telegram-bot] Error 2

No Way To Change Parameters In TdBot

hi i wanna change the api id and api hash from the source in tdbot
but ill face this error :
["@type"] = "error",
code = 400,
message = "Unexpected setTdlibParameters"
how can i fix it ?

FAILED TO PARSE LUA

[clilua.cpp:148][!Td] FAILED TO PARSE LUA: [Error : 0 : Can't parse "9.2233720368548e+18" as number]

tdbot_function ({
	    ["@type"] = "getChats",
	    offset_order = 2^63 - 1,
	    offset_chat_id = 0,
	    limit = 20
  	}, cb, cmd)

on: Tdlib > v1.1.1

this error happens with more methods.... like: getSupergroup

Is client have sessions?

Is there a way to determine which request generate given response?

{"_":"error","code":0,"message":"..."}

Don't have any caller id?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.