Discord Rich Presence for Team Fortress 2

Overview

Github all releases GitHub release GitHub Release Date Platform: Windows Kataiser on Steam Ko-fi

GitHub commits since latest release GitHub last commit Updates Codacy Badge Github Actions build Coverage

TF2 Rich Presence

Discord Rich Presence for Team Fortress 2

  • Detects current game state, queue info, playtime, and more
  • Configurable, reliable, and performance-efficient
  • Version 2 (GUI, map images, and more): out now!

Preview image

GUI preview image

Download and install

Installer: TF2RichPresence_v2.1.1_setup (14.7 MB)
Alternatively, get the latest autobuild (may be untested/buggy): TF2RichPresence_v2.1.1_setup
Note that having Python installed is not required. Requires Discord and Steam to be running as well, and will wait until the game and both programs are running.

Changelogs

Linux and MacOS support?

At the moment, both are considered unsupported. They probably work since Jan200101 did some work on Linux a while ago, but the release builds are formatted for Windows. Contributors are very welcome! Also check out cyclowns/tf2-discord, which is confirmed to work on both Windows and Linux, or EmeraldSnorlax/TF2-RPC, which is a much less mature program but is built on Linux and theoretically cross-platform too. Alternatively, following most or all of the "building from source" instructions might work, or possibly running python resources/launcher.py in a --nocython build.

VAC safe?

Almost certainly. If you don't want to risk it then fair enough, but I've run this on my main account for years and feel comfortable with it. The game's runtime and memory are never touched in any way to read its state. For transparency, here's the complete list of external files that are read from and/or written to: \tf\console.log, \tf\cfg\*class*.cfg and steam_appid.txt in TF2's install, and \userdata\*id*\config\localconfig.vdf and \steamapps\libraryfolders.vdf in Steam's. The game process is also queried for its start time and install path, and the server you're playing on is queried for player count or kill counts. RCON is not used.

Building from source

For making and testing changes, or simply always running the most up-to-date code.

  1. Either clone the repo or download the source.
  2. Copy the entire source to another location (sorry) and put the files outside of TF2 Rich Presence into that folder.
  3. Make sure the python and pip commands point to Python 3.9.x (future versions should work too).
  4. Install a C compiler (see Installing Cython). I personally use MinGW, but it's a pain on Windows. Alternatively, use the --nocython flag when building to disable compiling.
  5. From within TF2 Rich Presence, run pip install -r requirements.txt.
  6. Either run python build.py to compile and build, or python launcher.py to launch in debug mode.

Version 2 goals

  • A GUI (Done, ended up using discoIPC still)
    • I'm fairly confident I know how to implement this (it's a bit of work though)
    • Would require doing RPC with pypresence due to a bug in discoIPC
    • Would also have the benefit of not requiring two (slow) Python interpreter launches
    • This is the only criteria I'll require for release v2.0, any of the others could be in later versions
  • Run as a service (Abandoned because "launch TF2" button OP)
  • Map-specific images, instead of gamemodes (Done, also Discord increased the limit to 300)
    • Would cause all sorts of problems, including removing the class icon style option
    • Discord art asset limit is 150, the rest of the program uses 47, and there are 118 vanilla maps in the game
    • So won't be able to get every map, can just limit to the most popular though
  • A proper installer (Done with Inno Setup, no autoupdater though)
    • Also maybe store DB.json and settings in AppData\Roaming
    • Make a Chocolatey package as well, ideally would need to fix antivirus detection
    • Possibly include an autoupdater, either Squirrel or rolling my own
