An extendable Discord Bot originally focused towards Steam functions
Switch branches/tags
Steam-Discord-Bot-v1.2.69 Steam-Discord-Bot-v1.2.68 Steam-Discord-Bot-v1.2.67 Steam-Discord-Bot-v1.2.66 Steam-Discord-Bot-v1.2.64 Steam-Discord-Bot-v1.2.63 Steam-Discord-Bot-v1.2.62 Steam-Discord-Bot-v1.2.61 Steam-Discord-Bot-v1.2.60 Steam-Discord-Bot-v1.2.59 Steam-Discord-Bot-v1.2.58 Steam-Discord-Bot-v1.2.57 Steam-Discord-Bot-v1.2.56 Steam-Discord-Bot-v1.2.55 Steam-Discord-Bot-v1.2.54 Steam-Discord-Bot-v1.2.53 Steam-Discord-Bot-v1.2.51 Steam-Discord-Bot-v1.2.50 Steam-Discord-Bot-v1.2.49 Steam-Discord-Bot-v1.2.45 Steam-Discord-Bot-v1.2.44 Steam-Discord-Bot-v1.2.43 Steam-Discord-Bot-v1.2.42 Steam-Discord-Bot-v1.2.41 Steam-Discord-Bot-v1.2.40 Steam-Discord-Bot-v1.2.39 Steam-Discord-Bot-v1.2.38 Steam-Discord-Bot-v1.2.37 Steam-Discord-Bot-v1.2.36 Steam-Discord-Bot-v1.2.35 Steam-Discord-Bot-v1.2.34 Steam-Discord-Bot-v1.2.33 Steam-Discord-Bot-v1.2.32 Steam-Discord-Bot-v1.2.31 Steam-Discord-Bot-v1.2.30 Steam-Discord-Bot-v1.2.29 Steam-Discord-Bot-v1.2.28 Steam-Discord-Bot-v1.2.27 Steam-Discord-Bot-v1.2.26 Steam-Discord-Bot-v1.2.25 Steam-Discord-Bot-v1.2.24 Steam-Discord-Bot-v1.2.23 Steam-Discord-Bot-v1.2.22 Steam-Discord-Bot-v1.2.21 Steam-Discord-Bot-v1.2.20 Steam-Discord-Bot-v1.2.19 Steam-Discord-Bot-v1.2.18 Steam-Discord-Bot-v1.2.17 Steam-Discord-Bot-v1.2.16 Steam-Discord-Bot-v1.2.15 Steam-Discord-Bot-v1.2.14 Steam-Discord-Bot-v1.2.13 Steam-Discord-Bot-v1.2.12 Steam-Discord-Bot-v1.2.11 Steam-Discord-Bot-v1.2.10 Steam-Discord-Bot-v1.2.9 Steam-Discord-Bot-v1.2.8 Steam-Discord-Bot-v1.2.7 Steam-Discord-Bot-v1.2.6 Steam-Discord-Bot-v1.2.5 Steam-Discord-Bot-v1.2.4 Steam-Discord-Bot-v1.2.3 Steam-Discord-Bot-v1.2.1 Steam-Discord-Bot-v1.2.0 Steam-Discord-Bot-v1.1.91 Steam-Discord-Bot-v1.1.90 Steam-Discord-Bot-v1.1.89 Steam-Discord-Bot-v1.1.88 Steam-Discord-Bot-v1.1.87 Steam-Discord-Bot-v1.1.86 Steam-Discord-Bot-v1.1.85 Steam-Discord-Bot-v1.1.84 Steam-Discord-Bot-v1.1.83 Steam-Discord-Bot-v1.1.82 Steam-Discord-Bot-v1.1.81 Steam-Discord-Bot-v1.1.80 Steam-Discord-Bot-v1.1.79 Steam-Discord-Bot-v1.1.78 Steam-Discord-Bot-v1.1.77 Steam-Discord-Bot-v1.1.75 Steam-Discord-Bot-v1.1.74 Steam-Discord-Bot-v1.1.73 Steam-Discord-Bot-v1.1.72 Steam-Discord-Bot-v1.1.71 Steam-Discord-Bot-v1.1.70 Steam-Discord-Bot-v1.1.69 Steam-Discord-Bot-v1.1.68 Steam-Discord-Bot-v1.1.67 Steam-Discord-Bot-v1.1.66 Steam-Discord-Bot-v1.1.65 Steam-Discord-Bot-v1.1.64 Steam-Discord-Bot-v1.1.63 Steam-Discord-Bot-v1.1.62 Steam-Discord-Bot-v1.1.61 Steam-Discord-Bot-v1.1.60 Steam-Discord-Bot-v1.1.57 Steam-Discord-Bot-v1.1.56 Steam-Discord-Bot-v1.1.55 Steam-Discord-Bot-v1.1.54 Steam-Discord-Bot-v1.1.53
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Commands
JobManager
Properties
Steam
deps
ducks
.gitignore
App.config
FactHandler.cs
LICENSE.txt
MarkovHandler.cs
MessageTools.cs
Program.cs
README.md
Settings.json
Steam-Discord-Bot.csproj
Steam-Discord-Bot.sln
packages.config
pushbuild.txt
updater.py
versioning.py

