Code Monkey home page Code Monkey logo

Comments (11)

mukel avatar mukel commented on May 21, 2024 2

You can pull the proxy logic yourself.
Just need to copy ScalajHttpClient.scala and ScalajHttpMarshalling and use it as you client.
Here's an example
https://github.com/mukel/telegrambot4s/blob/refactor/examples/src/ProxyBot.scala

from telegram.

mukel avatar mukel commented on May 21, 2024 1

I'm on vacation ATM (no laptop) but I could publish an RC2 with the recent patches and proxy support next week.
I've been working on a large refactor (ScalaJs support, circe-based serialization, proxy support via ScalajHttpClient, modular design...) You can try building from source the js branch (it uses mill instead of SBT).
Sorry for the inconvenience, feel free to open an issue or continue the discussion here, I'll galdly help you sort it out.

from telegram.

mukel avatar mukel commented on May 21, 2024

It could be that you have another instance of your bot already running e.g. in the background, an instance that didn't died even if you Ctrl-C it... it happens.
Make sure to run a single instance of your bot. Kill all the java processes.

from telegram.

Tieru avatar Tieru commented on May 21, 2024

You are probably right, but I've just tried running another bot which has never been launched before. The error reminds the same. So I still think, proxy will help me :)

from telegram.

Tieru avatar Tieru commented on May 21, 2024

I tried to copy two mentioned files, but no luck. These classes depend on changes in JsonMarshallers, RequestHandler, which I managed to repeat in my project as well. But there is one more thing I can't solve: ScalajHttpMarshalling is working with sealed trait InputFile, and I can't apply case operator on project private classes Path, Contents etc

from telegram.

Tieru avatar Tieru commented on May 21, 2024

I can wait, I don't have urgent tasks :)

Btw, here is the bot I created using your library (just a dictionary of English words): https://github.com/Tieru/MacMillanTelegramBot . If you have time to look at that, any feedback is welcome.

I can also help you with maintaining your library. When you are back from your vacation you can delegate me simple tasks that you have in mind, but have no time to spend on them.

Please let this issue open until we try proxy. I guess many Russians will have problems with running their bots, so this topics might be a solution for them in the future.

from telegram.

Tieru avatar Tieru commented on May 21, 2024

I couldn't find any proxy support in 'js' branch. However I tried 'refactor' and now I can confirm that proxy does solve the issue! Thanks for your help!

from telegram.

Tieru avatar Tieru commented on May 21, 2024

Hello, @mukel . Could you please release a version that includes proxy? I have built a jar that includes those changes and it's fine for development, but deploy process to server or to another pc is a bit painful.

Probably I could help you somehow in order to save your time and prepare new releases

from telegram.

mukel avatar mukel commented on May 21, 2024

I'll allocate some time this weekend, mainly to update the API to v4.0 . Probably push a release candidate; would be nice to get it tested.

from telegram.

Tieru avatar Tieru commented on May 21, 2024

Okay, I will gladly help you to test features I'm using, but I can't promise about the rest of them, since I don't know how :)

from telegram.

mukel avatar mukel commented on May 21, 2024

Closing this in favor of #63

from telegram.

Related Issues (20)

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.