Small bug fix and added option to disable the invite feature

This commit is contained in:
EnderIce2
2020-10-25 18:15:11 +02:00
parent 5f6cc9fae6
commit 3ada6d3689
10 changed files with 113 additions and 92 deletions

View File

@ -1,9 +1,5 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EnderIce2.SDRSharpPlugin
{
@ -21,17 +17,13 @@ namespace EnderIce2.SDRSharpPlugin
string filepath = AppDomain.CurrentDomain.BaseDirectory + "\\RPCLogs\\DiscordRPCLog_" + DateTime.Now.Date.ToShortDateString().Replace('/', '_') + ".log";
if (!File.Exists(filepath))
{
using (StreamWriter sw = File.CreateText(filepath))
{
sw.WriteLine($"[{DateTime.Now}] {Message}");
}
using StreamWriter sw = File.CreateText(filepath);
sw.WriteLine($"[{DateTime.Now}] {Message}");
}
else
{
using (StreamWriter sw = File.AppendText(filepath))
{
sw.WriteLine($"[{DateTime.Now}] {Message}");
}
using StreamWriter sw = File.AppendText(filepath);
sw.WriteLine($"[{DateTime.Now}] {Message}");
}
}
}