feature: Bump API version to 9 (#1847)
* First changes to the config * Lots of changes to fit the new version * Remove PermissionTargetConverter
This commit is contained in:
@@ -46,8 +46,6 @@ namespace Discord.WebSocket
|
||||
/// <inheritdoc />
|
||||
public int AFKTimeout { get; private set; }
|
||||
/// <inheritdoc />
|
||||
public bool IsEmbeddable { get; private set; }
|
||||
/// <inheritdoc />
|
||||
public bool IsWidgetEnabled { get; private set; }
|
||||
/// <inheritdoc />
|
||||
public VerificationLevel VerificationLevel { get; private set; }
|
||||
@@ -84,7 +82,6 @@ namespace Discord.WebSocket
|
||||
public ulong? ApplicationId { get; internal set; }
|
||||
|
||||
internal ulong? AFKChannelId { get; private set; }
|
||||
internal ulong? EmbedChannelId { get; private set; }
|
||||
internal ulong? WidgetChannelId { get; private set; }
|
||||
internal ulong? SystemChannelId { get; private set; }
|
||||
internal ulong? RulesChannelId { get; private set; }
|
||||
@@ -198,21 +195,6 @@ namespace Discord.WebSocket
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the embed channel (i.e. the channel set in the guild's widget settings) in this guild.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// A channel set within the server's widget settings; <see langword="null"/> if none is set.
|
||||
/// </returns>
|
||||
[Obsolete("This property is deprecated, use WidgetChannel instead.")]
|
||||
public SocketGuildChannel EmbedChannel
|
||||
{
|
||||
get
|
||||
{
|
||||
var id = EmbedChannelId;
|
||||
return id.HasValue ? GetChannel(id.Value) : null;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets the widget channel (i.e. the channel set in the guild's widget settings) in this guild.
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
@@ -440,16 +422,12 @@ namespace Discord.WebSocket
|
||||
internal void Update(ClientState state, Model model)
|
||||
{
|
||||
AFKChannelId = model.AFKChannelId;
|
||||
if (model.EmbedChannelId.IsSpecified)
|
||||
EmbedChannelId = model.EmbedChannelId.Value;
|
||||
if (model.WidgetChannelId.IsSpecified)
|
||||
WidgetChannelId = model.WidgetChannelId.Value;
|
||||
SystemChannelId = model.SystemChannelId;
|
||||
RulesChannelId = model.RulesChannelId;
|
||||
PublicUpdatesChannelId = model.PublicUpdatesChannelId;
|
||||
AFKTimeout = model.AFKTimeout;
|
||||
if (model.EmbedEnabled.IsSpecified)
|
||||
IsEmbeddable = model.EmbedEnabled.Value;
|
||||
if (model.WidgetEnabled.IsSpecified)
|
||||
IsWidgetEnabled = model.WidgetEnabled.Value;
|
||||
IconId = model.Icon;
|
||||
@@ -548,11 +526,6 @@ namespace Discord.WebSocket
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <exception cref="ArgumentNullException"><paramref name="func"/> is <see langword="null"/>.</exception>
|
||||
[Obsolete("This endpoint is deprecated, use ModifyWidgetAsync instead.")]
|
||||
public Task ModifyEmbedAsync(Action<GuildEmbedProperties> func, RequestOptions options = null)
|
||||
=> GuildHelper.ModifyEmbedAsync(this, Discord, func, options);
|
||||
/// <inheritdoc />
|
||||
/// <exception cref="ArgumentNullException"><paramref name="func"/> is <see langword="null"/>.</exception>
|
||||
public Task ModifyWidgetAsync(Action<GuildWidgetProperties> func, RequestOptions options = null)
|
||||
=> GuildHelper.ModifyWidgetAsync(this, Discord, func, options);
|
||||
/// <inheritdoc />
|
||||
@@ -1234,8 +1207,6 @@ namespace Discord.WebSocket
|
||||
/// <inheritdoc />
|
||||
ulong IGuild.DefaultChannelId => DefaultChannel?.Id ?? 0;
|
||||
/// <inheritdoc />
|
||||
ulong? IGuild.EmbedChannelId => EmbedChannelId;
|
||||
/// <inheritdoc />
|
||||
ulong? IGuild.WidgetChannelId => WidgetChannelId;
|
||||
/// <inheritdoc />
|
||||
ulong? IGuild.SystemChannelId => SystemChannelId;
|
||||
@@ -1290,10 +1261,6 @@ namespace Discord.WebSocket
|
||||
Task<ITextChannel> IGuild.GetDefaultChannelAsync(CacheMode mode, RequestOptions options)
|
||||
=> Task.FromResult<ITextChannel>(DefaultChannel);
|
||||
/// <inheritdoc />
|
||||
[Obsolete("This method is deprecated, use GetWidgetChannelAsync instead.")]
|
||||
Task<IGuildChannel> IGuild.GetEmbedChannelAsync(CacheMode mode, RequestOptions options)
|
||||
=> Task.FromResult<IGuildChannel>(EmbedChannel);
|
||||
/// <inheritdoc />
|
||||
Task<IGuildChannel> IGuild.GetWidgetChannelAsync(CacheMode mode, RequestOptions options)
|
||||
=> Task.FromResult<IGuildChannel>(WidgetChannel);
|
||||
/// <inheritdoc />
|
||||
|
||||
Reference in New Issue
Block a user