Updated Logger and message handler. Updated to latest Discord.Net version

This commit is contained in:
2023-01-01 21:55:29 +02:00
parent 4a5e0ef2f3
commit 69d99b4189
11 changed files with 108 additions and 65 deletions

View File

@@ -88,6 +88,8 @@ public static class Functions
var str = new MemoryStream();
await JsonSerializer.SerializeAsync(str, Data, typeof(T), new JsonSerializerOptions { WriteIndented = true });
await File.WriteAllBytesAsync(file, str.ToArray());
await str.FlushAsync();
str.Close();
}
/// <summary>
@@ -105,6 +107,7 @@ public static class Functions
text = new MemoryStream(Encoding.ASCII.GetBytes(input));
text.Position = 0;
var obj = await JsonSerializer.DeserializeAsync<T>(text);
await text.FlushAsync();
text.Close();
return (obj ?? default)!;
}