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
Unarchive Bot for Telegram

Telegram UnArchiver Bot UnArchiveBot: 🇬🇧 Bot that allows you to extract supported archive formats in telegram. 🇹🇷 Desteklenen arşiv biçimleri tele

Hüzünlü Artemis [HuzunluArtemis] 25 May 07, 2022
Powerful Telegram Maintained UserBot in Telethon

Fire-X UserBot The Awaited Bot Fire-X userbot The Most Powerful Telegram Userbot. This Userbot is Safe to use in Your Telegram Account. It is not like

22 Oct 21, 2022
Karen is a Discord Bot that will check for a list of forbidden words/expressions, removing the message that contains them and replying with another message.

Karen is a Discord Bot that will check for a list of forbidden words/expressions, removing the message that contains them and replying with another message. Everything is highly customizable.

Rafael Almeida 1 Nov 03, 2021
A bot that is an updated & modified version of calvinnfernando's WebReg-Bot

WaitList-Bot A bot that is an updated & modified version of calvinnfernando's WebReg-Bot to automate getting into waitlisted classes in UCSD WebReg on

Issac In 1 Dec 01, 2022
Find songs by lyrics.

LyricSearch Hi, welcome to LyricSearch - a simple (Yes), fast (Maybe), and powerful (Approach) lyric search engine. We support Three search methods to

Dicer_ 1 Dec 13, 2021
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

17 Dec 11, 2022
Nyon-stream - A python script that uses webtorrent to stream nyaa videos directly to mpv

nyon-stream A rather shitty script that uses webtorrent to stream nyaa videos di

18 Feb 08, 2022
ELiza music is a telegram music bot project, allow you to play music on voice chat group telegram.

❤️ 𝗘𝗹𝗶𝘇𝗮 𝗠𝘂𝘀𝗶𝗰 ❤️ Unmaintained. The new repo of @MrsElizaRobot is private. (It is no longer based on this source code. The completely rewrit

Team Eliza 2 Dec 08, 2022
A script to automate the process of downloading Markdown and CSV backups of Notion

Automatic-Notion-Backup A script to automate the process of downloading Markdown and CSV backups of Notion. In addition, the data is processed to remo

Jorge Manuel Lozano Gómez 2 Nov 02, 2022
A wrapper for The Movie Database API v3 and v4 that only uses the read access token (not api key).

fulltmdb A wrapper for The Movie Database API v3 and v4 that only uses the read access token (not api key). Installation Use the package manager pip t

Jacob Hale 2 Sep 26, 2021
Hacktoberfest2021 - Submit Just 4 PRs to earn SWAGS and Tshirts🔥

dont contribute in this repo, contribute only in below mentioned repo Special Note For Everyone ''' always make more then 4 pull request lets you have

Keshav Singh 820 Jan 02, 2023
Sniper for Anigame and Izzi discord bots!

Anigame Sniper Gen-3 Features Inbuilt Spammer Responds to your messages in discord (on/off) Snipes only where you want it to Set latency so that the b

22 Nov 13, 2022
Discord py bot that plays magic the gathering.

Klunker Discord py bot that can play magic the gathering Bug Hunter Hello Bug Hunters. To help out with production of this bot, we need help catching

Aiden Castillo 0 Apr 25, 2022
This is a telegram bot hosted by a Raspberry Pi equipped with a temperature and humidity sensor. The bot is capable of sending plots and readings.

raspy-temperature-bot This is a telegram bot hosted by a Raspberry Pi equipped with a temperature and humidity sensor. The bot is capable of sending p

31 May 22, 2022
Collection of AWS Fault Injection Simulator (FIS) experiment templates.

Collection of AWS Fault Injection Simulator (FIS) experiment templates. These templates let you perform chaos engineering experiments on resources (applications, network, and infrastructure) in the A

Adrian Hornsby 8 Nov 27, 2022
Tools for use in DeFi. Impermanent Loss calculations, staking and farming strategies, coingecko and pancakeswap API queries, liquidity pools and more

DeFi open source tools Get Started Instalation General Tools Impermanent Loss, simple calculation Compare Buy & Hold with Staking and Farming Complete

Juan Pablo Pisano 467 Jan 08, 2023
Source code from thenewboston Discord Bot with Python tutorial series.

Project Setup Follow the steps below to set up the project on your environment. Local Development Create a virtual environment with Python 3.7 or high

Bucky Roberts 24 Aug 19, 2022
Simple integrate of API musixmatch.com with python

Python Musixmatch Simple integrate of API musixmatch.com with python Quick start $ pip install pymusixmatch or $ python setup.py install Authenticatio

Hudson Brendon 79 Dec 20, 2022
Kanata Bot - a modular bot running on python3 with anime theme and have a lot features

Kanata Bot Kanata Bot is a modular bot running on python3 with anime theme and have a lot features. Easiest Way To Deploy On Heroku This Bot is Create

Rikka-Chan 2 Jan 16, 2022
A simple language translator with python and google translate api

Language translator with python A simple language translator with python and google translate api Install pip and python 3.9. All the required depende

0 Nov 11, 2021