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

22 lines
607 B
C#
Raw Normal View History

2021-12-15 09:19:14 +03:00
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);
}
}