Comments (11)
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Closing this in favor of #63
from telegram.
Related Issues (20)
- Bot silently stops receiving updates when it gets a message that fails to parse HOT 9
- Remove okhttp dependency from "core" module HOT 1
- Example on how to use `SetMyCommands` HOT 6
- Add `FilterF` and declarative `whenF`
- Support bot API v6
- SSL error: 0A00010B:SSL routines::wrong version number HOT 10
- Support 6.1 API
- SSL with ZIO Webhook using asyncHttpClient HOT 16
- Help to remove menu. HOT 1
- Support underscore in command name HOT 2
- No reconnect on connecton issues HOT 5
- Proxy basic authentification HOT 2
- requirement failed: Exactly one of the optional fields should be used HOT 2
- scala.MatchError on EditMessageMedia HOT 2
- Monetstore and cryptocurrency, services and advertising/marketing Ltd
- Victormonet
- Migrate to Pekko HOT 1
- Bezzi
- Scala 3
- Java 21
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telegram.