dracarys18 / TweetBot

A simple Telegram Bot to Stream the tweets from any twitter accounts to Telegram Channel
MIT License
103 stars 45 forks source link

Feature Request: Multi-Channel Support with Per Channel Twitter-IDs #13

Open JustAKat opened 2 years ago

JustAKat commented 2 years ago

Hi,

Was wondering if it might be possible for you to consider adding multi-channel support with your planned future rewrite?

Possible example of the configuration to outline the suggestion better:

Twitter:
  ACCESS_TOKEN: "ACCESS_TOKEN_HERE"
  ACCESS_TOKEN_SECRET: "ACCESS_TOKEN_SECRET_HERE"
  CONSUMER_KEY: "API_KEY_HERE"
  CONSUMER_SECRET: "API_KEY_SECRET_HERE"
Telegram:
 - IncludeRetweet: false
   IncludeUserReply: false
   IncludeReplyToUser: false
   custom_message: ""
   twitter_ids: ['utdreport', 'ManUnitedZone_']
   chat_id:
     - "-1002233445566"
     - "-1004455667788"
 - IncludeRetweet: true
   IncludeUserReply: true
   IncludeReplyToUser: false
   custom_message: ""
   twitter_ids: ['manutd']
   chat_id:
     - "-1004455667788"
dracarys18 commented 2 years ago

Noted.

dracarys18 commented 2 years ago

So hey @JustAKat I have started rewriting the bot https://github.com/dracarys18/TweetBot/tree/rust-rewrite. And wanted to ask you what is custom_message in your config

JustAKat commented 2 years ago

So hey @JustAKat I have started rewriting the bot https://github.com/dracarys18/TweetBot/tree/rust-rewrite. And wanted to ask you what is custom_message in your config

Hi, sorry for the late reply, kind of got distracted by work and the loosening of the covid restrictions... (that and somehow this reply went to my spam)

Basically, it's just text that would appear before the embedding of the actual tweet or the link of the tweet

For instance, if a tweet said:

【予告】
5月4日(金) 12:00より
#グルミク 1.5周年記念ログインキャンペーン第2弾が開催決定🎊

1.5周年フロアチャレンジが
15000フロア達成となりましたので、
毎日50ダイヤ⇨
200ダイヤ💎のプレゼントとなりました🎉💖

詳細はゲーム内お知らせをチェック✅

#substitutedhashtag

It would end up (with a custom message of "Hey there, DJs, a new post has been dropped!") perhaps as

Hey there, DJs, a new post has been dropped!

【予告】
5月4日(金) 12:00より
#グルミク 1.5周年記念ログインキャンペーン第2弾が開催決定🎊

1.5周年フロアチャレンジが
15000フロア達成となりましたので、
毎日50ダイヤ⇨
200ダイヤ💎のプレゼントとなりました🎉💖

詳細はゲーム内お知らせをチェック✅

#substitutedhashtag
dracarys18 commented 2 years ago

@JustAKat Don't this that's a good idea considering telegram has up to 4,096 character limit for messages sent by the bot

dracarys18 commented 2 years ago

Need to think about the config format to use. Preferably json or YAML will see.

JustAKat commented 2 years ago

@JustAKat Don't this that's a good idea considering telegram has up to 4,096 character limit for messages sent by the bot

Fair, fair But it is possible to include a limit or trim as well, perhaps

But if truly infeasible, can ignore the custom-message bit