SteamGifts bot to enter only for whitelisted games
I wish I would win all my followed and wishlisted games ;) I don't want win all the games in SG and this bot will apply only for whilelisted games.
This is my first project in GO (and there no some goish features like channels and coroutines - just syntax)
This is python implementation which inspired me to do this https://github.com/theWaR13/SteamGiveawayManager
config.json - bot config. Optional
profile
- If you want to parse your steam profile. You need only name, not whole URL. Optional.mail
- set smtp settings for sends some notifications (optional)smtp
- smtp serverport-num
- smtp server portusername
- smtp authorization username (mail will be sent from this email)password
- smtp auth password (not tested without auth)subjecttag
- tag in mail subject (i.e. [SG_BOT])recipient
- mail will be send to this emaildigest
- send daily digest for the previous day (or in panic message - current digest)httpauth
- http simple auth loginhttppwd
- http simple auth passwordweb-port-num
- http server listening port (default 8080) (don't forget to open it in firewall!)gameslist.json - Optional. Fill it with games. "SteamID":"Name", Name - optional, all game titles takes from gifts page: you can leave it empty: "") If no games loaded (profile + list) - bot stops
cookies.json Required. You need to autorize in SG through browser, go to the DevTools in it and copy all cookies (I think only session cookie works, but anyway). "Name":"Value:Domain:Path" (separated by colon) If you wish parse giveaways that points to /sub/ steam pages with age check, you have to set these cookies: "wants_mature_content": "1:store.steampowered.com:/", "birthtime": "60368401:store.steampowered.com:/", # about 1972/4/4 "lastagecheckage": "1-0-1972:store.steampowered.com:/"
To run as daemon (tested only for linux)
If you have some cloud functions service (AWS Lambda, Yandex.Cloud, etc) you could try to install this bot as cloud function. At this point you can install it on Yandex.Cloud (as I did). Frankly, there is 3 cloud functions: bot which checks, email sender and script with db seeding.
yandex.botinit-func.deploy.sh
- it prepares all mandatory filesbot-init-func.RunInitBotDB
as entry pointSTEAM_PROFILE
and YDB_DATABASE
(this is location from YDB) environment variablesgames (id:uint64, name:string)
, cookies (name:string, domain:string, path:string, value:string)
and digest (message:UTF8)
yandex.bot-func.deploy.sh
- it prepares all mandatory filesbot-func.RunSGBOTFunc
as entry pointSTEAM_PROFILE
and YDB_DATABASE
(this is location from YDB) environment variablesyandex.digest-bot.deploy.sh
- it prepares all mandatory filesdigest-func.SendDigest
as entry pointMAILER_SMTP
, MAILER_PORT
, MAILER_AUTH_NAME
, MAILER_AUTH_PWD
, MAILER_SUBJECT
, MAILER_RECIPIENT
environment variables for mailer creation and YDB_DATABASE
for DB connection