mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-03-17 12:22:32 +00:00
Add a setting to control whether to respect advisory rate limits (#1342)
This commit is contained in:
@@ -123,7 +123,7 @@ public partial class DashboardViewModel : ViewModelBase
|
||||
AvailableChannels = null;
|
||||
SelectedChannels.Clear();
|
||||
|
||||
_discord = new DiscordClient(token);
|
||||
_discord = new DiscordClient(token, _settingsService.RateLimitPreference);
|
||||
_settingsService.LastToken = token;
|
||||
|
||||
var guilds = await _discord.GetUserGuildsAsync();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using DiscordChatExporter.Core.Discord;
|
||||
using DiscordChatExporter.Core.Utils.Extensions;
|
||||
using DiscordChatExporter.Gui.Framework;
|
||||
using DiscordChatExporter.Gui.Models;
|
||||
@@ -42,6 +43,15 @@ public class SettingsViewModel : DialogViewModelBase
|
||||
set => _settingsService.IsTokenPersisted = value;
|
||||
}
|
||||
|
||||
public IReadOnlyList<RateLimitPreference> AvailableRateLimitPreferences { get; } =
|
||||
Enum.GetValues<RateLimitPreference>();
|
||||
|
||||
public RateLimitPreference RateLimitPreference
|
||||
{
|
||||
get => _settingsService.RateLimitPreference;
|
||||
set => _settingsService.RateLimitPreference = value;
|
||||
}
|
||||
|
||||
public IReadOnlyList<ThreadInclusionMode> AvailableThreadInclusionModes { get; } =
|
||||
Enum.GetValues<ThreadInclusionMode>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user