GithubHelp home page GithubHelp logo

robojumper / steam_workshop_discord Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 4.0 16 KB

A python script that posts new mods from the Steam workshop to Discord channels.

License: Apache License 2.0

Python 100.00%
steam steam-workshop discord python workshop webhook

steam_workshop_discord's Introduction

steam_workshop_discord

A python program that polls the Steam workshop of specified games for new mods and posts them to a Discord channel using a webhook.

grafik

Dependencies

  • Python 3.5+
  • toml (python3 -m pip install toml)

Setup

  1. Generate a Steam Web API key and one (or more) Discord webhook(s).

  2. Determine the Steam ID of the games whose workshop pages you are interested in.

  3. Create a copy of config.toml.template named config.toml, open it with a text editor, fill out the information.

  4. Create a cron job (or find a dfferent scheduler) that regularly runs the script.

Inner workings

The script maintains a list of all the mods it has posted to each channel. Whenever it is run, it determines the workshop pages it needs to fetch, requests the ten latest mods from each page. For each channel, if the channel has no recorded mods, those mods are listed as recorded. Otherwise, the new mods are filtered, and author+mod information is requested. Using mod and author information, a message is assembled, which is then posted to each channel that needs it. Only upon a successful (HTTP 204) request, the mod is recorded as posted.

Compatibility policy

New versions of this script may break compatibility with previous deployments. For updates to running deployments, the author recommends configuring the new deployment without a known_mods file, running the old version one final time, then running the new deployment once immediately. As of the current version, the script will never post mods to a channel if the channel hasn't been recorded in known_mods, so there will be no duplicate posts.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

steam_workshop_discord's People

Contributors

robojumper avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

steam_workshop_discord's Issues

Can this be used for specific mods?

can i place the ids of the workshop instead of the game ids.
Would be great if we can have it that way. would be like the only one that's able to do it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.