Pages:
Author

Topic: [TELEGRAM] Yet Another BitcoinTalk Notification BOT (merits, mentions, topics,+) - page 23. (Read 20325 times)

legendary
Activity: 2380
Merit: 17063
Fully fledged Merit Cycler - Golden Feather 22-23
Wow just wow!

I just received 1000 merits from Satoshi! But I cannot find the original post @TryNinja!
I need to know where I shall look, as I am not able to find the post on the forum!

Please help!


legendary
Activity: 1162
Merit: 2025
Leading Crypto Sports Betting & Casino Platform
Nice try.
But this year you only got me to believe that the Bot was having some kind of glitch.  Wink

Nonetheless, I must admit that if you had done some testing beforehand and some little coding to make the message to coincide with the actual number of merits of each user, you could have pulled off something very memorable.

Perhaps next year  Smiley

By the way, thanks for this bot and for making user's life easier with it.
hero member
Activity: 798
Merit: 702

Goddamit, did I really fk this up? Telegram's HTML parser didn't work for some reason. Cry Cry

It was supposed to look like this:



Next year's, maybe... Grin Grin


edit: It was @Synchronice's idea, so all credits to him. Thanks! Grin

What a great way to start the new month! I received the notification and was like, "Who the f*ck gave me 50 merits?🤷" I tried to click the link about three different times, but it kept taking me to YouTube.
If not for this post, I wouldn't have known how tricky our Tryninja can be.

Happy new month to you, @TryNinja, and every other member out there.  
hero member
Activity: 2520
Merit: 952
Never gonna give you up instantly gave it to me. Had html worked properly and merit count was in addition to current of user more users would have fell for it.

https://talkimg.com/images/2023/05/14/blobe965304381c3a307.png
copper member
Activity: 1526
Merit: 2890
Goddamit, did I really fk this up? Telegram's HTML parser didn't work for some reason. Cry Cry

It was supposed to look like this:



Next year's, maybe... Grin Grin


Hahaha still you got me there!

I had to go back and check my merit history, then I searched through my posts. And I didn't stop there - I even looked up Satoshi's last active date and his merit history.

So, overall, you won this one.

I'd rate it even higher than theymos's April prank, because that one was predictable, but this was a complete surprise.
legendary
Activity: 2758
Merit: 6830
Yeah, you should report to telegram for not working when it needed most. Telegram played with you. You git fooled by Telegram. So, I would say Congratulations to Telegram Team for successfully fooling TryNinja.
Nah, for some reason I was escaping the HTML of the message, and the last time I sent a "global message" was when V1 migrated to V2 (so some years ago...). My fault for not testing it. Tongue
hero member
Activity: 518
Merit: 547
Goddamit, did I really fk this up? Telegram's HTML parser didn't work for some reason. Cry Cry

It was supposed to look like this:



Next year's, maybe... Grin Grin

Yeah. You did it.
I also got the same as this.
First of all, I never had close to a thousand merits, and then I don't think Satoshi will be back in the future. Yeah, you should report to telegram for not working when it needed most. Telegram played with you. You git fooled by Telegram. So, I would say Congratulations to Telegram Team for successfully fooling TryNinja.

I had some crazy Idea for theymos. But, I don't know if he will dare to do it. Imagine Satoshi returned and posted hey I am Back on 1st April.  Grin
legendary
Activity: 2758
Merit: 6830
Nice try @TryNinja but I don't think I'll be falling for anyone's April fool today.



The description gave it away. Grin
Goddamit, did I really fk this up? Telegram's HTML parser didn't work for some reason. Cry Cry

It was supposed to look like this:



Next year's, maybe... Grin Grin


edit: It was @Synchronice's idea, so all credits to him. Thanks! Grin
hero member
Activity: 700
Merit: 541
Bitcoin Casino Est. 2013
Nice try @TryNinja but I don't think I'll be falling for anyone's April fool today.



