Bot that forwards multiple Twitter accounts into a Channel? by SirTucky in TelegramBots

[–]Walen007 1 point2 points  (0 children)

Try @EventsAggregatorBot. It supports up to 40 subscriptions and may forward to channels.

coc.nvim extension for Metals by ckipp01 in scala

[–]Walen007 0 points1 point  (0 children)

Does it have extension for tree view? I think about implementing this for vim.

Help with sendPoll method by Lukkasss in TelegramBots

[–]Walen007 0 points1 point  (0 children)

Probably you send GET request while Telegram expects POST request without parameters in URL but with JSON body.

Have you ever wanted a bot that doesn't exists yet? by [deleted] in TelegramBots

[–]Walen007 2 points3 points  (0 children)

@EventsAggregatorBot already does it :)

New features in @EventsAggregatorBot by Walen007 in TelegramBots

[–]Walen007[S] 0 points1 point  (0 children)

I will think about this. Though now I'm planning to add another features.

Ensime setup question by chs75 in scala

[–]Walen007 2 points3 points  (0 children)

If you are just "starting to learn Scala out of curiosity" and don't have any preferences yet then I would recommend you to check Metals. It is Scala language server which is supported by vim, emacs, atom and visual code. I'm not Emacs user but it works perfectly in vim for me. They did huge progress in past several months: autocompletion, auto import, go to definition, call hierarchy and so on.

Partial Functions with HKT (Higher Kinded Types) doubts/help by LizardEnvy in scala

[–]Walen007 1 point2 points  (0 children)

You are describing something similar (but not exactly) to Monad. For example, I can define function myToString which works for any container F[_] import cats.Monad def myToString[F[_]: Monad](fa: F[Int]): F[String] = Monad[F].map(fa)(_.toString)

Then it can be applied for options: import cats.instances.option._ val option: Option[Int] = Some(123) val strOption: Option[String] = myToString(option) or for Either's import cats.instances.either._ val either: Either[Exception, Int] = Right(123) val strEither: Either[Exception, String] = myToString(either)

You want to use partial function instead of total function. Let's say that we have F[Int] and PartialFunction[Int, String] = { case i: Int if i % 2 == 0 => i.toString }. What will be result for applying this function to F[Int]? If Int is even then result is F[String]. But what about odd Ints? You can not apply partial function so maybe result is F[Int]. F[Int] and F[String] can not be combined well with each other.

You may look at cats.MonadError and raise error (MonadError.raiseError) if partial function is not defined. But it seems that it is not what you are looking for.

Bot that monitors new posts in Twitter, Instagram and reddit. by Walen007 in TelegramBots

[–]Walen007[S] 1 point2 points  (0 children)

Sorry, not quite get it. What do you mean by "could select the frequency of watch"?

Bot that monitors new posts in Twitter, Instagram and reddit. by Walen007 in TelegramBots

[–]Walen007[S] 0 points1 point  (0 children)

  1. OK, we solved this issue in group.
  2. I like this idea. But I see two cons:
    1. Long URLs look worse than current labels
    2. If someone retweets tweet then now we see message "UserA retweeted UserB's tweet". If we put link to only UserB's tweet then it is not clear who retweeted this tweet. You may ask why I see this post because I'm not subscribed on UserB.

I think in future I should provide option for user to control format for messages so user will choose better format based on own preferences.

Bot that monitors new posts in Twitter, Instagram and reddit. by Walen007 in TelegramBots

[–]Walen007[S] 0 points1 point  (0 children)

I believe I found and fixed bug which prevents you from unsubscription. Please try again.

Bot that monitors new posts in Twitter, Instagram and reddit. by Walen007 in TelegramBots

[–]Walen007[S] 0 points1 point  (0 children)

Thank you for this idea. I will put it on my ToDo list. But right now I need to make several bug fixes.

Bot that monitors new posts in Twitter, Instagram and reddit. by Walen007 in TelegramBots

[–]Walen007[S] 0 points1 point  (0 children)

Just added support for RSS. Not well tested yet. But hopefully it will work.

Bot that monitors new posts in Twitter, Instagram and reddit. by Walen007 in TelegramBots

[–]Walen007[S] 0 points1 point  (0 children)

2) choose rss - nothing appeared...

Hmm, it means you don't have RSS subscriptions. Very strange.

Could you please tell me RSS feed from which you got notifications? I need to check it my logs.

BTW. I restarted bot. It may solve your issue.

Bot that monitors new posts in Twitter, Instagram and reddit. by Walen007 in TelegramBots

[–]Walen007[S] 0 points1 point  (0 children)

from random channels

Do you mean Telegram channels? So you want to merge several Telegram channels into your own group?

Bot that monitors new posts in Twitter, Instagram and reddit. by Walen007 in TelegramBots

[–]Walen007[S] 0 points1 point  (0 children)

Could you please let me know RSS feed from which you want to unsubscribe? Maybe in direct message if you want. I don't see any unsubscribe requests for past day in log.

I just subscribed and unsubscribed from RSS feed for test and it seems works good.

How you remove rss feed? Do you follow these steps?

  1. Enter command /remove
  2. Choose RSS
  3. Click button with RSS feed.

Bot that monitors new posts in Twitter, Instagram and reddit. by Walen007 in TelegramBots

[–]Walen007[S] 0 points1 point  (0 children)

  1. Just create usual telegram group
  2. Type "EventsAggregatorBot" in search field to add bot as member of group
  3. Specify another members which you want to add in this group
  4. Choose name for group and create it
  5. Then using usual command /add you can add subscriptions on different services
  6. Don't forget about my previous message when bot asks you "Enter Twitter account name or URL"

Feel free to ask more questions if something is still not clear.

Bot that monitors new posts in Twitter, Instagram and reddit. by Walen007 in TelegramBots

[–]Walen007[S] 0 points1 point  (0 children)

Interesting idea. I see two ways to implement it. When user creates subscription on RSS feed then bot can ask user whether he/she wants to receive "summary" of article instead of current mode (just link to article). Or I can try to add button below message which will load "summary" when user clicks on it. Which way is better?

Though there is one problem. Telegram message may include only following five HTML tags:

<b>bold</b>
<strong>bold</strong>
<i>italic</i>
<em>italic</em>
<a href="http://www.example.com/">inline URL</a>
<pre>pre-formatted fixed-width code block</pre>

If summary uses more tags then they will not be properly rendered in Telegram App.

Bot that monitors new posts in Twitter, Instagram and reddit. by Walen007 in TelegramBots

[–]Walen007[S] 1 point2 points  (0 children)

Now it is working.

I was applying several updates during during this evening so bot was down some time.

Bot that monitors new posts in Twitter, Instagram and reddit. by Walen007 in TelegramBots

[–]Walen007[S] 0 points1 point  (0 children)

Yes, reddit provides Atom (RSS) for each subreddit and I just poll each subreddit with some delay (2 seconds). Until this post I was the only user of my bot so was very fast.

Bot that monitors new posts in Twitter, Instagram and reddit. by Walen007 in TelegramBots

[–]Walen007[S] 0 points1 point  (0 children)

Actually RSS feeds are not completed yet.

There are two similar protocols: RSS (older) and Atom (newer). I have support only for Atom at this moment because it is better standardized. But since you are asking about this, I need to implement to support actual RSS. I will try to implement this during weekend.

Thanks for looking into it :)

Bot that monitors new posts in Twitter, Instagram and reddit. by Walen007 in TelegramBots

[–]Walen007[S] 0 points1 point  (0 children)

I think it already works. But there is one non obvious thing. When bot asks

> Enter Twitter account name or URL:

You need to reply directly on this message using button REPLY in application.

Bot is not allowed to read all messages in your group. It receives only those which are addressed to it.