[Feature] Guild Onboarding support (#2616)
* api models * moar models * complete models * modelsss * forgot to push * oh lol forgot this too * api & rest guild method * revert VS being VS & formatting to file scoped namespace * socket entities * yup * fix xml doc * changes
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Discord.API.Gateway;
|
||||
using Discord.Audio;
|
||||
using Discord.Rest;
|
||||
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.Collections.Generic;
|
||||
@@ -11,6 +12,7 @@ using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using AutoModRuleModel = Discord.API.AutoModerationRule;
|
||||
using ChannelModel = Discord.API.Channel;
|
||||
using EmojiUpdateModel = Discord.API.Gateway.GuildEmojiUpdateEvent;
|
||||
@@ -1908,6 +1910,18 @@ namespace Discord.WebSocket
|
||||
|
||||
#endregion
|
||||
|
||||
#region Onboarding
|
||||
|
||||
/// <inheritdoc cref="IGuild.GetOnboardingAsync"/>
|
||||
public async Task<SocketGuildOnboarding> GetOnboardingAsync(RequestOptions options = null)
|
||||
{
|
||||
var model = await GuildHelper.GetGuildOnboardingAsync(this, Discord, options);
|
||||
|
||||
return new SocketGuildOnboarding(Discord, model, this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IGuild
|
||||
/// <inheritdoc />
|
||||
ulong? IGuild.AFKChannelId => AFKChannelId;
|
||||
@@ -2166,6 +2180,10 @@ namespace Discord.WebSocket
|
||||
async Task<IAutoModRule> IGuild.CreateAutoModRuleAsync(Action<AutoModRuleProperties> props, RequestOptions options)
|
||||
=> await CreateAutoModRuleAsync(props, options).ConfigureAwait(false);
|
||||
|
||||
/// <inheritdoc/>
|
||||
async Task<IGuildOnboarding> IGuild.GetOnboardingAsync(RequestOptions options)
|
||||
=> await GetOnboardingAsync(options);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user