#automatic alerts
40 messages · Page 1 of 1 (latest)
Oh yea it would b cool if u could favorite shop items in shops for it to notify u when its in stock so it wouldnt constantly give u notifs for every shop when u dont need to look at the shop
i have a bot for this on a private server, though it doesn't include server exclusives (as i dont care for lemons/mushrooms/grapes + it would take a few hours to setup)
ooo id love to see it
it's just this, done using playwright.sync_api & BeautifulSoup in Python where it loads the page, clicks shift + 1, clicks the shop button & saves the HTML. i also added a command to create & assign roles as needed. i could probably do it better by reverse engineer it to predict the shop rotation as well as get the server exclusives (which cannot be gathered through HTML through a headless browser). maybe you know of the exact function to call for in console or something to make it more reliable? as of know it is about 3-4 seconds late to collect relevant stock and pass it through
boom! ar0man has transferred 2000 bread to @golden pagoda
dude. that's wild
i'm very impressed
@golden pagoda we're thinking of making something like this an official part of the Magic Circle app if you add it to your discord server
what server is your bot in? just you and your friends?
ye, i only made it to work in a specified server because it's easier than to setup a database and all that when i wasn't planning on distributing it
you def should, that'd be neat (:
i also tried through direct API calls but as far as i know discord wouldn't be too happy about that as it probably counts as selfbotting (which is needed to get server exclusives, for example) & as mentioned i couldn't find the relevant algorithm to predict the stock refresh
we don't expose the stock refresh algorithm to the client for obvious reasons. you could probably find a way to connect to the server via a websocket - especially if you did it from the web at https://magiccircle.gg
the discord stock thing would be challenging, buuuuut you can join discord rooms from web
so you could probably figure it out that way
i assume all stock is sent regardless if you can buy it or not there then? i didnt even think about joining rooms that way. i only discovered you had a website the last second, hence the weird workaround using a headless browser & just read its content as the shop updates
ah hmm i don't think we send stock info if you can't buy it there
but if you connected to a server that had those things
you'd be able to see the stock, even though you're not technically on discord
we might change this in the future but the "are you in a server that can spawn this thing" check is based on the discord server where the activity is running
althogh now i think about this, it'll be hard for you to keep that room alive, since you can't initiate it programmatically afaik
BUT if you ignore server exlcusive stuff
it's probably a lot easier to just write a little headless magic circle client and connect via websockets and fetch the stock info
interesting idea, do you connect through the web using the room id or am i missing something obvious?
on the web, the room ID just comes from the url
magiccircle.gg/r/normie for example
you can put whatever you want there
that makes it a LOT easier to get exclusives, though i dont have a server with all exclusives so i'd have to use two instances but at least it works for all but grapes (: ty for this info lol
though one issue im having joining directly to the room is i get this popup
every time
im not sure why
you shouldn't need to sign in for this
you can play 'anonymously' on web
you can't save any progress but it'll at least let you see the shop
simply connecting to (nvm) (room name) grants me this prompt every time... i dont understand why though
nvm turns out im just dumb
xD
ty for the help, it now works for all server exclusives :D
nice!!