This repository has been archived on 2024-06-23. You can view files and clone it, but cannot push or open issues or pull requests.
OctobotStealth/Boyfriend/GuildConfig.cs
2021-12-15 11:19:14 +05:00

22 lines
No EOL
607 B
C#

using System.Text.Json;
namespace Boyfriend;
public class GuildConfig {
public ulong Id { get; }
public string Lang { get; set; }
public string Prefix { get; set; }
public bool RemoveRolesOnMute { get; set; }
public GuildConfig(ulong id, string lang, string prefix, bool removeRolesOnMute) {
Id = id;
Lang = lang;
Prefix = prefix;
RemoveRolesOnMute = removeRolesOnMute;
}
public async void Save() {
await using var stream = File.OpenWrite("config_" + Id + ".json");
await JsonSerializer.SerializeAsync(stream, this);
}
}