Comments
  • The application does not load

    The application does not load

    When I want to open the TF2 Rich Presence application, it keeps loading.

    When you hover the cursor over the application icon, it appears all black and if you click on it, it does not open.

    TF2 Rich Presence crash

    This happens to me with both the stable version and the latest development version: eaa2eaa7334dc9275572e3035f8148854871f96f

    Opening the application with the administrator permission does not solve anything, in fact an error message appears (the latter I only tested in the latest development version). TF2 RIch Presence crash (Admin)

    opened by ArmorKeik 24
  • Giving Error at Startup

    Giving Error at Startup

    I extracted the .zip to a folder on my desktop and when I started it, it gave me this text and said it'll restart after 5 seconds:

    Traceback (most recent call last): File "C:\Users\Teddy\Desktop\Games\Game Folders\TF2 Rich Presence v1.13\resou rces\launcher.py", line 60, in launch loaded_module.launch() File "main.py", line 91, in main.launch File "main.py", line 81, in main.launch File "main.py", line 128, in main.TF2RichPresense.run File "main.py", line 165, in main.TF2RichPresense.loop_body UnboundLocalError: local variable 'valid_usernames' referenced before assignment

    After it restarts, it shows the same thing again.

    opened by KahootVult 23
  • Crash when loading tr_walkway_rc2

    Crash when loading tr_walkway_rc2

    Note1:

    that I removed the following lines as for the program not finding my console log file (Even though it works just fine after removing these lines) Only thing not working is the automatic download of map images... # -condebug is kinda necessary so just wait to restart if it's not there input("Press enter to retry\n") raise SystemExit

    Note2: I changed the instructions on how to enable the console dump to "You look great today!"

    CRASHLOG:

    TF2 Rich Presence has crashed, the error should now be reported to the developer. (Consider opening an issue at https://github.com/Kataiser/tf2-rich-presence/issues) Restarting in 2 seconds... You look great today!

    Traceback (most recent call last): File "E:\EigeneDateien\RICHPRESENCE\resources\main.py", line 50, in launch app.run() File "E:\EigeneDateien\RICHPRESENCE\resources\main.py", line 85, in run self.loop_body() File "E:\EigeneDateien\RICHPRESENCE\resources\main.py", line 164, in loop_body top_line, bottom_line, server_ip = self.interpret_console_log(os.path.join(tf2_location, 'tf', 'console.log'), valid_usernames) File "E:\EigeneDateien\RICHPRESENCE\resources\main.py", line 346, in interpret_console_log if 'Disconnect by user' in line and [i for i in user_usernames if i in line]: TypeError: 'NoneType' object is not iterable `

    opened by Gensokian 13
  • Cannot open app UI after v2.1 release

    Cannot open app UI after v2.1 release

    Been using this rich presence for some time now, worked pretty good (except the things at the bottom of this post), but after v2.1 the whole UI for the rich presence is broken. I simply cannot alt tab, or click on the app when its started. obrázok_2021-10-10_124123 image

    Other things i have noticed:

    • Class is always "unselected" (Tried re-installing the RP app and TF2, didn´t help).
    • Sometimes after disconnecting from a server, it will show the server (instead of being in the main menu) info untill i requeue or join another server.
    • The kill counter didn´t work once, fixed it by just restarting TF2 (Seems to be fixed now).

    Off-topic: Do you need a translator by any chance?

    opened by Salat1K69 7
  • crash when launching the exe

    crash when launching the exe

    whenever i launch any of the exe files, it doesn't work. the error is

    Traceback (most recent call last): File "F:\TF2 Rich Presence v1.13.1\resources\launcher.py", line 67, in launch loaded_module.launch() File "main.py", line 102, in main.launch File "main.py", line 90, in main.launch File "settings.py", line 421, in settings.compare_settings KeyError: 'trim_console_log'

    i think this might be caused by my game directory being under a different drive to steam?

    opened by MilkMGN 7
  • Cannot build?

    Cannot build?

    How long does it take to build the source? Did everything exactly as said but it is stuck on "Building TF2 Rich Presence v1.13.2". Using Python v3.7.7

    opened by ghost 4
  • translation failure in the Spanish language

    translation failure in the Spanish language

    Hello, I would like to report a translation failure in the Spanish language. To begin with, the TF2 icon says "Equipo Fortaleza 2" in Spanish, we do not say it directly, we called it in English originally. And also in the classes, we don't call the classes in their Spanish translation, we originally called it as it is in English, well that's it, the rest is well translated ...

    image

    image

    opened by LechuMini 4
  • Licensing issues

    Licensing issues

    At the moment the 7zip executable is being bundled in this repository, which is licensed under GNU LGPL because of that tf2-rich-presence must be under LGPL 2.1 or later

    opened by Jan200101 4
  • Windows Defender Alert And Virustotal Virus

    Windows Defender Alert And Virustotal Virus

    Both self extract and zip triggers windows Defender.

    https://www.virustotal.com/gui/file/3357e0c1df2c203ea427034593c2a0a8c5a84e651ac3e989014af55889776a2c/detection

    opened by JoachimFlottorp 3
  • Fixed Russian localization

    Fixed Russian localization

    I've fixed completely broken translations and converted non-translateable sentences/words to their commonly used cyrillic counterparts. Other translations were slightly changed to be more accurate and some were left untouched. I've also fixed some cases I've noticed where TF2 was translated literally in other languages. Apologies for the entire file being the diff, I didn't have much sleep so I just copied the file from raw into my editor.

    opened by forusu 3
  • Program crashes on initialising

    Program crashes on initialising

    Probably a duplication from issue #90 but since that one was already closed. Doesn't matter what exe I start from, the program crashes. I assume this is due some older settings leftover from an older version of the program.

    [1587834973 +0.0006] INFO: Initializing TF2 Rich Presence v1.13.1 [1587834973 +0.0001] DEBUG: Current log: logs\TF2RP_ByteCruncher_maxim_v1.13.1_18377.log [1587834973 +0.0000] INFO: Log level: Debug [1587834973 +0.0066] DEBUG: Welcoming with message version 1 [1587834973 +0.0061] DEBUG: Checking for updates, timeout: 5.0 secs [1587834973 +0.2303] DEBUG: Up to date (v1.13.1) [1587834973 +0.0001] DEBUG: Closing log file via destructor [1587834974 +0.0083] INFO: Starting TF2 Rich Presence v1.13.1 [1587834974 +0.0003] DEBUG: Deleted 0 log(s): [] [1587834974 +0.0001] DEBUG: Compressed 0 log(s): [] [1587834974 +0.0001] DEBUG: CPU: 4 cores, 4 threads [1587834974 +0.0004] DEBUG: Platform: {'architecture': ('32bit', 'WindowsPE'), 'machine': 'AMD64', 'system': 'Windows', 'platform': 'Windows-10-10.0.18362-SP0', 'processor': 'Intel64 Family 6 Model 94 Stepping 3, GenuineIntel', 'python_version_tuple': ('3', '7', '6')} [1587834974 +0.0007] DEBUG: Set process priorities from (<Priority.NORMAL_PRIORITY_CLASS: 32>, <IOPriority.IOPRIO_NORMAL: 2>) to (<Priority.BELOW_NORMAL_PRIORITY_CLASS: 16384>, <IOPriority.IOPRIO_LOW: 1>) [1587834974 +0.0004] CRITICAL: Traceback (most recent call last): File "main.py", line 90, in main.launch File "settings.py", line 421, in settings.compare_settings KeyError: 'trim_console_log'

    Then this error start looping every 5 seconds,

    [1587834974 +0.0000] DEBUG: Closing log file via destructor [1587834979 +0.0014] INFO: Starting TF2 Rich Presence v1.13.1 [1587834979 +0.0003] DEBUG: Deleted 0 log(s): [] [1587834979 +0.0001] DEBUG: Compressed 0 log(s): [] [1587834979 +0.0001] DEBUG: CPU: 4 cores, 4 threads [1587834979 +0.0003] DEBUG: Platform: {'architecture': ('32bit', 'WindowsPE'), 'machine': 'AMD64', 'system': 'Windows', 'platform': 'Windows-10-10.0.18362-SP0', 'processor': 'Intel64 Family 6 Model 94 Stepping 3, GenuineIntel', 'python_version_tuple': ('3', '7', '6')} [1587834979 +0.0002] DEBUG: Set process priorities from (<Priority.NORMAL_PRIORITY_CLASS: 32>, <IOPriority.IOPRIO_NORMAL: 2>) to (<Priority.BELOW_NORMAL_PRIORITY_CLASS: 16384>, <IOPriority.IOPRIO_LOW: 1>) [1587834979 +0.0004] CRITICAL: Traceback (most recent call last): File "main.py", line 90, in main.launch File "settings.py", line 421, in settings.compare_settings KeyError: 'trim_console_log'

    opened by TDarkShadow 3
  • Update pillow to 9.4.0

    Update pillow to 9.4.0

    This PR updates Pillow from 9.3.0 to 9.4.0.

    Changelog

    9.4.0

    ------------------
    
    - Fixed null pointer dereference crash with malformed font 6846
    [wiredfool, radarhere]
    
    - Return from ImagingFill early if image has a zero dimension 6842
    [radarhere]
    
    - Reversed deprecations for Image constants, except for duplicate Resampling attributes 6830
    [radarhere]
    
    - Improve exception traceback readability 6836
    [hugovk, radarhere]
    
    - Do not attempt to read IFD1 if absent 6840
    [radarhere]
    
    - Fixed writing int as ASCII tag 6800
    [radarhere]
    
    - If available, use wl-paste or xclip for grabclipboard() on Linux 6783
    [radarhere]
    
    - Added signed option when saving JPEG2000 images 6709
    [radarhere]
    
    - Patch OpenJPEG to include ARM64 fix 6718
    [radarhere]
    
    - Added support for I;16 modes in putdata() 6825
    [radarhere]
    
    - Added conversion from RGBa to RGB 6708
    [radarhere]
    
    - Added DDS support for uncompressed L and LA images 6820
    [radarhere, REDxEYE]
    
    - Added LightSource tag values to ExifTags 6749
    [radarhere]
    
    - Fixed PyAccess after changing ICO size 6821
    [radarhere]
    
    - Do not use EXIF from info when saving PNG images 6819
    [radarhere]
    
    - Fixed saving EXIF data to MPO 6817
    [radarhere]
    
    - Added Exif hide_offsets() 6762
    [radarhere]
    
    - Only compare to previous frame when checking for duplicate GIF frames while saving 6787
    [radarhere]
    
    - Always initialize all plugins in registered_extensions() 6811
    [radarhere]
    
    - Ignore non-opaque WebP background when saving as GIF 6792
    [radarhere]
    
    - Only set tile in ImageFile __setstate__ 6793
    [radarhere]
    
    - When reading BLP, do not trust JPEG decoder to determine image is CMYK 6767
    [radarhere]
    
    - Added IFD enum to ExifTags 6748
    [radarhere]
    
    - Fixed bug combining GIF frame durations 6779
    [radarhere]
    
    - Support saving JPEG comments 6774
    [smason, radarhere]
    
    - Added getxmp() to WebPImagePlugin 6758
    [radarhere]
    
    - Added &quot;exact&quot; option when saving WebP 6747
    [ashafaei, radarhere]
    
    - Use fractional coordinates when drawing text 6722
    [radarhere]
    
    - Fixed writing int as BYTE tag 6740
    [radarhere]
    
    - Added MP Format Version when saving MPO 6735
    [radarhere]
    
    - Added Interop to ExifTags 6724
    [radarhere]
    
    - CVE-2007-4559 patch when building on Windows 6704
    [TrellixVulnTeam, nulano, radarhere]
    
    - Fix compiler warning: accessing 64 bytes in a region of size 48 6714
    [wiredfool]
    
    - Use verbose flag for pip install 6713
    [wiredfool, radarhere]
    
    Links
    • PyPI: https://pypi.org/project/pillow
    • Changelog: https://pyup.io/changelogs/pillow/
    • Homepage: https://python-pillow.org
    opened by pyup-bot 0
  • Update sentry_sdk to 1.12.1

    Update sentry_sdk to 1.12.1

    This PR updates sentry_sdk from 1.11.1 to 1.12.1.

    The bot wasn't able to find a changelog for this release. Got an idea?

    Links
    • PyPI: https://pypi.org/project/sentry-sdk
    • Repo: https://github.com/getsentry/sentry-python
    opened by pyup-bot 0
  • Update lxml to 4.9.2

    Update lxml to 4.9.2

    This PR updates lxml from 4.9.1 to 4.9.2.

    Changelog

    4.9.2

    ==================
    
    Bugs fixed
    ----------
    
    * CVE-2022-2309: A Bug in libxml2 2.9.1[0-4] could let namespace declarations
    from a failed parser run leak into later parser runs.  This bug was worked around
    in lxml and resolved in libxml2 2.10.0.
    https://gitlab.gnome.org/GNOME/libxml2/-/issues/378
    
    Other changes
    -------------
    
    * LP1981760: ``Element.attrib`` now registers as ``collections.abc.MutableMapping``.
    
    * lxml now has a static build setup for macOS on ARM64 machines (not used for building wheels).
    Patch by Quentin Leffray.
    
    Links
    • PyPI: https://pypi.org/project/lxml
    • Changelog: https://pyup.io/changelogs/lxml/
    • Homepage: https://lxml.de/
    opened by pyup-bot 0
  • Update certifi to 2022.12.7

    Update certifi to 2022.12.7

    This PR updates certifi from 2022.9.24 to 2022.12.7.

    The bot wasn't able to find a changelog for this release. Got an idea?

    Links
    • PyPI: https://pypi.org/project/certifi
    • Repo: https://github.com/certifi/python-certifi
    opened by pyup-bot 0
  • Update charset-normalizer to 3.0.1

    Update charset-normalizer to 3.0.1

    This PR updates charset-normalizer from 2.1.1 to 3.0.1.

    The bot wasn't able to find a changelog for this release. Got an idea?

    Links
    • PyPI: https://pypi.org/project/charset-normalizer
    • Repo: https://github.com/Ousret/charset_normalizer
    opened by pyup-bot 0
  • Kill Counter and Player Count does not work and displays as

    Kill Counter and Player Count does not work and displays as "?/? and ?"

    opened by bobkinect98 1
Releases(v2.1.4)
Owner
Kataiser
Cory, 22, he/him. I also make bass music. Studying CS at UHCL.
Kataiser
Acc-discord-rpc - Assetto Corsa Competizione Discord Rich Presence Client

A simple Assetto Corsa Competizione Rich Presence client. This app only works in

null 6 Dec 18, 2022
Discord rich-presence implementation for VALORANT

not working on v1 anymore in favor of v2, but if there's any big bugs i'll try to fix them valorant-rich-presence-client Discord rich presence extensi

colinh 278 Jan 8, 2023
Unofficial Discord Rich Presence for HackTheBox platform

HTBRichPresence Unofficial Discord Rich Presence for HackTheBox platform The project is under lazy development. How to run Install requirements: // I'

Antonio 4 Apr 19, 2022
OpenEmu Discord Rich Presence provided with Python!

A simple application that provides your current OpenEmu game as an RPC state in Discord via PyPresence. How to use Unzip and open the latest x86_64 ve

Deltaion Lee 6 May 30, 2022
A custom Discord Rich Presence to display when you're studying so you're stupid friends won't disturb you when you're studying.

Studying RPC Description A custom Discord Rich Presence to display when you're studying so you're stupid friends won't disturb you when you're studyin

John Edmerson Pizarra 4 Nov 19, 2022
Rich presence app for playstation 3. Display what game you are playing on the PS3 via Discord

PS3-Rich-Presence-for-Discord Discord Rich Presence script for PS3 consoles on HFW&HEN or CFW. Written in Python. Display what you are playing on your

null 17 Dec 11, 2022
Discord Rich Presence implementation for Plex.

Perplex Perplex is a Discord Rich Presence implementation for Plex. Features Modern and beautiful Rich Presence for both movies and TV shows The Movie

Ethan 52 Dec 19, 2022
With this simple app you can customize your presence in Discord.

Discord Rich Presence This a simple console app which can customize your Discord Presence easily, with only one config file! Setup Go to Discord Devel

Mai 1 Jan 6, 2022
A modern, easy to use, feature-rich, and async ready API wrapper improved and revived from original discord.py.

A Python API wrapper that is improved and revived from the original discord.py

Orion 19 Nov 6, 2021
A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.

A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Modern Pythonic API using async and await

Senpai Development 4 Nov 5, 2021
A modern,feature-rich, and async ready API wrapper for Discord written in Python

discord.io A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Modern Pythonic API using asyn

Vincent 18 Jan 2, 2023
Low-level, feature rich and easy to use discord python wrapper

PWRCord Low-level, feature rich and easy to use discord python wrapper Important Note: At this point, this library API is considered unstable and can

MIguel Lopes 1 Dec 26, 2021
A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python.

disfork A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Modern Pythonic API using async a

null 2 Feb 9, 2022
The public discord bot, created by: primitt, further developed by: duino-coin team.

Duino Stats Mini A public Duino-Stats Discord bot. Click this link to invite the bot to your server. License Duino Stats Mini distributed under the MI

primboi 8 Mar 14, 2022
A powerful discord bot for forming team.

Discord_SquadBot A powerful discord bot for forming team. Pre-requirement Python 3.7 and latest Discord.py module is required. Installation guideline

Jacky Yu 2 Jan 29, 2022
It's a Discord bot to control your PC using your Discord Channel or using Reco: Discord PC Remote Controller App.

Reco PC Server Reco PC Server is a cross platform PC Controller Discord Bot which is a modified and improved version of Chimera for Reco-Discord PC Re

Arvinth Krishna 12 Aug 31, 2022
A small and fun Discord Bot that is written in Python and discord-interactions (with discord.py)

Articuno (discord-interactions) A small and fun Discord Bot that is written in Python and discord-interactions (with discord.py) Get started If you wa

Blue 8 Dec 26, 2022
Satoshi is a discord bot template in python using discord.py that allow you to track some live crypto prices with your own discord bot.

Satoshi ~ DiscordCryptoBot Satoshi is a simple python discord bot using discord.py that allow you to track your favorites cryptos prices with your own

Théo 2 Sep 15, 2022
Discord bot script for sending multiple media files to a discord channel according to discord limitations.

Discord Bulk Image Sending Bot Send bulk images to Discord channel. This is a bot script that will allow you to send multiple images to Discord channe

Nikola Arbov 1 Jan 13, 2022