TheLovinator1 / discord-free-game-notifier

Send webhook to Discord when a new game releases on Steam, Epic Games Store, Ubisoft Connect or GOG.
GNU General Public License v3.0
27 stars 5 forks source link

ModuleNotFoundError #180

Closed ibrahimigdir closed 3 months ago

ibrahimigdir commented 3 months ago

\discord-free-game-notifier-master\discord_free_game_notifier\main.py", line 10, in from discord_free_game_notifier import settings ModuleNotFoundError: No module named 'discord_free_game_notifier'

I'm trying to start the bot using windows both in the admin folder So, I tried to start it on disk C and on the desktop, but it doesn't matter in both, I get the same error.

TheLovinator1 commented 3 months ago

Does it work if you do python -m discord_free_game_notifier.main instead of python .\discord_free_game_notifier\main.py?

ibrahimigdir commented 3 months ago

"I was running it with python .\discord_free_game_notifier\main.py, but it worked when I ran it with the first code python -m discord_free_game_notifier.main. Thanks.

I have two more questions:

TheLovinator1 commented 3 months ago

I reduced the logging so the big ball of text should not be a eyesore anymore.

  • Can we also run this code as web services on render.com or alternatives?

I have never used Render but probably if it can run Python code.

ibrahimigdir commented 3 months ago

I reduced the logging so the big ball of text should not be a eyesore anymore.

  • Can we also run this code as web services on render.com or alternatives?

I have never used Render but probably if it can run Python code.

Thank you logs, solved. I was also able to do it with render., thanks to Docker.

ibrahimigdir commented 3 months ago

Well, I want to ask one more thing. I want to localize this incoming message, that is, I want to make it Turkish, which is my own language. What can I do or can I do about that?

TheLovinator1 commented 3 months ago

Epic

https://github.com/TheLovinator1/discord-free-game-notifier/blob/master/discord_free_game_notifier/epic.py#L167 If you add ?locale=tr to the URL it looks like a few things get change to Turkish https://store-site-backend-static.ak.epicgames.com/freeGamesPromotions?locale=tr

Steam

image I haven't added a description yet so probably not worth it to translate?

https://github.com/TheLovinator1/discord-free-game-notifier/blob/master/discord_free_game_notifier/steam.py#L31

You can add &l=turkish to the URL but I don't know if game titles are localized https://store.steampowered.com/search/?maxprice=free&specials=1&l=turkish

GOG

Site does not support Turkish so things from GOG will get the English title image

Things added manually

I use steam.json, ubisoft.json and epic.json to add games that my bot fails to grab

If you want to use Turkish instead you will need to modify these to your own URL (may have to set up GitHub Pages for this to work), and then translate the file when I add new games: https://github.com/TheLovinator1/discord-free-game-notifier/blob/master/discord_free_game_notifier/epic_json.py#L156 https://github.com/TheLovinator1/discord-free-game-notifier/blob/master/discord_free_game_notifier/steam_json.py#L129 https://github.com/TheLovinator1/discord-free-game-notifier/blob/master/discord_free_game_notifier/ubisoft.py#L50

The files are created by modify the dict in the files above and then run each file (probably with python -m discord_free_game_notifier.steam_json (or other file names))