Telegram channel: Retro Games
As you might know, I love to get my hands dirty doing some coding and learning how to use new systems. Over the past week or two, I’ve taken a bit of a break from writing for the N64 Homebrew section and exploring the demo code for NuSystem to take on a little bit of a side-project. I’ve been learning about how to use APIs to integrate different applications together, specifically for a telegram channel that I’ve been working on.
The channel is the @retrogames channel. Ideally, I’d much rather have a N64 channel up and running, but I feel as though it’s too niche for the general public. You can find it here:
It’s pretty much what you’d expect, you get pictures and little comments about retro gaming.
However, I created this channel a few months back but never got around to posting much because of the effort it took to go through and look for things, upload them and adding a comment so it stayed dormant for a while.
Now, here comes the API part.
At first, I thought of using a bot somebody made to just get a feed from RSS or Twitter and repost it to the telegram channel. However, this meant that there would be a lot of junk, even if I added a filter to it. Not wanting to annoy the hell out of the channel followers, I came up with another idea: a filter for interactions.
So these are the steps that the program follows:
- Get items from feed (only twitter at this point) according to some search criteria.
- Store in database only the ones with an image and at least one favourite.
- Send to bot chat one of the tweets in the database (picture, filtered tweet message and channel send codes).
- If the tweet is good, the user can press the send code to post the image (with or without message) to the channel.
I’m really proud of this code I wrote, but the problem is that it’s very specific to my personal use and not really transferable for use by other channel admins. This is something that I might look into moving forward.