steambot


Namesteambot JSON
Version 1.2.6 PyPI version JSON
download
home_page
SummaryA Discord bot for Steam news feeds.
upload_time2023-03-21 23:03:22
maintainer
docs_urlNone
author
requires_python>=3.9
license
keywords discord rss steam bot news
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SteamBot

## Description

Steam provides RSS feeds for all the apps in its database, and you could use a generic RSS bot to post them to Discord.
But I was not happy with the awkward format of the feeds, often producing large walls of text and titles like "1234 RSS Feed".

By making SteamBot specifically for Steam, it affords some features:
- Search for apps by name in the Steam database.
- Show the app's name and image in every post.
- Include a link to the web version of the news feed.
- Limit the text to a few hundred characters to avoid the wall of text effect.

## Installation

### On Windows
```
py -m pip install steambot
```

### On Linux
```
pip3 install steambot
```

## Quick start

### Running the bot
1. Make a folder for SteamBot and `cd` into it.
1. Run `steambot index`
1. While that is doing it's thing, open another console and run `steambot bot`
   Since this is the first time it's run, it creates `appsettings.json`, tells you to replace YOUR_DISCORD_BOT_TOKEN_HERE in that file, and then exits.
1. Log in to the [Discord developer portal](https://discord.com/developers) and create an application with a bot (you may want to follow a guide).
1. Copy the bot's token into `appsettings.json`
1. Now run `steambot bot` again. This time it should print *"Bot is running. Press Ctrl+C to exit."*
1. Check that `steambot index` has finished. The command to search by name will not work until it has.

### Generating the invitation link
1. Go back to your bot on the Discord developer portal, and find the "URL Generator" under OAuth2.
1. Under scopes, check "bot".
1. Under bot permissions, check "Send Messages".
1. At the bottom, copy the generated URL. This is the URL you and others can use to invite the bot to your server.

### Start adding some feeds
After you've invited the bot to your server, you can start giving the bot commands:
1. Go to the channel on your server where you want the bot to post.
1. Type `/steambot add Half-Life` (or any other game that exists on Steam).
1. If there are multiple games with similar names, the bot will ask you. Click on the one you want.

## Commands

All commands except `/steambot list` can only be run by the server owner.

- `/steambot posthere`: The bot will start posting in this channel (instead of where it was posting before).
- `/steambot mute`: The bot will stop posting, but keeps the list of apps that were added.
- `/steambot add <Name>`: Adds an app by name, and starts posting to this channel if it wasn't posting anywhere.
- `/steambot addid <ID>`: Like `add`, but adds an app by ID instead.
- `/steambot list`: List the apps that have been added, and their IDs. Any server member can use this command.
- `/steambot removeid <ID>`: Removes the app with the given ID. Use `list` to find the ID.
- `/steambot purge`: Removes all apps that have been added.

## More information

You can see more options by running `steambot --help`, such as changing where the configuration files are read from.

### steambot index

This command downloads the list of apps from the Steam database, indexes the names, then exits.
You need to run this at least once for the bot to be able to find games by their names.
If you're running your bot as a public service, you may want to run it on a daily schedule to keep it in sync with Steam's database.
You can run it while the bot is running.

The indexes are stored on disk in the `./steamapps_index` folder.

### steambot bot

This script runs the bot, making it show as "Online" in Discord, and keeps running until you press Ctrl+C.
Commands sent to the bot in Discord are processed by this script.

If you need to stop the bot, you should do so with Ctrl+C (in theory, sending SIGINT would also work).
When you do so, it stores its state (servers, added apps, feed timestamps) in `state.picle` and exits cleanly.
Otherwise, the bot also stores its state every five minutes, so maybe you didn't lose too much (or anything at all).

You can check `./log.txt` to see when the state was last saved.
Note that state does not get saved unless it actually changed.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "steambot",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "Discord,RSS,Steam,bot,news",
    "author": "",
    "author_email": "",
    "download_url": "",
    "platform": null,
    "description": "# SteamBot\n\n## Description\n\nSteam provides RSS feeds for all the apps in its database, and you could use a generic RSS bot to post them to Discord.\nBut I was not happy with the awkward format of the feeds, often producing large walls of text and titles like \"1234 RSS Feed\".\n\nBy making SteamBot specifically for Steam, it affords some features:\n- Search for apps by name in the Steam database.\n- Show the app's name and image in every post.\n- Include a link to the web version of the news feed.\n- Limit the text to a few hundred characters to avoid the wall of text effect.\n\n## Installation\n\n### On Windows\n```\npy -m pip install steambot\n```\n\n### On Linux\n```\npip3 install steambot\n```\n\n## Quick start\n\n### Running the bot\n1. Make a folder for SteamBot and `cd` into it.\n1. Run `steambot index`\n1. While that is doing it's thing, open another console and run `steambot bot`\n   Since this is the first time it's run, it creates `appsettings.json`, tells you to replace YOUR_DISCORD_BOT_TOKEN_HERE in that file, and then exits.\n1. Log in to the [Discord developer portal](https://discord.com/developers) and create an application with a bot (you may want to follow a guide).\n1. Copy the bot's token into `appsettings.json`\n1. Now run `steambot bot` again. This time it should print *\"Bot is running. Press Ctrl+C to exit.\"*\n1. Check that `steambot index` has finished. The command to search by name will not work until it has.\n\n### Generating the invitation link\n1. Go back to your bot on the Discord developer portal, and find the \"URL Generator\" under OAuth2.\n1. Under scopes, check \"bot\".\n1. Under bot permissions, check \"Send Messages\".\n1. At the bottom, copy the generated URL. This is the URL you and others can use to invite the bot to your server.\n\n### Start adding some feeds\nAfter you've invited the bot to your server, you can start giving the bot commands:\n1. Go to the channel on your server where you want the bot to post.\n1. Type `/steambot add Half-Life` (or any other game that exists on Steam).\n1. If there are multiple games with similar names, the bot will ask you. Click on the one you want.\n\n## Commands\n\nAll commands except `/steambot list` can only be run by the server owner.\n\n- `/steambot posthere`: The bot will start posting in this channel (instead of where it was posting before).\n- `/steambot mute`: The bot will stop posting, but keeps the list of apps that were added.\n- `/steambot add <Name>`: Adds an app by name, and starts posting to this channel if it wasn't posting anywhere.\n- `/steambot addid <ID>`: Like `add`, but adds an app by ID instead.\n- `/steambot list`: List the apps that have been added, and their IDs. Any server member can use this command.\n- `/steambot removeid <ID>`: Removes the app with the given ID. Use `list` to find the ID.\n- `/steambot purge`: Removes all apps that have been added.\n\n## More information\n\nYou can see more options by running `steambot --help`, such as changing where the configuration files are read from.\n\n### steambot index\n\nThis command downloads the list of apps from the Steam database, indexes the names, then exits.\nYou need to run this at least once for the bot to be able to find games by their names.\nIf you're running your bot as a public service, you may want to run it on a daily schedule to keep it in sync with Steam's database.\nYou can run it while the bot is running.\n\nThe indexes are stored on disk in the `./steamapps_index` folder.\n\n### steambot bot\n\nThis script runs the bot, making it show as \"Online\" in Discord, and keeps running until you press Ctrl+C.\nCommands sent to the bot in Discord are processed by this script.\n\nIf you need to stop the bot, you should do so with Ctrl+C (in theory, sending SIGINT would also work).\nWhen you do so, it stores its state (servers, added apps, feed timestamps) in `state.picle` and exits cleanly.\nOtherwise, the bot also stores its state every five minutes, so maybe you didn't lose too much (or anything at all).\n\nYou can check `./log.txt` to see when the state was last saved.\nNote that state does not get saved unless it actually changed.\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A Discord bot for Steam news feeds.",
    "version": "1.2.6",
    "split_keywords": [
        "discord",
        "rss",
        "steam",
        "bot",
        "news"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "82e82c54714e11d96242a6fc55dbe28cb64696f5045390f205cf28dbe59ebb38",
                "md5": "298665f81ea8fc8f959563cd50577575",
                "sha256": "01f1d0ec23e8c0441f670fe076556cd6a4a0c55596d5a60b54c9803113786b78"
            },
            "downloads": -1,
            "filename": "steambot-1.2.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "298665f81ea8fc8f959563cd50577575",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 12442,
            "upload_time": "2023-03-21T23:03:22",
            "upload_time_iso_8601": "2023-03-21T23:03:22.392725Z",
            "url": "https://files.pythonhosted.org/packages/82/e8/2c54714e11d96242a6fc55dbe28cb64696f5045390f205cf28dbe59ebb38/steambot-1.2.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-21 23:03:22",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "steambot"
}
        
Elapsed time: 0.06852s