Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • May 28 08:01
    scala-steward closed #263
  • May 28 08:01
    scala-steward commented #263
  • May 28 08:01
    scala-steward opened #289
  • May 27 02:14
    scala-steward closed #283
  • May 27 02:14
    scala-steward commented #283
  • May 27 02:14
    scala-steward opened #288
  • May 26 22:11
    scala-steward closed #286
  • May 26 22:11
    scala-steward commented #286
  • May 26 22:11
    scala-steward opened #287
  • May 26 14:10
    scala-steward opened #286
  • May 26 08:08
    scala-steward opened #285
  • May 17 14:19
    scala-steward closed #264
  • May 17 14:19
    scala-steward commented #264
  • May 17 14:19
    scala-steward opened #284
  • May 17 08:10
    scala-steward closed #275
  • May 17 08:10
    scala-steward commented #275
  • May 17 08:10
    scala-steward opened #283
  • May 14 20:15
    scala-steward closed #277
  • May 14 20:15
    scala-steward commented #277
  • May 14 20:15
    scala-steward opened #282
Lior Liviev
@liorl00
could you implement this pls, I really need this method :)
Yura Slinkin
@augustjune
definitely
I'll get back to you later today with this
Lior Liviev
@liorl00
Thank you, I'll be waiting)
Yura Slinkin
@augustjune
@liorl00 btw, PRs are welcome :wink:
this is an easy one, just another constructor method in InlineKeyboardButton companion object with some description
Lior Liviev
@liorl00
@augustjune Should be right: augustjune/canoe#230
Lior Liviev
@liorl00
@augustjune I hope you can merge it today, cause I need it badly)
Yura Slinkin
@augustjune
@liorl00 new version 0.5.1 with your change is available in maven central :tada:
Lior Liviev
@liorl00
@augustjune Hey wanted to say thank you for the last update, really helped. Could you also check my issue. Maybe you remember about being able to call scenarios in callbacks? augustjune/canoe#218
Yura Slinkin
@augustjune
Thank you for your kind feedback @liorl00
I do remember about this issue. I was tackling that last weekend and I have some ideas on how callbacks can be embedded in Scenario. That's a big change though, so I want to approach it carefully, but it's definitely on my radar!
Lior Liviev
@liorl00
@augustjune Got you, thanks :)
Lior Liviev
@liorl00
@augustjune do you know why canoe throws 403: Forbidden ?
Yura Slinkin
@augustjune
Not really. It may be the case you're trying to execute some operation you don't have permissions to, e.g. kick a person out of a group where you're not the admin
Fausto Di Natale
@faustin0

Hi @augustjune and thanks for the library :)
a quick question: i'm developing a bot with different scenarios and callbacks and was wondering if there are any way to have a "global exception handler" instead of use .attempt or .handleErrorWith for each of the scenarios.
i was expecting the app not to crash if something fails during the evaluation of one of the scenarios (because of a bad input, some unhandled edge case, temporary connection error with external sources, telegram server not responding ..).
i'have tried to use the handleErrorWith/attempt in the main stream:

 telegramClient
      .flatMap(implicit client =>
        Bot
          .polling[IO]
          .follow(scen1,scen2,scen3)
          .through(callback1)
           //tried here
      )
     //tried here
      .compile
      .drain
      .as(ExitCode.Success)

but the underlying stream seems to explode:

[ioapp-compute-3] INFO o.h.c.PoolManager - Shutting down connection pool: curAllocated=1 idleQueues.size=1 waitQueue.size=0 maxWaitQueueLimit=256 closed=false
Non-daemon threads currently preventing JVM termination: - 29: Thread[pool-1-thread-1,5,main]
 -  - 44: Thread[DestroyJavaVM,5,main]

Am i missing something?

Sergio Flor
@balath
Hi @augustjune !! I´m CS student and a few folks and me are using canoe for a development course project. I´m trying to manage inline queries but I can't quite find the way...Could you give me any hint?
Lot of thanks for your work, it's my first time dealing with cats and this way is being enlightening for me. :clap:
Sergio Flor
@balath
Just done! I’ve seen NoScenario example....I’ve to read better
Yura Slinkin
@augustjune
Hey guys, sorry for the late response
@balath I'm so glad to hear that you're using this lib for your course project. I'll be happy to help if you guys have any issues or want-to-know-hows along your way :wink:
2 replies
Yura Slinkin
@augustjune
@faustin0 you probably want to have two kinds of error handling strategies for your app: one - to handle the user getting off of your particular scenario and another one to handle actual errors that might occur while communicating with telegram API
2 replies
I separate them because in the first case you might want to drive the behaviour of your bot depending on user input, e.g. correcting the user , providing a set of viable options and continuing the scenario. see: .tolerate and .cancel methods that you can use to steer the flow
for the second type of errors (underlying communication errors / errors in your business layer or canoe itself), you can handle them on the top level as you've described and restart the whole bot if such an error occurred
I will be able to help you more if you give me a glimpse on how you were trying to handle errors with .attempt and .handleErrorWith
Tieru
@Tieru

Hi. I'm trying to handle inline queries with code from the NoScenario example, and it doesn't work. I see an error "unexpected HTTP status: 400 Bad Request". It's working fine when I return empty List() but fails with InlineQueryResultArticle content. Probably somebody has any ideas what could go wrong?

A simple "echo" bot is working fine as well. The only issue is inline queries

Lior Liviev
@liorl00
@augustjune Hey, Is there any way to delay a message in canoe?
Maftunbek
@Prince951-17
Hello everyone!
How can send a message to a group (or chat) via identifier?
Thanks in advance for the reply!
2 replies
ivankrut856
@ivankrut856
Hello @augustjune I'm quite happy with your cool library, but still struggling to figure out how to test the telegram client built by the library. Could you please provide some clues?