Discuss Scratch

mbrick2
Scratcher
1000+ posts

A way to detect mentions

I want to make a notif system that notifs me when my username is mentioned on the forums. U can use ocular to find posts with your username but is their a way to detect change in scratchDb or another way to do it








My Forums
ATs
Collabaration
My collabs
AIPoint
AspectOS
CoreOS
OddyseyOS
Cops and Robbers
#BringBackManagerRights
#ReturnRightsToManagers
#WeAreForManagerRights
#LetsRemindAboutMangers
#WeAreMangers
#MangersMustManage

The road to 1000 posts!
0 ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ 1000
80% complete

Banner Made By @Abcde26



Card Made By @Polygon
9pfs
Scratcher
100+ posts

A way to detect mentions

Just saying, in order to do that, you'd have to fetch thousands of topics every 30 seconds. Since you're wanting notifications, scratchdb would not work, since it uses cached data. Basically, short of having a bot account that is following every single topic, you couldn't even get the data fast enough. However, good luck figuring it out! It'd be better to try to get the admins to add notifications for forum mentions. Also, if you get the data, just use `“post”.includes(“@yourusername”)` to detect mentions.

Update to Chrome 98 immediately More info
Share


topic/571765 MUST be apologized for.
Turns out, it was!!!

mbrick2
Scratcher
1000+ posts

A way to detect mentions

9pfs wrote:

(#2)
Just saying, in order to do that, you'd have to fetch thousands of topics every 30 seconds. Since you're wanting notifications, scratchdb would not work, since it uses cached data. Basically, short of having a bot account that is following every single topic, you couldn't even get the data fast enough. However, good luck figuring it out! It'd be better to try to get the admins to add notifications for forum mentions. Also, if you get the data, just use `“post”.includes(“@yourusername”)` to detect mentions.
I mean notifs OFF SCRATCH








My Forums
ATs
Collabaration
My collabs
AIPoint
AspectOS
CoreOS
OddyseyOS
Cops and Robbers
#BringBackManagerRights
#ReturnRightsToManagers
#WeAreForManagerRights
#LetsRemindAboutMangers
#WeAreMangers
#MangersMustManage

The road to 1000 posts!
0 ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ 1000
80% complete

Banner Made By @Abcde26



Card Made By @Polygon
god286
Scratcher
1000+ posts

A way to detect mentions

You could have a script which searches in Ocular/ScratchDB every hour for your username newest-first.

meowclient
Typescript and ESM support
Kind-of good documentation
Easy to use
meowclient


                 _ ____  ___   __   
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
^ inspired by @Chiroyce, made with figlet
-EmeraldThunder-
Scratcher
1000+ posts

A way to detect mentions

If post IDs go up in order you could just record one as a starting point, every 30 seconds you could check to see if the post ID + 1 exists. If it does increment the ID and search the post for your username, if you find it, send a notification.

Coming soon.















Male | 14 | Flask | Scratch | Pygame | Christian
Empires of Scratch Mincraft server (bedrock and java vanilla survival) (Banner by sharkode)

Chiroyce
Scratcher
1000+ posts

A way to detect mentions

-EmeraldThunder- wrote:

If post IDs go up in order you could just record one as a starting point, every 30 seconds you could check to see if the post ID + 1 exists. If it does increment the ID and search the post for your username, if you find it, send a notification.
That's a pretty good idea - but looking at how active the forums are these days, you'd probably have to check lots of posts after 30 seconds… making it for a specific subforum would make it a bit easier…







April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
mbrick2
Scratcher
1000+ posts

A way to detect mentions

Chiroyce wrote:

(#6)

-EmeraldThunder- wrote:

If post IDs go up in order you could just record one as a starting point, every 30 seconds you could check to see if the post ID + 1 exists. If it does increment the ID and search the post for your username, if you find it, send a notification.
That's a pretty good idea - but looking at how active the forums are these days, you'd probably have to check lots of posts after 30 seconds… making it for a specific subforum would make it a bit easier…
I was thinking collabaration and suggestions








My Forums
ATs
Collabaration
My collabs
AIPoint
AspectOS
CoreOS
OddyseyOS
Cops and Robbers
#BringBackManagerRights
#ReturnRightsToManagers
#WeAreForManagerRights
#LetsRemindAboutMangers
#WeAreMangers
#MangersMustManage

The road to 1000 posts!
0 ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ ▒ 1000
80% complete

Banner Made By @Abcde26



Card Made By @Polygon
JoshAtticus
Scratcher
100+ posts

A way to detect mentions

That sounds like a cool idea, although because of limitations, it might not be possible through CLI

~~I'm JoshAtticus!~~
I enjoy scratching, playing with tech and online privacy(not google)
This account is in archived state, I don't post projects here, and I might not be very active with comments and forums
I have 2 new accounts: @OSMANiC Team & @OSMANiCBetas



^^Made with Figlet^^










Powered by DjangoBB

Standard | Mobile