The description gave it away. Grin
legendary
Activity: 2240
Merit: 3150
₿uy / $ell ..oeleo ;(
@fillippone If you activate the  "Show a popup when you receive new messages?" option in the PM setting you get  a pop-up every time you get a message. No way to miss one out.
hero member
Activity: 882
Merit: 860

As an example, I made a very simple bash script that triggers a notification if you have any unread personal messages:
<...>

Could be useful for custom self-hosted solutions (e.g that require authentication, like the example above) or maybe some kind of subscription newsletter? For example, a signature manager or company could take API keys from interested users and send announcements en mass.

Let me know if you have ideas for a plugin you would like to use!



Thanks everyone for the kind words. Smiley

Sorry, I am dumb.
Does this mean I can activate a warning for my incoming PM? That would be great, as I often miss those.
If not, this is because that requires the bot to know my forum password, thus being too risky?



I don't think it's dangerous, it's a bash file that you can run on your pc or raspberry. I think it's a pretty useful script if you receive many personal messages, not very useful if you receive a PM a year, however it's an excellent initiative @TryNinja congratulations
hero member
Activity: 518
Merit: 625
Pizza Maker 2023 | Bitcoinbeer.events


Might be a bit too much for some people so a python or nodejs script should be easier to use (I can probably make one later if anyone is interested).

Well, I think this is beyond my possibilities for the moment.
I will point my fellow friend @babo toward this, and I will ask him to tinker with this. But I guess I will have to check my PM's manually!

No if you edit the script as tryninja has indicated you don't need to do it manually.  Too bad I have my pc out of order otherwise I could have tried Fil.


You don't have the active forum option, so that when you receive a DM, you also receive an email notifying you?
Profile > Notifications and Email > [check] Receive forum announcements and important notifications by email.

Of course it's not the same thing, but there's always some notification when you receive a DM. In this case to your email.

exactly, I also always receive an email when someone contacts me in PM
legendary
Activity: 1862
Merit: 5154
**In BTC since 2013**
I will point my fellow friend @babo toward this, and I will ask him to tinker with this. But I guess I will have to check my PM's manually!

You don't have the active forum option, so that when you receive a DM, you also receive an email notifying you?
Profile > Notifications and Email > [check] Receive forum announcements and important notifications by email.

Of course it's not the same thing, but there's always some notification when you receive a DM. In this case to your email.
legendary
Activity: 2380
Merit: 17063
Fully fledged Merit Cycler - Golden Feather 22-23


Might be a bit too much for some people so a python or nodejs script should be easier to use (I can probably make one later if anyone is interested).

Well, I think this is beyond my possibilities for the moment.
I will point my fellow friend @babo toward this, and I will ask him to tinker with this. But I guess I will have to check my PM's manually!
legendary
Activity: 2758
Merit: 6830
Understood in principle, but I have no idea on how to implement this.
Is there any guide on how to do that? Maybe @babo can help on this?
My script was made in bash, so you could run it if you're on linux, macOS, or if you have something like wsl2 on windows.

1. Save the script as supernotifierDM.sh or whatever you want and fill in the credentials at the top.
2. Make it executable with: chmod +x supernotifierDM.sh
3. Run at any time with ./supernotifierDM.sh

Or add it to a cronjob so it runs every X hours:

1. Run: crontab -e
2. Choose an editor (e.g nano)
2. Add the crontab rule at the bottom of the text file, for example, every hour: 0 * * * * /root/supernotifierDM.sh

https://www.geeksforgeeks.org/how-to-run-bash-script-in-linux/
https://phoenixnap.com/kb/set-up-cron-job-linux



Might be a bit too much for some people so a python or nodejs script should be easier to use (I can probably make one later if anyone is interested).
legendary
Activity: 2380
Merit: 17063
Fully fledged Merit Cycler - Golden Feather 22-23
Sorry, I am dumb.
Does this mean I can activate a warning for my incoming PM? That would be great, as I often miss those.
If not, this is because that requires the bot to know my forum password, thus being too risky?
You can do anything you want on your own machine/server and trigger notifications with a simple POST request.

The script in question runs locally on your device, logins to your account, checks for any unread DM (if there's a number next to "My Messages" on the navbar), and triggers a notification through the bot. All the bot sees is that you triggered a notification, no forum credentials leave your device.

I made it very quickly only for showcasing, though, so it's missing a bunch of things (i.e every time you run it, it will let notify you of the same DM if you didn't read it in the meanwhile). But anyone can run it every few hours through a cronjob, for example.

Understood in principle, but I have no idea on how to implement this.
Is there any guide on how to do that? Maybe @babo can help on this?
legendary
Activity: 2758
Merit: 6830
Sorry, I am dumb.
Does this mean I can activate a warning for my incoming PM? That would be great, as I often miss those.
If not, this is because that requires the bot to know my forum password, thus being too risky?
You can do anything you want on your own machine/server and trigger notifications with a simple POST request.

The script in question runs locally on your device, logins to your account, checks for any unread DM (if there's a number next to "My Messages" on the navbar), and triggers a notification through the bot. All the bot sees is that you triggered a notification, no forum credentials leave your device.

I made it very quickly only for showcasing, though, so it's missing a bunch of things (i.e every time you run it, it will let notify you of the same DM if you didn't read it in the meanwhile). But anyone can run it every few hours through a cronjob, for example. Or make their own.
legendary
Activity: 2380
Merit: 17063
Fully fledged Merit Cycler - Golden Feather 22-23

As an example, I made a very simple bash script that triggers a notification if you have any unread personal messages:
<...>

Could be useful for custom self-hosted solutions (e.g that require authentication, like the example above) or maybe some kind of subscription newsletter? For example, a signature manager or company could take API keys from interested users and send announcements en mass.

Let me know if you have ideas for a plugin you would like to use!



Thanks everyone for the kind words. Smiley

Sorry, I am dumb.
Does this mean I can activate a warning for my incoming PM? That would be great, as I often miss those.
If not, this is because that requires the bot to know my forum password, thus being too risky?

legendary
Activity: 2758
Merit: 6830
New Update

You can now make your own scripts/plugins and programmatically trigger custom notifications through an API endpoint.

1. Run /api and grab your API token.
2. Trigger notifications with the endpoint:

Code:
POST https://api.ninjastic.space/notification
{
  "api_key": "XXXXXXXXXXXXXX",
  "message: "You have 1 new message from satoshi\n\nCheck now!"
}

Style the message with HTML tags supported by telegram: https://core.telegram.org/api/entities#allowed-entities

As an example, I made a very simple bash script that triggers a notification if you have any unread personal messages:



Code:
#!/bin/bash

forumUsername=""
forumPassword=""
forumCaptchaCode=""
supernotifierApiKey=""

login=$(curl -s -c cookies.txt -X POST -L \
  -H "Content-Type: application/x-www-form-urlencoded" \
  -d "user=${forumUsername}&passwrd=${forumPassword}&cookieneverexp=on&hash_passwrd" \
  --url "https://bitcointalk.org/index.php?action=login2;ccode=${forumCaptchaCode}"
)

page=$(curl -s -b cookies.txt --url https://bitcointalk.org)

messages=$(echo "$page" | grep -oP 'My Messages \[\K\d+(?=<\/strong>\])')

if [ -z $messages ]; then
  messages=0
fi

if [ $messages -gt 0 ]; then
  curl -s -X POST \
    -H "Content-Type: application/json" \
    -d "{ \
      \"api_key\": \"${supernotifierApiKey}\",
      \"message\": \"You have ${messages} new personal message(s)!\n\nhttps://bitcointalk.org/index.php?action=pm\"
    }" --url https://api.ninjastic.space/notification
fi

Could be useful for custom self-hosted solutions (e.g that require authentication, like the example above) or maybe some kind of subscription newsletter? For example, a signature manager or company could take API keys from interested users and send announcements en mass.

Let me know if you have ideas for a plugin you would like to use!



Thanks everyone for the kind words. Smiley
legendary
Activity: 3570
Merit: 1959
@tryninja Your bot, my dear friend, has become a real bomb. Nothing comparable has been done or thought about, for example I use it all the time and it's very comfortable.
It is also very well made, quick to respond and never breaks.
A great job

yes you are absolutely right, it is really a bomb! now I can't do without it if I want to stay up to date on the topics that interest me while I'm not connected to the forum! congratulations from me too, I think the bot is perfect in all its functions

This is absolutely 100% bomb as you guys have said. If I have someone to talk to in person then this is what I would say to that person "You have no idea how much TryNinja's BOT help me in this forum", I always on look out whenever someone mentioned me and I would open the link right away to reply to that person. I never experienced any problem for quite some time even there are new features that TryNinja added to the bot.

Don't forget to throw some sats at the donation address so we can all keep it going!... I'm overdue for my yearly donation myself! Grin

Thanks again @TryNinja
Pages:
Jump to: