Open x1xvictorx1x opened 3 months ago
It requires a little setup to run, I'll try to go into as much detail as I can here to describe the process.
> git clone https://github.com/alexloney/reddit_marvel_snap_card_bot.git
Cloning into 'reddit_marvel_snap_card_bot'...
remote: Enumerating objects: 313, done.
remote: Counting objects: 100% (95/95), done.
remote: Compressing objects: 100% (56/56), done.
remote: Total 313 (delta 63), reused 54 (delta 39), pack-reused 218
Receiving objects: 100% (313/313), 77.81 KiB | 12.97 MiB/s, done.
Resolving deltas: 100% (161/161), done.
> cd reddit_marvel_snap_card_bot
client_id
and client_secret
) as you'll need them later.config.json.sample
file to config.json
> copy config.json.sample config.json
1 file(s) copied.
config.json
. The result should look something like this:
{
"client_id": "xxxxxxxxxxxxxxxxxxxxxx",
"client_secret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"user_agent": "user_agent_string",
"username": "username",
"password": "xxxxxxxxxxxxxxxxxxxx"
}
python snap_bot\main.py --config-file config.json --subreddit <subreddit>
You should then see output similar to the following
2024-05-07 09:52:18,582 INFO Starting Reddit bot
2024-05-07 09:52:18,584 INFO Subreddit: <subreddit>
2024-05-07 09:52:18,584 INFO Config File:
2024-05-07 09:52:18,584 INFO DB Update Timeout: 86400
2024-05-07 09:52:18,584 INFO Max Fuzzing Distance: 2
2024-05-07 09:52:18,584 INFO Exact Match Threshold: 3
2024-05-07 09:52:18,585 INFO Dry Run: False
2024-05-07 09:52:18,585 INFO Debug: False
2024-05-07 09:52:18,585 INFO Client ID: xxxxxxxxxxxxxxxxxxxxxx
2024-05-07 09:52:18,585 INFO User Agent: user_agent_string
2024-05-07 09:52:18,585 INFO Reddit Username: username
2024-05-07 09:52:18,585 INFO Loading card lookup database
2024-05-07 09:52:19,880 INFO Next DB update in 86400s
2024-05-07 09:52:19,880 INFO Establishing Reddit connection (<subreddit>)
2024-05-07 09:52:19,880 INFO Using supplied id/secret/agent/user/pass
2024-05-07 09:52:19,881 INFO Reddit connection established
I have a few final notes for you:
client_secret
, client_id
, user_agent
, username
, and password
. There are two other ways to provide them. You may provide them from command-line arguments (e.g. --client_id <id>
, --client_secret <secret>
, etc) or you may provide them via environment variables. I personally find it easiest to store them in a config.json
file to provide, so that is the example above I gave--help
to see them allFinally, if you're simply wanting this bot to run on your subreddit, you could also let me know what subreddit you would like for it to run on and I could set up my deployment to also handle that subreddit.
I honestly dont know how to run it i downloaded the folder placed it in the desktop and then tryed running that command and get this message "C:\Users\User\AppData\Local\Programs\Python\Python38\python.exe: can't open file 'snap_bot/main.py': [Errno 2] No such file or directory PS C:\Users\User"