yay, another roblox post
three years ago today, i made whamifier. it was a bot that would tweet any time an official roblox item got updated in any way. it served as competition to the infamously slow RPlusNotifier, and people loved it
it was my first, like, moment of fame i guess. it was the first time i made something people actually used and knew about, to an extent. but sadly, just months after it was created, roblox broke it by shadow-dropping an api change that made it impossible to work the way it previously did
since then, i've kinda just tweeted on it randomly because people still follow it, and i've thought about bringing it back, but didn't actually know how
it used to rely on the "recently updated" feature of the catalog which showed items that recently changed. that was replaced with "recently created", and that meant there was no way for whamifier to function as it did... maybe. eventually, whamifier was fully replaced by MrNotifier
the full story
that was a summary of what happened to whamifier, but now i'm going to talk about where it actually began, the details of that, and every major event. after that, i'll go into detail about the code behind it and stuff, i figure most reading this from the tweet won't be as interested in that
on june 20th 2022, one of my friends said "does anyone know the bot that notified every new limited", to which i responded "roli notifier or some shit", and another said "rolifier but it's really slow now"
that's what gave me the initial idea to make my own notifier, and the idea of using the "recently updated" feature was just a default in my head. the problem was that i didn't know how i'd get the information of an item BEFORE it updated so it could actually tell you what changed
on june 22nd (into june 23rd), another friend said i should make my own one, and while explaining my previous concerns, i realized that it could use the wayback machine to check the differences on the item. it was at this point i was suggested the name "whamifier", based on my discord bot named "whakama", and at this point i was sold and decided i'd give it a try tomorrow
later on june 23rd (into june 24th), i started working on whamifier. i initially worked on the update detection and wayback machine parts, then took a break. the messages are then unclear, but this is how i described how it works:
a few hours later, after lots of not talking about it so future shy couldn't figure out what i was doing, i had a working prototype
then i turned it into a discord webhook
and then, i proved it was faster than rplusnotifier
so, by june 25th, i considered it "done". my friend suggested i hand it over to rolimon to get the roli contributor badge, but that's pointless and i'd want money lol. at this point, i was ready to release it, but i was worried it'd spontaneously combust because i knew my programming skills weren't that sharp
i tested in the server for a few more days, mainly comparing it to rolifier, made it more stable and improved the speed, and then i created a twitter account on june 29th
my friend then started advertising the hell out of it in rplusnotifier's replies, much to my dismay because i was very embarrassed about this
it was beautiful, i loved showing off the "seconds late" thing
from here, it was largely smooth sailing. it was gaining followers, becoming less and less of a prototype and more of a real notifier. i had largely replaced wayback machine lookups with it's own catalog item database, and i made it more stable. i bought a little mini pc to host it on so i wouldn't have to run it on my pc, and it was awesome
it was great for months, very minor hiccups. maintenace here and there, and the only real downtime was when i went on vacation in september 2022, and i didn't have access to debug whamifier since i hadn't brought my pc. i thought it'd be fine, until whamifier crashed while i was hundreds of miles away from my home. so for a few days, i had to manually tweet notifs. somehow, people were fine with this and let it slide...
i had some minor competition with other bots, which also used the "recently updated" sort, and we had some lighthearted competition, though whamifier eventually won
it was all going so well... in late 2022, i was getting ready to start expanding and make a big discord bot and let people invite it to their servers. as i was working on this...
on november 30th, they shadow-dropped a change to the catalog, which removed the "recently updated" sort. they completely replaced it with "recently created", even overriding it's old sort type id. whamifier was immediately affected, but i held on
i held on for weeks, i don't even know why. all it did was tweet new items for a while. then finally, after a whole 37 days, on january 6th 2023, i killed it. though you can tell i was kind of over it at this point
from this point on, i've just randomly tweeted on the whamifier account for no reason. this would've been funny, i was legitimately mad lol
this of course also killed all of my actual competition, and now we are one in the same
so now we're here, i thought about bringing back whamifier many many times, but it's just too complex now. i don't know how the new notifiers do it, and i'm not sure if i'm interested in maintaining something like this anymore anyways
anyways now let me explain in detail how it worked
the code behind whamifier
to be honest, this was the hardest part of writing this post. i was so terrible at programming, and my horrific code formatting does not help at all in understanding it. all of this was written in 2022, and does NOT reflect my current work... in terms of quality... the logic itself was pretty good
i wrote whamifier in javascript, specifically for the node.js runtime. this wasn't my first time using it or anything, i just really sucked lol
i considered cleaning up the formatting in the snippets, but i think it's important to show how bad this code really was. it wasn't even just the formatting, i just did some really weird practices too. every code snippet you see is unmodified, copy pasted from the whamifier source
i'm going to walk through the latest version of the codebase, which was the last version before it broke. also i'm not disabling my theme this time so you will have to live with the clash against the black background when i show screenshots 
let's get to the one of the main logic functions, getdiff
getdiff
this was written really badly, and i don't really understand what i'm looking at here
it first loads the local catalog item database into memory from disk (yes, on every item difference check, why?), then determines which api to use based on whether its an asset or a bundle. then, it fetches that api, and does some logic again based on whether its an asset or a bundle
the asset logic uses the https://api.roblox.com/Marketplace/ProductInfo legacy api endpoint, which is largely the same as what MarketplaceService:GetProductInfo() returns in the lua api, and then it modifies it, removes all of the useless stuff and turns it into a standard format:
console.log(`item [${currentinfo.Name}] is an asset, reconstructing metadata`)
updated = Date.parse(currentinfo.Updated)
currentinfo.Description = currentinfo.Description.replace(/\r\n/g, '\n')
currentinfo.Type = type
delete currentinfo.TargetId
delete currentinfo.ProductType
delete currentinfo.ProductId
delete currentinfo.Creator
delete currentinfo.IconImageAssetId
//delete currentinfo.Updated
delete currentinfo.Sales
//delete currentinfo.IsPublicDomain //apparently this has nothing to do with copyright and means free, because this is actually an insanely old library api that just happens to work very shittily on catalog items
delete currentinfo.Remaining
delete currentinfo.ContentRatingTypeId
delete currentinfo.MinimumMembershipLevel
delete currentinfo.PriceInTickets
delete currentinfo.Created //no reason to store it, late calculating relies on updated (not stored either) and it only costs more file space storing this
//delete currentinfo.IsNew //note: the reason IsNew is stored is to prevent "something changed" from happening when IsNew changes
//i store assettypeid because fuck you its cool
if(currentinfo.IsLimited || currentinfo.IsLimitedUnique || (currentinfo.PriceInRobux === 0 && currentinfo.IsForSale === false)) currentinfo.PriceInRobux = null
if(currentinfo.IsPublicDomain === true) {
currentinfo.IsForSale = true;
currentinfo.PriceInRobux = 0;
}
delete currentinfo.IsPublicDomain
currentinfo = {
id: currentinfo.AssetId,
name: currentinfo.Name,
description: currentinfo.Description,
typeId: currentinfo.AssetTypeId,
priceInRobux: currentinfo.PriceInRobux,
isNew: currentinfo.IsNew,
forSale: currentinfo.IsForSale,
isLimited: currentinfo.IsLimited,
isLimitedUnique: currentinfo.IsLimitedUnique,
rootType: currentinfo.Type
}
the bundle logic uses the more modern https://catalog.roblox.com/v1/bundles/BUNDLE_ID/details endpoint, then transforms it similarly:
console.log(`item [${predata.name}] is a bundle, reconstructing metadata`)
updated = null
currentinfo = {}
currentinfo.id = predata.id
currentinfo.name = predata.name
currentinfo.description = predata.description.replace(/\r\n/g, '\n')
currentinfo.typeId = bundleNameTypes[predata.bundleType] || 1
currentinfo.priceInRobux = predata.product.priceInRobux
currentinfo.isNew = false
currentinfo.forSale = !(predata.product.noPriceText === 'Offsale')
currentinfo.isLimited = false
currentinfo.isLimitedUnique = false
currentinfo.rootType = 'bundles'
if(predata.product.noPriceText === 'Free') {
currentinfo.forSale = true;
currentinfo.priceInRobux = 0;
}
//fuck you (BLOG: yes this was a comment i wrote, i have no fucking idea why it's here)
if you're confused so far, don't worry, i am too. now, let's look at the logic for comparing it to it's last known state
first, it checks if it's already a known item in the local database. if it is, it compares it to it's current info by JSON.stringifying it and comparing the strings. if it doesn't find any, it just returns. otherwise, it loops through the keys and stores the differences, then returns the item with its differences
otherwise, if it's not a known item, it checks wayback machine. to do this, it uses a function i wrote called rbxFormat, which takes the item and it's current info, and turns it into a roblox catalog url without making any requests. to do this, it simply makes the url then takes the item's name and turns it into the stripped down one you see in catalog urls
after that, it fetches that url with browser headers, and scrapes it using JSDOM. it first checks if there is an element with the id error, or if the final url is a dateless one (meaning there's no archive), or if the archived url is new and it only has one capture
in that case, it returns nothing (which makes it assume its a new item). otherwise, it scrapes all the html and converts it into that standard format, then does all the comparison like before (i'm so sorry for this code formatting)
var infobox = dom.window.document.getElementById('item-container')
waybackinfo.id = id
waybackinfo.name = infobox.getAttribute('data-item-name')
waybackinfo.description = dom.window.document.getElementsByClassName('description-content')[0].textContent
waybackinfo.typeId = currentinfo.typeId
waybackinfo.rootType = type
waybackinfo.isLimited = !!dom.window.document.getElementById('resellersLink')
waybackinfo.isLimitedUnique = (infobox.getAttribute('data-is-limited-unique').toLowerCase()==='true') ? (infobox.getAttribute('data-is-limited-unique').toLowerCase()==='true') : !!dom.window.document.getElementsByClassName('icon-limited-unique-label')[0]
waybackinfo.forSale = !dom.window.document.getElementsByClassName('btn-fixed-width-lg')[0].disabled
if(waybackinfo.forSale === true && !!dom.window.document.getElementsByClassName('text-robux-lg')[0]) waybackinfo.priceInRobux = parseInt(dom.window.document.getElementsByClassName('text-robux-lg')[0].textContent.replace(/,/g, '')); //onsale and not limited
else if(waybackinfo.forSale === true && !dom.window.document.getElementsByClassName('text-robux-lg')[0]) {
waybackinfo.priceInRobux = 0
waybackinfo.forSale = true
} //free
else waybackinfo.priceInRobux = null;
if(waybackinfo.isLimited === true || waybackinfo.isLimitedUnique === true) {
waybackinfo.priceInRobux = null;
waybackinfo.forSale = true;
if(waybackinfo.isLimitedUnique === true) waybackinfo.isLimited = false
}
if(dom.window.document.getElementsByClassName('btn-fixed-width-lg')[0].textContent.includes('Get')){
waybackinfo.forSale = true
}
if(waybackinfo.description === 'No description available.') waybackinfo.description = '';
waybackinfo.description = waybackinfo.description.replace(/\r\n/g, '\n')
waybackinfo.isNew = false
if(dom.window.document.getElementsByClassName('asset-status-icon')[0] && dom.window.document.getElementsByClassName('asset-status-icon')[0].children[0] && dom.window.document.getElementsByClassName('asset-status-icon')[0].children[0].textContent.includes('New') && type !== 'bundles') waybackinfo.isNew = true
so this function is the one used to determine if an item is changed, now let's get to the one that actually does the checking: whamify
whamify
first, it checks the recently updated sort at https://catalog.roblox.com/v1/search/items?category=All&creatorTargetId=1&includeNotForSale=true&limit=28&sortType=3
if it's the same as before, it just returns. otherwise, it saves that response, and filters for items that weren't in the list before. now, here's something fucking insane:
I DON'T KNOW WHAT THIS DOES. i have no fucking idea what this is doing. i just remember that every line is commented because i was doomed to the hell that is debugging this sentient pulsating mass of hellcode. i don't know what this is. i'm sorry. if you came here to learn how whamifier works, you're out of luck.
now, notably, it is obviously using getdiff to figure out the item differences. all i can tell is that this is some sort of way for it to do retries in event of failure? it's purely unreadable, i barely knew what await was, and didn't know how to use it properly. i'm so sorry for this man
now that we're past whatever that is, oh wait there's more:
that image is cut off because it's huge. i couldn't tell you why it's in an interval. i don't know. but this is a crucial part of the code that converts the differences array to human words, so i'll try to understand that part
it loops through each item, then first, it checks if there's no differences or no archive. then, it checks if there's no copy in the local db. if so, it checks if its a free item and adds that to the string, then gets the type name, then simply pushes "new (free?) (type)" to the array and that's it. otherwise, if there's still no differences, but there is an archive, it'll just say "something changed"
otherwise if there are differences, if the only difference is that it now has the "new" tag, it just ignores that. else, it starts going through the difference and converting them to words. this is largely useless to document since it's just logic, but i do like this one which tells you if it's an item promotion:
if((!difference.new.toLowerCase().includes('promo ') && !difference.new.toLowerCase().includes('promotion ')) && (difference.old.toLowerCase().includes('promo ') || difference.old.toLowerCase().includes('promotion '))){
whatchanged.push('promo ended')
} else if((difference.new.toLowerCase().includes('promo ') || difference.new.toLowerCase().includes('promotion ')) && (!difference.old.toLowerCase().includes('promo ') && !difference.old.toLowerCase().includes('promotion '))){
whatchanged.push('promo started')
}
then after all of that, it checks if anything has changed (again? idk if this code ever even runs), and if not, it just says "something changed"
then, it fixes a flaw where an item going limited also registers as it going onsale/offsale, and removes that to make it cleaner
then it calculates how late it was, updates the local database, adds the item and it's (now human-readable) differences to an array, and finally notifies for each item
that was behind the code that powered whamifier. i considered releasing the source code, but it's so bad that i really don't want anyone to use it as an example or a reference or anything. believe me, you don't want it
bringing it back? (no)
as much as i want to bring it back, i don't have time to focus on that right now, and you should really use MrNotifier instead, since it's already established and working
but, over the years, i did have some ideas of how i could bring it back
spying on roblox's inventory
this would work, but only for limiteds. roblox's inventory is kind of private, kind of not, i don't know why, but you can use the api to see their limiteds. this would allow whamifier to return as a limited notifier, but that's largely useless nowadays
using proxies
this is barbarian, but this is my kind of thing. i'd simply collect every existing asset and bundle owned by roblox (i did this in the past for the local db), then check recently created + hammer the hell out of roblox's api with proxies to see if those items update
this one was actually feasible, but it'd cost me money to run and by then, i wasn't so sure people would actually want a notifier with the rise of limited ugcs and things like that. as well as that, MrNotifier largely replaced whamifier anyways. i feel like i could've done it though, i'm a little sad that i never did
also, roblox may not like me for that, but considering my past endeavors, they probably already don't like me lol
that's it
that is the making of whamifier i guess
i've been meaning to write about this for a while, but i was too shy to reveal my identity on the whamifier account and just somewhat lazy. but, today is a pretty fitting day for this, so i did it
i was only 14 years old when i started writing whamifier, it's weird that i'm 17 now. some people would say it's impressive that a 14 year old did that, but idk, the code is not good at all lol
anyways sorry for how cramped this post is, i wanted to put a lot of screenshots and code snippets and stuff but that does mean it's kind of hard to follow lol
okay idk what else to say happy 3 year whamifier day goodbye