README.md

Steam-Discord-Bot

Build status

This a Steam Discord bot which provides notifications on game updates along with some useful commands that interact with the Steam API. There are many other commands which are included that are unrelated to steam, but are general purpose or meant to exist just for fun. Here are some examples of the commands so far. If you'd like to see more commands, open an issue and recommend some! If you dislike any commands or functionality, commands can always be disabled in settings.json!

!appinfo - Fetches up application info from steam.
!chat - Uses a Markov model with to generate response text.
!chat about - Uses a Markov model with to generate response text using starting words.
!chatremove - Removes the term from knowledgebase. [Owner only]
!chatknowledge - Sends a pastebin link containing its knowledgebase.
!coin - Flips a coin.
!credits - Outputs the credits for the bot, ordered by contributions
!btc - Fetches the latest Bitcoin market value.
!eth - Fetches the latest Ethereum market value.
!roll - rolls a dice of arbitrary size. (example: '!roll 33' rolls a 33-sided die)
!duckr - Appends input text to a picture of psychonic. Removes original message
!duck - Appends input text to a picture of psychonic.
!learn - Saves a new fact to the bot's memory.
!facts - Outputs number of facts known.
!facts list - Outputs number of facts known.
!fact - Outputs a random fact
!facts about - Outputs a fact about the input, if learned.
!forget - Forgets a fact learned.
!help - Prints and formats all commands.
!lmgtfy - Responds with a lmgtfy link
!meme - Replaces the last image posted with the text supplied
!numplayers - Fetches current player count from steam.
!numservers - Fetches current server count from steam.
!ping - Test command.
!pony - Grabs link based off pony name.
!repeat - Repeats last message X amount of times.
!search - Peforms google search and returns result(s)
!setgame - Sets the bot's game. [Owner only]
!s - Subsitutes one word for another in last message.
!update - Updates and reloads the bot. [Owner only]
!version - Get the current bot version.

Don't feel like hosting this?

If you are somebody looking to have this bot on your discord server, message me (Headline#9572) on discord and I can throw the bot in the server for you. Otherwise, you should only really need this source code if you'd like to extend the bot yourself.

Installation

  • Install latest version from the releases page.
  • Set up settings.json
  • Install Python 3.6 (for updater.py)
  • Install psutil (for updater.py)
  • Run Steam-Discord-Bot executable

Configuration

Here's a breakdown for configuration settings, along with why they're needed.

  • SteamUsername & SteamPassword: The bot needs credentials to a steam account that it can stay logged into for things like querying the master server list.
  • DiscordBotToken: Token used for Discord's bot API, reactiflux made a great guide for getting one here
  • DiscordAdminId: Admin ID used for commands which should not be used by the general public. It's a unique ID which identifies you among others. Find yours using this tutorial made by Discord themselves.
  • DiscordAdminContact: A contact string to be used to inform users who owns the bot. This can be a Discord username, email, or link.
  • AppIDList: The list of steam appids that the bot watches for updates. If an update is detected it will alert all servers with a matching AnnouncePref
  • AnnouncePrefs: A list of channels the bot will search for to send announcement into. This list can include many channels which span across multiple servers, but the bot will only send the message once to the first match found.
  • DisabledCommands: A list of disabled commands, should you want to do so. All you need to do is specify a command name.I you wanted to remove the help command, enter "help" as an entry in the list.
  • GuildTriggers: Allows you to map a guild id to a command trigger. An example item would be ":-" to map the guild id to the character -
  • GitHubAuthToken: An authentication token for GitHub API if you'd like the bot to automatically update itself. You may leave this blank, but !update will not work and any updates will not automatically occur.
  • JobInterval: How often the bot will run scheduled jobs. The time given is in seconds.
  • AlliedModdersThreadJob: Alerts new plugin uploads to the AlliedModders plugin subforum. This is disabled by default, as I believe it is only useful for my usecase. If you'd like to get the notifications, you may set it to true. Send channel is determined by AnnouncePrefs
  • SteamCheckJob: Job which ensures a steam connection is currently being held, and attempts a reconnect on failure.
  • SelfUpdateListener: Job which periodically checks current version with latest, and updates if possible. If GitHubAuthToken isn't filled out, this job will never run
  • GitHubUpdateUsername, GitHubUpdateRepository, and GitHubUpdateReleaseFilename: These exist if you'd like to fork the repository yourself, setup AppVeyor, and handle automatic updating yourself. This is useful for developers who'd like to maintain their own fork.

Credits

Much of the code was adapted from VoiDeD's bot, so many thanks for the guidance. Also I'd like to thank the guys on #opensteamworks in gamesurge irc along with our contributors for making this bot awesome.