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
A Tᴇʟᴇɢʀᴀᴍ Vɪᴅᴇᴏ Pʟᴀʏᴇʀ Bᴏᴛ Tᴏ Pʟᴀʏ YT Vɪᴅᴇᴏs & Lɪᴠᴇ Sᴛʀᴇᴀᴍ.

Tuktuky_Music Telegram bot to stream videos in telegram voicechat for both groups and channels. Supports live strams, YouTube videos and telegram medi

TᑌKTᑌKY ᖇᗩᕼᗰᗩᑎ 3 Sep 14, 2021
IdeasBot - Funny telegram bot to generate ideas for a project

Repository of PIdeas_bot About Funny telegram bot for generating projects ideas.

Just Koala 5 Oct 16, 2022
Twitter-bot - A Simple Twitter bot with python

twitterbot To use this bot, You will require API Key and Access Key. Signup at h

Bentil Shadrack 8 Nov 18, 2022
RichWatch is wrapper around AWS Cloud Watch to display beautiful logs with help of Python library Rich.

RichWatch is TUI (Textual User Interface) for AWS Cloud Watch. It formats and pretty prints Cloud Watch's logs so they are much more readable. Because

21 Jul 25, 2022
Cedric Owens 16 Sep 27, 2022
Python script to scrape users/id/badges/creation-date from a Discord Server Memberlist

Discord Server Badges Scraper - Credits to bytixo he made this Custom Discord Vanity Creator How To Use Install discum 1.2 Open a terminal and execute

apolo 13 Dec 09, 2022
Python bindings for ArrayFire: A general purpose GPU library.

ArrayFire Python Bindings ArrayFire is a high performance library for parallel computing with an easy-to-use API. It enables users to write scientific

ArrayFire 402 Dec 20, 2022
Authenticate your League of legends account on riot client in a few lines of code.

lol-authenticator v1.0.0 Content index Project Setup Dependencies Project Setup Dependencies Python v3.9.6 If you don't have Python installed on your

Cássio Fontoura 5 Aug 28, 2022
Gorrabot is a bot made to automate checks and processes in the development process.

Gorrabot is a Gitlab bot made to automate checks and processes in the Faraday development. Features Check that the CHANGELOG is modified By default, m

Faraday 7 Dec 14, 2022
The Official Twilio SendGrid Led, Community Driven Python API Library

The default branch name for this repository has been changed to main as of 07/27/2020. This library allows you to quickly and easily use the SendGrid

Twilio SendGrid 1.4k Jan 07, 2023
Telegram music & video bot direct play music

⚡ NOINOI MUSIC PLAYER 🎵 SUPERFAST MUSIC BOT WHO CAN DIRECT PLAY SONG ON TELEGRAM VOICE CHAT ALSO CAN PLAY VIDEO ON VOICE CHATS ✨ Heroku Deploy YOU CA

noinoi-X 1 Dec 28, 2021
Web3 Ethereum DeFi toolkit for smart contracts, Uniswap and PancakeSwap trades, Ethereum JSON-RPC utilities, wallets and automated test suites.

Web3 Ethereum Defi This project contains common Ethereum smart contracts and utilities, for trading, wallets,automated test suites and backend integra

Trading Strategy 222 Jan 04, 2023
Connect your Nintendo Switch playing status to Discord!

Disclaimer: Unfortunately, it appears that Nintendo has removed returning self-Presence in their API as of recently, making this project near obsolete

Deltaion Lee 145 Dec 30, 2022
🐍 VerificaC19 SDK implementation for Python

VerificaC19 Python SDK 🐍 VerificaC19 SDK implementation for Python. Requirements Python version = 3.7 Make sure zbar is installed in your system For

Lotrèk 10 Jan 14, 2022
A python script to send sms anonymously with SMS Gateway API. Works on command line terminal.

incognito-sms-sender A python script to send sms anonymously with SMS Gateway API. Works on command line terminal. Download and run script Go to API S

ʀᴇxɪɴᴀᴢᴏʀ 1 Oct 25, 2021
Телеграм бот решающий задания ЦДЗ, написанный на библиотеке libmesh.

MESHBot-Telegram Телеграм бот решающий задания ЦДЗ. Описание: Бот написан с использованием библиотеки libmesh. Для начала работы отправьте ему ссылку

2 Jun 19, 2022
a public repository helping ML/DL engineers and DS to beautify the notebook with minimal coding.

ml-helper-functions a public repository helping ML/DL engineers and DS to beautify the notebook with minimal coding.

Jesal Patel 4 Jun 24, 2021
⭐️ Pyro String Generator ⭐️ Genrate String Session Using this bot.Made by TeamUltronX 🔥

⭐️ Pyro String Generator ⭐️ Genrate String Session Using this bot.Made by TeamUltronX 🔥 Configs: API_HASH Get from Here. API_ID Get from Here. API_KE

TheUltronX 2 Dec 16, 2022
A quick way to verify your Climate Hack.AI (2022) submission locally!

Climate Hack.AI (2022) Submission Validator This repository contains code that allows you to quickly validate your Climate Hack.AI (2022) submission l

Jeremy 3 Mar 03, 2022
Set up recurring buys in Gemini

Overview Set up recurring buys in Gemini. Given some keys (Create API Keys), allows you to configure a recurring buy using the reduced API maker and t

Ahmad Abuomar 3 Jan 06, 2022