miuu-room-code-obscurer/Patches/DiscordManagerPatches.cs
2023-09-02 22:26:45 -04:00

15 lines
356 B
C#

using HarmonyLib;
using System;
namespace RoomCodeObscurer.Patches
{
[HarmonyPatch(typeof(DiscordManager), nameof(DiscordManager.SetPresence))]
internal class DiscordManagerSetPrecencePatch
{
static void Prefix(ref string state, ref string detail)
{
if (detail == "Playing Multiplayer")
state = CopyCodeMP.GetCodeDisplay(state);
}
}
}