mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-05-06 22:16:29 +03:00
Fix issues caused by refactor
This commit is contained in:
parent
3b12fb7e41
commit
7dbc4472f7
8 changed files with 28 additions and 108 deletions
|
@ -11,7 +11,7 @@ public static class Boyfriend {
|
|||
|
||||
private static readonly DiscordSocketConfig Config = new() {
|
||||
MessageCacheSize = 250,
|
||||
GatewayIntents = GatewayIntents.AllUnprivileged | GatewayIntents.MessageContent | GatewayIntents.GuildMembers,
|
||||
GatewayIntents = (GatewayIntents.AllUnprivileged | GatewayIntents.MessageContent | GatewayIntents.GuildMembers) & ~GatewayIntents.GuildInvites,
|
||||
AlwaysDownloadUsers = true,
|
||||
AlwaysResolveStickers = false,
|
||||
AlwaysDownloadDefaultStickers = false,
|
||||
|
@ -103,11 +103,11 @@ public static class Boyfriend {
|
|||
}
|
||||
|
||||
public static async Task WriteGuildConfigAsync(ulong id) {
|
||||
var json = JsonConvert.SerializeObject(GuildConfigDictionary[id], Formatting.Indented);
|
||||
var removedRoles = JsonConvert.SerializeObject(RemovedRolesDictionary[id], Formatting.Indented);
|
||||
await File.WriteAllTextAsync($"config_{id}.json", JsonConvert.SerializeObject(GuildConfigDictionary[id], Formatting.Indented));
|
||||
|
||||
await File.WriteAllTextAsync($"config_{id}.json", json);
|
||||
await File.WriteAllTextAsync($"removedroles_{id}.json", removedRoles);
|
||||
if (RemovedRolesDictionary.TryGetValue(id, out var removedRoles))
|
||||
await File.WriteAllTextAsync($"removedroles_{id}.json",
|
||||
JsonConvert.SerializeObject(removedRoles, Formatting.Indented));
|
||||
}
|
||||
|
||||
public static Dictionary<string, string> GetGuildConfig(ulong id) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue