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
This will create new discord accounts and add them to your server

Discord-Botter This tool will create new discord accounts add them to your server, this tool needs a captcha api like capmonster.cloud or anti-captcha

Shahzain 27 Nov 30, 2022
Discord-Wrapper - Discord Websocket Wrapper in python

This does not currently work and is in development Discord Websocket Wrapper in

3 Oct 25, 2022
An hcaptcha-solving discord account generator; capable of randomizing names, profile pictures, and verifying phone numbers.

discord-account-generator An hcaptcha-solving discord account generator; capable of randomizing names, profile pictures, and verifying phone numbers.

Acier 61 Dec 10, 2022
Auto Moderation is a powerfull moderation bot

Auto Moderation.py Auto Moderation a powerful Moderation Discord Bot 🎭 Futures Moderation Auto Moderation 🚀 Installation git clone https://github.co

G∙MAX 2 Apr 02, 2022
Python client for using Prefect Cloud with Saturn Cloud

prefect-saturn prefect-saturn is a Python package that makes it easy to run Prefect Cloud flows on a Dask cluster with Saturn Cloud. For a detailed tu

Saturn Cloud 15 Dec 07, 2022
Ethereum Gas Fee for the MacBook Pro touchbar (using BetterTouchTool)

Gasbar Ethereum Gas Fee for the MacBook Pro touchbar (using BetterTouchTool) Worried about Ethereum gas fees? Me too. I'd like to keep an eye on them

TSS 51 Nov 14, 2022
Python3 based bittrex rest api wrapper

bittrex-rest-api This open source project was created to give an understanding of the Bittrex Rest API v1.1/v3.0 in pearl language. The sample file sh

4 Nov 15, 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
Find people to play tennis with.

40Love 40Love is a full-stack web application that helps tennis players find hits at public tennis courts. Players can select public courts on the map

Tanner Schmutte 27 Jun 08, 2022
An attendance bot that joins google meet automatically according to schedule and marks present in the google meet.

Google-meet-self-attendance-bot An attendance bot which joins google meet automatically according to schedule and marks present in the google meet. I

Sarvesh Wadi 12 Sep 20, 2022
Simple, yet effective moderator bot for telegram. With reports, logs, profanity filter and more :3

👹 Samurai Telegram Bot Simple, yet effective moderator bot for telegram. With reports, logs, profanity filter and more :3 Description Personal bot, m

Abraham Tugalov 106 Dec 13, 2022
Python bot for send videos of a Youtube channel to a telegram group , channel or chat

py_youtube_to_telegram Usage: If you want to install ytt and use it, run this command: sudo sh -c "$(curl -fsSL https://raw.githubusercontent.com/nima

Nima Fanniasl 8 Nov 22, 2022
A Discord bot to easily and quickly format your JSON data

Invite PrettyJSON to your Discord server Table of contents About the project What is JSON? What is pretty printing? How to use Input options Command I

Sem 4 Jan 24, 2022
4 Oct 28, 2021
Discord bot written in python

Discord bot created by dpshark#3004 for fun List of features/commands: [keyword] responses tools !add [respons] Adds new response to [keyword] !remove

Daniel K.Gunleiksrud 3 Dec 28, 2021
CnCL - CnCLess it's an Easy to deploy Botnet without CnC/C2

CnCL CnCLess it's an Easy to deploy Botnet without CnC/C2, Harder to track and t

ZSendokame 2 Jan 10, 2022
Polar devices Python API and CLI.

loophole - Polar devices API About Python API for Polar devices. Command line interface included. Tested with: A360 Loop M400 Installation pip install

[roscoe] 145 Sep 14, 2022
Resources for the AMLD 2022 workshop "DevOps on AWS"

MLOPS on AWS | AMLD 2022 This repository contains all the resources necessary to follow along and reproduce the workshop "MLOps on AWS: a Hands-On Tut

xtream 8 Jun 16, 2022
A httpx token generator for discord [ hcaptcha bypass ]

Discord-Token-Generator-Yazato A httpx token generator for discord This generator was developed by Aced#0001, Dreamy Tos Follower#0001, Scripted#0131

23 Oct 26, 2021
A Telegram robot can clone medias from any chat to your own chat.

Clonebot A Telegram robot can clone medias from any chat to your own chat. Read the documentation to know how to use the bot Deploy Developer Document

Renjith Mangal 224 Dec 30, 2022