Compile Telegram C# SDK for user (not bot father)

Поделиться
HTML-код
  • Опубликовано: 27 окт 2024

Комментарии • 75

  • @손바노-p3y
    @손바노-p3y Месяц назад +1

    Wow Really Thanks ❤

  • @ВладленШапарев
    @ВладленШапарев Год назад +2

    Thank you! Really helps me to create my own assisting programm for Telegram.

  • @blackwolf4516
    @blackwolf4516 2 года назад +2

    If you get the system.typeinitializationexception error, do not delete the configuration from the project file (in the video at 9:30 minutes). I left the configuration only for release and debug x64, that's the only way everything started

    • @huyvole9724
      @huyvole9724  2 года назад +1

      wow, thank you so much !!!!

    • @blackwolf4516
      @blackwolf4516 2 года назад

      @@huyvole9724 thank you very much too, your video helped a lot

  • @sinhhuynh1248
    @sinhhuynh1248 3 года назад +1

    thanks guy

  • @TornadoHyenyaku
    @TornadoHyenyaku Год назад

    Thanks bác... Cơ mà ngộ nha, bác join cái gr gì trên tele thế kia =)) :V

  • @krams_
    @krams_ 3 года назад +1

    Hi I really liked your content and it helped me a lot thanks🙏. Unfortunately for me I have errors with my DDL file.I used the zip file you put in the video description and it worked👍. But I'm more python or nodejs, so I would like if it's not too much to ask, that you make for me a build in one of these languages. it will help me to evolve quickly. Thanks in advance 🙏.

    • @huyvole9724
      @huyvole9724  3 года назад +1

      Ok, if i done, I will comment in this

    • @krams_
      @krams_ 3 года назад +1

      @@huyvole9724 Thank you guy🙏It will really help me

    • @krams_
      @krams_ 3 года назад +1

      @@huyvole9724 Hi

    • @huyvole9724
      @huyvole9724  2 года назад

      @@krams_ Hello, Did you solve your problem?

    • @krams_
      @krams_ 2 года назад

      @@huyvole9724 No unfortunately

  • @LongNguyen-pp9vh
    @LongNguyen-pp9vh 2 года назад +2

    Dùng api để chat thì user chat có hiển thị online không bác, hoặc có cách nào dùng session để online cho member được không bác ơi

    • @huyvole9724
      @huyvole9724  2 года назад +1

      chưa vọc kỹ nên không rành nữa bác

  • @huyvole9724
    @huyvole9724  9 месяцев назад

    If you cloned my project, please refresh data(deleting some files related with *.sqlite) because it was connecting old my data that you can't overwrite to enter your context.

    • @erasmusic6042
      @erasmusic6042 8 месяцев назад

      Hello. What files should I exactly delete?
      Your assistance would be greatly appreciated.

    • @huyvole9724
      @huyvole9724  8 месяцев назад

      @@erasmusic6042 Hi, in the directory I provided, there are sqlite files, my data such as telegram ID, authentication, .... will be stored in there, of course that information is old and no longer available. However, if you don't remove it, you won't be able to authenticate your account, and will then be unable to call the API. I just figures out this earlier this year when another friend downloaded my folder and ran it, it took us 30 minutes of chatting via telegram to understand the situation. So if you download my source code then please deleting it and click "rebuild" to refresh then it will allow you to authenticate your telegram information.

  • @mannwong7232
    @mannwong7232 3 года назад +1

    Great Video! How to listen to a chat for a new message?

    • @huyvole9724
      @huyvole9724  3 года назад +1

      We have 2 solution:
      1. Loop and get message (bad idea)
      2. Webhook, so you don't need loop get message, webhook server will trigger you every new message (facebook, ...)
      I don't know another solution because I did't research Telegram Client API.

  • @alexnecula
    @alexnecula 3 месяца назад

    Thanks for the help! I wonder why they didn't make it work out of the box...

  • @stallonmatindike4443
    @stallonmatindike4443 3 года назад

    Hey Huy, I finally got the Telegram.td.dll but I'm getting an exception, What Version of Microsoft Visual Studio, did you use, did you use MVS 2017 or ?

  • @peterherrera8162
    @peterherrera8162 3 года назад

    A query, when doing your steps the demo worked for me, but if I create a new console application and copy the ddl and make the reference I get an error "" System.BadImageFormatException "or filenotfound, you know what could be the reason I have searched a lot for internet and nothing yet '

  • @mankhensakeith398
    @mankhensakeith398 Год назад

    i manage to compile the program but unfortunately, when i run it, it doesn't give me the option to enter my phone so i can log in to my telegram account. can anyone please assist how to resolve this

    • @huyvole9724
      @huyvole9724  Год назад

      10:50 access telegram web and input your number phone

  • @shpendpalushi9399
    @shpendpalushi9399 3 года назад

    hi, I tried to install gperf but it when I tried gperf --version it wasn'y working. So I got the executable file and added in the System32 folder. After that when I try gperf --version it is working. But when I run cmake --build . --config Release it shows me 'C:\Windows\System32\gperf.exe' is not recognized as an internal or external command,
    operable program or batch file. How can I fix that?

    • @huyvole9724
      @huyvole9724  3 года назад +1

      Usually i install gperf, then open another cmd to test version gperf. Another way, you can put the path of folder contain gperf example C:/.../ after install success to system environtment.

    • @shpendpalushi5162
      @shpendpalushi5162 3 года назад

      I installed it, tried with another cmd, restarted the computer but it doesn't seem to work. Also after I installed it I can see that: the gperf.exe file is placed in C:\Program Files (x86)\GnuWin32\bin\gperf.exe. I added in System variables: Variable name: gperf; Variable value: C:\Program Files (x86)\GnuWin32\bin. But still the problem is persisting. I tried this thing with different computers and I am getting the same result. Am I doing anything wrong?

    • @huyvole9724
      @huyvole9724  3 года назад

      @@shpendpalushi5162 Are you sure installation success?

    • @shpendpalushi5162
      @shpendpalushi5162 3 года назад

      @@huyvole9724 since it says Setup has finished installing Gperf on your computer, I suppose so

    • @huyvole9724
      @huyvole9724  3 года назад

      @@shpendpalushi5162 add to environment in windows 10 only copy path, no variable name “gperf”, check it again

  • @ahmadrezahosseini5818
    @ahmadrezahosseini5818 2 года назад

    Hello
    thanks for video
    when i type "gperf --version" i get this error:
    'gperf' is not recognized as an internal or external command,
    operable program or batch file.
    but i installed gperf from the its installer

    • @ahmadrezahosseini5818
      @ahmadrezahosseini5818 2 года назад

      Thanks a lot
      The answer was found in one of the comments

    • @huyvole9724
      @huyvole9724  2 года назад

      I understand you mean. Let confirm this thing with me.
      1) After installed, you need to reopen another command promt
      2) if above solution doesnt work, try this. Add gperf location path to your system environment PATH

    • @ahmadrezahosseini5818
      @ahmadrezahosseini5818 2 года назад +1

      ​@@huyvole9724 yes, i added gperf location path on system environment and it was fixed,
      I compiled telegram td but now when i run application i get this:
      System.TypeInitializationException: 'The type initializer for 'TdExample.Example' threw an exception.'
      FileNotFoundException: Could not load file or assembly 'Telegram.Td.dll' or one of its dependencies. The specified module could not be found.

    • @huyvole9724
      @huyvole9724  2 года назад

      @@ahmadrezahosseini5818 dont worry, sometimes I also get that problem, it come from about the command line to build library. I will try it, but now I’m working in company. I will reply you soon.

    • @ahmadrezahosseini5818
      @ahmadrezahosseini5818 2 года назад

      @@huyvole9724 thank you man

  • @amirhuuseinmoradi4702
    @amirhuuseinmoradi4702 3 года назад

    Hello thanks for the video but I get this Exception "Could not load file or assembly 'Telegram.Td.dll' or one of its dependencies. The specified module could not be found."
    as soon as i ran program
    pls help :0

    • @huyvole9724
      @huyvole9724  3 года назад

      My TdExample.csproj

      Debug
      x86
      {3F9A93EA-DC26-4F8B-ACE0-131B33B00CA7}
      Exe
      false
      ConsoleApplication
      v4.0
      Client
      512


      true
      full
      false
      bin\Debug\
      DEBUG;TRACE
      prompt
      4
      x86


      pdbonly
      true
      bin\Release\
      TRACE
      prompt
      4
      x86


      TdExample


      true
      bin\x64\Debug\
      DEBUG;TRACE
      full
      x64
      prompt
      MinimumRecommendedRules.ruleset


      bin\x64\Release\
      TRACE
      true
      pdbonly
      x64
      prompt
      MinimumRecommendedRules.ruleset










      build64\Release\Telegram.Td.dll

    • @huyvole9724
      @huyvole9724  3 года назад

      @ЦОЙ ЖИВ what were you ask? I didn't receive notice

    • @huyvole9724
      @huyvole9724  3 года назад

      @ЦОЙ ЖИВ I got it, check inbox plz

  • @Boozer72
    @Boozer72 3 года назад

    Hi, I install everything like in the video and everything went well, and it also compile ok. But I when I run the app I never get to put in my phone number (telegram account) and verification code, it star directly whit the command input prompt “Enter command”. I have change the ApiId and the ApiHash to my own, but I suspect it connect to your account? Is there something you need to reset somewhere o, do you have any idea of what could bee the problem? I would appreciate it….

    • @huyvole9724
      @huyvole9724  3 года назад

      My phone is
      03.43391748
      03 is Viettel Telecom in my country.
      My country is Viet Nam, start +84
      So my result is
      84.343391748
      In your case, are you sure about your phone?

    • @Boozer72
      @Boozer72 3 года назад +1

      @@huyvole9724 That’s the problem, it never asks for my phone number…. It starts with “Enter command” prompt direct. Not even when I started for the first time, I got to enter any phone number???? So I never got a chase to connect to my telegram account.

    • @huyvole9724
      @huyvole9724  3 года назад +1

      @@Boozer72 keep debuging from main function, at the weeken I can use computer teamview to you.

    • @mankhensakeith398
      @mankhensakeith398 Год назад

      @@Boozer72 did you manage to get a solution on this?

    • @erasmusic6042
      @erasmusic6042 8 месяцев назад

      Was this ever resolved?

  • @knoxkool1477
    @knoxkool1477 3 года назад

    So you can make tdlib vpk for psvita ?

  • @omaral-afa8879
    @omaral-afa8879 3 года назад

    :(
    why not answering me ?

    • @huyvole9724
      @huyvole9724  3 года назад

      Hi, what did you ask me?

    • @omaral-afa8879
      @omaral-afa8879 3 года назад

      @@huyvole9724 I faced this problem when starting the example console in VS2019 ( Debug mode ):
      =======================================================================
      System.TypeInitializationException
      HResult=0x80131534
      Message=The type initializer for 'TdExample.Example' threw an exception.
      Source=
      StackTrace:
      Inner Exception 1:
      FileNotFoundException: Could not load file or assembly 'Telegram.Td.dll' or one of its dependencies. The specified module could not be found.
      =======================================================================
      And this when ( Release Mode ):
      =======================================================================
      System.IO.FileNotFoundException
      HResult=0x8007007E
      Message=Could not load file or assembly 'Telegram.Td.dll' or one of its dependencies. The specified module could not be found.
      Source=
      StackTrace:
      =======================================================================
      Also, I make sure that it runs on x64
      I have no idea how to fix that and I search a lot and didn't find anything
      could you help me?
      Also cloud you give us the way how to convert the objects that receive in the console to object in C# ( how to put a list of chats in list view at form for example ) ?
      Again thank you so much

    • @huyvole9724
      @huyvole9724  3 года назад

      @@omaral-afa8879 i guess you open project by folder, try open project by double click into file *.sln or *.csproj

  • @Fazlu3088
    @Fazlu3088 11 месяцев назад

    How i can in kotlin

    • @huyvole9724
      @huyvole9724  11 месяцев назад

      maybe it not come to us directly. You can build your own library by available and Kotlin import it

  • @Oisinkelly308
    @Oisinkelly308 3 года назад

    Is same for c++?

    • @huyvole9724
      @huyvole9724  3 года назад

      Yes

    • @Oisinkelly308
      @Oisinkelly308 3 года назад

      @@huyvole9724 okay thanks. I tried last night using the tdlib build generator but did not work. I will try to adapt your method