Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "telegram bot"
-
So in Telegram there is this funny little game called Lumberjack where you need to click left and right to cut the branches. My and my fellow students played this in the group. Then I got bored for like 30 minutes and decided to write a little bot which checks where the branches are with pixel detection and sends a left/right click to the window. Imagine my friends faces when all of sudden my score was 500+ and the character ran through this like a fucking jackhammer :D
#justmebeingaprogrammer17 -
This is not a rant. This is one of the several "aww" moments I've had with a chatbot I had made which I integrated with Telegram Bot API yesterday.12
-
Yesterday I started programming a telegram bot. First approach. Just curious.
Pretty impressed.
It's well documented and funny.5 -
Hey all! It's a me, Skayo, you might know me from the very early years of devRant, my highlight bot, my random quote bot, the devRant-Community on GitHub or any of the dumb rants and things that I've posted during my time.
Since I'm currently doing a cleanup of my old GitHub repos and this platform is still somewhat active, I have decided to pass on or publish all my projects and things I've created for this community back in the days.
Firstly, I have just published and transferred the source codes for the @highlight bot, the @RandomQuote bot, the @here bot, and some weird bot framework to the devRant-Community GitHub organization (https://github.com/devRant-Communit...).
Feel free to check them out if you've ever wondered what awful, awful code was running in the background all these years!
Secondly, I am offering any of the following to anyone who's interested:
- Ownership of the "devRant-Community" organization on GitHub (https://github.com/devRant-Communit...)
- Credentials for the @RandomQuote devRant user
- Credentials for the @highlight devRant user
- Credentials for the @here devRant user
- Credentials for the @devNews devRant user
- Ownership of the "devNews" Discord server
- Ownership of the "Community Programming Book" Discord server
- Anything else that I've forgotten about, maybe check the comments
If you're interested, message me on Discord "@skayodev" or anywhere else I am active under that alias (f.e. Telegram).
I might do a little background check to prevent abuse and I AM NOT SELLING THEM, just giving them away.
Thank you devRant for all the fun we had together and for introducing me to some of my current best friends :)
A thank you especially to @dfox and @trogus, who have created this amazing platform! (and sorry for all of the bullshit I did back then lol)
I wish you all the best <3
~ Skayorandom skayo random quote highlight bot here devrant-community devnews community programming book farewell skayodev11 -
> Telegram bot
> Whatsapp bot
> Domino game in terminal (Unfinished from last year)
> Bubble shooter game using c & allegro 5 (Unfinished from last year)
> Android Notability-like app with more features
> Program that increases youtube video views
> Android animal space invaders
> Own website/portfolio
> Our company app (includes daily euro-peso exchange rates, guidelines and other stuff about the company)
ive had other ideas but i started losing them cause i wrote them in several small pieces of paper. starting to think of i'll start to have a notebook dedicated to "ideas"7 -
24th, Christmas: BIND slaves decide to suddenly stop accepting zone transfers from the master. Half a day of raging and I still couldn't figure out why. dig axfr works fine, but the slaves refuse a zone update according to tcpdump logs.
25th, 2nd day: A server decides to go down and take half my network with it. Turns out that a Python script managed to crash the goddamn kernel.
Thank you very much technology for making the Christmas days just a little bit better ❤️
At least I didn't have anything to do during either days, because of the COVID-19 pandemic. And to be fair, I did manage to make a Telegram bot with fancy webhooks and whatnot in 5MB of memory and 18MB of storage. Maybe I should just write the whole thing and make another sacred temple where shitty code gets beaten the fuck out of the system. Terry must've been onto something...5 -
For the last week or so I've been writing a userbot for Telegram. Completely from scratch, plus Telethon to not reinvent the wheel entirely. I'm coming from the codebase of an existing userbot.
That userbot is written by a good friend of mine, who makes 6 figures, and whom I respect greatly. However the code is a steaming pile of shit. Now that is not his fault, he largely inherited that code too, tried to fix it, failed, gave up.
I am reimplementing it entirely. I'm only looking at the modules, trying to understand them, and copying over the necessary bits and changing them where necessary. But I've come across some nasty shit.
Userbots often edit existing messages from real Telegram clients. They're kind of like a login to your account, but with a program rather than a regular client. You send a message from a real client, it sees it and does whatever it needs to, and edits your message to give you feedback. Which is great.
However, there's no need to do simple string edits by importing "re". So why do you? Because you're an idiot, that's why. The old bot is based on Paperplane, which in turn is based on Telethon. Why do I see function calls to Telethon in some places and Paperplane in others? Because you're an idiot, that's why. Why does the dig module fail to even give correct answers? Because you know nothing about the DNS, that's why. And you didn't learn about RRs before implementing it.
And don't you tell me that this code is shit, and this bot is slow only when I run it on a fucking Pentium. I run this shit on an i7 and CPU isn't even the issue - memory, disk and such are. If you had any clue whatsoever about efficiency, you would've known because it's blatantly obvious. There's a reason why my machines rarely go past 5% CPU utilization. It's the fastest component in the entire fucking system.
When users come and say.. hmm this application of yours, it consumes a lot of memory. It takes a long time to do X and Y and I don't quite understand why, it seems illogical. Then maybe you should go look at your code, like you would look at yourself in the mirror. And then you fucking go fix it so that I don't have to. You're an engineer just like I am. And I am not even a dev proper - I'm a sysadmin by trade. Why should I have to fix your shit for you?1 -
So I just spent the last few hours trying to get an intro of given Wikipedia articles into my Telegram bot. It turns out that Wikipedia does have an API! But unfortunately it's born as a retard.
First I looked at https://www.mediawiki.org/wiki/API and almost thought that that was a Wikipedia article about API's. I almost skipped right over it on the search results (and it turns out that I should've). Upon opening and reading that, I found a shitload of endpoints that frankly I didn't give a shit about. Come on Wikipedia, just give me the fucking data to read out.
Ctrl-F in that page and I find a tiny little link to https://mediawiki.org/wiki/... which is basically what I needed. There's an example that.. gets the data in XML form. Because JSON is clearly too much to ask for. Are you fucking braindead Wikipedia? If my application was able to parse XML/HTML/whatevers, that would be called a browser. With all due respect but I'm not gonna embed a fucking web browser in a bot. I'll leave that to the Electron "devs" that prefer raping my RAM instead.
OK so after that I found on third-party documentation (always a good sign when that's more useful, isn't it) that it does support JSON. Retardpedia just doesn't use it by default. In fact in the example query that was a parameter that wasn't even in there. Not including something crucial like that surely is a good way to let people know the feature is there. Massive kudos to you Wikipedia.. but not really. But a parameter that was in there - for fucking CORS - that was in there by default and broke the whole goddamn thing unless I REMOVED it. Yeah because CORS is so useful in a goddamn fucking API.
So I finally get to a functioning JSON response, now all that's left is parsing it. Again, I only care about the content on the page. So I curl the endpoint and trim off the bits I don't need with jq... I was left with this monstrosity.
curl "https://en.wikipedia.org/w/api.php/...=*" | jq -r '.query.pages[0].revisions[0].slots.main.content'
Just how far can you nest your JSON Wikipedia? Are you trying to find the limits of jq or something here?!
And THEN.. as an icing on the cake, the result doesn't quite look like JSON, nor does it really look like XML, but it has elements of both. I had no idea what to make of this, especially before I had a chance to look at the exact structured output of that command above (if you just pipe into jq without arguments it's much less readable).
Then a friend of mine mentioned Wikitext. Turns out that Wikipedia's API is not only retarded, even the goddamn output is. What the fuck is Wikitext even? It's the Apple of wikis apparently. Only Wikipedia uses it.
And apparently I'm not the only one who found Wikipedia's API.. irritating to say the least. See e.g. https://utcc.utoronto.ca/~cks/...
Needless to say, my bot will not be getting Wikipedia integration at this point. I've seen enough. How about you make your API not retarded first Wikipedia? And hopefully this rant saves someone else the time required to wade through this clusterfuck.12 -
I'm making a telegram bot to allow printing and scanning for my roommates that have Windows and since printer and scanner are prehistoric there are no drivers that work with Windows higher than XP.
I'm looking for more ideas on features for bot.18 -
Planning a telegram bot + home web server, possibly using the Bluetooth to combine with an android and make a self driving go kart, but that seems a bit ambitious, especially considering most of the GPU acceleration isnt supported with Raspberry Pi.8
-
Me: *creates a new telegram bot*
User: Hey, compliments for the bot! How did you create that? Did you use HTML or other programming stuff?
Me: ...
The funny thing is that 1 week later I discovered that someone actually created a library to create your own bot with HTML and CSS too. -
my first ever public repo on github for @devRant community
devRant bot for Telegram
after being waiting to make some changes in the bot. I finally made it public.
https://github.com/puneetsngh/...
The bot will be fun for devRant community on Telegram plus it will also server as an example for bot creators on telegram app3 -
Right.. I spent the hours leading up to the year change by adding a YouTube to MP3 downloader into my Telegram bot. After a bit of fiddling it turned out okay, and the commit for it was mentioned to the last for the year 2020.
I mentioned this in one of my chats, and users came in with more issues. Told them it's the last commit for the year and I'll keep myself to it. I did adjust the code a bit though to fix those issues, awaiting a commit after midnight.
Midnight passes and 2020 turns into 2021.
I commit the new features, and quickly implemented another one I already thought of as well, but needed its own commit.
Quickly afterwards it turns out that the /mp3 feature actually breaks the bot somewhat, especially on long tracks. Users add a slew of 10h songs into what essentially became a long queue of single-threaded bot action (or rather lack thereof).
I made the /mp3 command accessible to myself only like I did with some other administrative commands already. Still no dice, the bot rejected the commands but executed part of the /mp3 command anyway.
I look a bit further into the code and it turns out that while I was restructuring some functions, I forgot to make the admin() function exit the script after it sends the rejection onwards. This was a serious security issue and meant that all authentication was void. Fortunately the chat did not realize this - one of the commands that became available as a result was literally a terminal on the bot's system.
I fix the issue in 7 commits after midnight total, 3 of which were related to /mp3 and admin(). We're now 1 hour after midnight.
Happy New Year everyone... :')6 -
*deploys another few Telegram userbots for my other Telegram accounts*
*finds a warning in a module it depends on, dev is a friend of mine so report it I guess, low priority as it doesn't affect anything*
*both of us agree that it still works and might very well be a clusterfuck in the bot*
*proceeds with deploying the bot*
Bot> Your API ID cannot be empty, refer to READ THE FUCKING DOCS.io for more information.
Well fuck you too bot!1 -
!rant
3 days ago I started my first open source project. Even though it is nothing special (its a Telegram Chat Bot in NodeJS) i am feeling quite proud of myself. I don't know why, but i felt like sharing it with you guys.
(If you are interested: https://github.com/CptPie/... )6 -
It has been a couple of weeks since some funny DevRant screenshot has started to appear on an Italian fun telegram bot xD1
-
A simple bot on Telegram
Just hit and trial
Wanted same for Facebook, some error while accessing token tho. :(1 -
It's 6pm here, running out of scotch. Writing a backend for telegram bot. Seems like I need to step out to get some scotch
-
Well, I just made a Telegram bot that allows you to slap people with a mention. This is what my life has become.
-
Walmart API.
Bigger image: https://i.imgur.com/LiVAG0T.png
P.S. In case you are wondering, the answer is NO. I am not creating a bot to purchase PS5. I am creating a bot to check if it's in stock and notify me in Telegram.5 -
I regularly get added by unknown people on telegram. Now, sometimes they're real people asking you to rate some hotels or put smth in a shopping basket in a specific webshop.
It's my hobby to figure out what their scam is. (I think just not paying, how would they do that anyway).
Also, you've bots. Doing acquisition and then ask you to contact them on a different number. I do this. Yolo. For fun.
But now, there's a Chinese girl that added me and I can't figure out if she's a bot or real. She did ask me to contact on a different number - like bot.. But she goes to sleep on Hong Kong timezones and I've let her tell me what was in a youtube video. She described well. Still, I don't trust.
She does have some inconsistenties in dot usage at end of sentence and stuff.
English, quite well but I think she uses translator if she's real. She said it's not her native language.
It drives me totally crazy not being able to figure out.
What are more ways to check if AI?23 -
I’m thinking about making a job bot that would take job offers and post them realtime to telegram group or wherever I want as they arrive posted on hr people linkedin profiles under certain tags.
-
A small webapp like sarahah (anonymous feedback) but it sends the anonymous reply to Telegram Bot using api2
-
Ok so 2 questions here:
(I’m not good at googling)
1. I want to run my telegram bot and some other really small things on a server. Do you have an idea what I could use. (Services or shy like a raspberry pi) it really doesn’t need much capacity
2. (Thank you for reading this long and helping me out) How can I download a website in nodejs and use sth. Like getelementbyid? -
I don't know if it counts, some weeks ago I wanted to publish my first telegram bot on github, so...
Well, I was quite nervous when I wrote it, and I didn't care about writing good code... That wasn't even passable... It looked like an american coffee... Washed, tastes bad, looks ugly...
I wrote it back in two days, changed module from telepot to python-telegram-bot (more pythonic), wrote a c extension for a xorshift algorithm and pushed it on github.
Well, that was quite satisfying, but I became pale when I noticed it didn't need to be restructured, but entirely rewritten1 -
My biggest dev sin in my rather short dev live would be my telegram bot written in node.js without any knowledge about JS. Running for almost 1 year without any error handling - oh I almost forgot I haven't documented the code - but the bot is open source, although I haven't worked on it in months1
-
Programming myself a telegram bot called SELENA using Python.
#Height of loneliness .
PS:It would be really nice if someone could help me with this by guiding me or sharing their code examples1 -
How do i make a telegram bot using python which would reply my contacts or people or tell them if i am busy or not in place of me? I am beginner in python and i don't know how to start this .
-
I made a telegram bot that gives cov19 statistics for every country around the world.
Check it, i name it @elbaronbot -
Yukki Music Bot
okay so, I'm bout to post my first rant and its basically about this telegram bot whose dev team I'm a part of, Yukki Music Bot.
It all started around April 2021 when most of us were busy streaming Netflix, chilling and locked up due to Covid that some people decided to make something interesting and for the community.
It was at first just a simple bot which just played music on call but now, due to the countless efforts and time by the Team Yukki, now you can even stream Ipl in telegram voice chat! and almost all of the music platforms are supported by Yukki >~<.
Check it out at @TeamYukki in GitHub!4 -
my government stores peoples car registration (name mobile number car plate number etc..) in a Microsoft access file locally. there is only one branch in the country to register ur car.
the file is on that computer, u can bribe the guy 20$ to copy it to ur USB.
so what should i do with the copy?
people used to make websites and apps that give u personal info of a person given his plate number (so u can call him and tell him to move his car if he blocks u and stuff 🤣)
but such sites and apps keep getting reported and closed.
i was thinking a telegram bot ? idk whats the best way to do it without being closed down7 -
Can you actually copy messages from a Telegram channel to another one without even being on the group and not having a bot? I'm having this client who actually made me work for this fucking bot and proceeds to tell me that he wanted something else which I'm not able to do... Like, how can you invade another channel like that? Dude what the fuck.1