internal StageInstanceCreateAuditLogData(string topic, StagePrivacyLevel privacyLevel, IUser user, ulong channelId) { Topic = topic; PrivacyLevel = privacyLevel; User = user; StageChannelId = channelId; }
/// <inheritdoc/> public async Task StartStageAsync(string topic, StagePrivacyLevel privacyLevel = StagePrivacyLevel.GuildOnly, RequestOptions options = null) { var args = new CreateStageInstanceParams { ChannelId = Id, PrivacyLevel = privacyLevel, Topic = topic }; var model = await Discord.ApiClient.CreateStageInstanceAsync(args, options); Update(model, true); }
public static DiscordStageInstance CreateStageInstance(this DiscordClient client, ulong channelId, string topic, StagePrivacyLevel privacyLevel = StagePrivacyLevel.GuildOnly) => client.CreateStageInstanceAsync(channelId, topic, privacyLevel).GetAwaiter().GetResult();
public static async Task <DiscordStageInstance> CreateStageInstanceAsync(this DiscordClient client, ulong channelId, string topic, StagePrivacyLevel privacyLevel = StagePrivacyLevel.GuildOnly) => (await client.HttpClient.PostAsync("/stage-instances", new { channel_id = channelId, topic, privacy_level = privacyLevel })).Deserialize <DiscordStageInstance>().SetClient(client);
public DiscordStageInstance CreateInstance(string topic, StagePrivacyLevel privacyLevel = StagePrivacyLevel.GuildOnly) => CreateInstanceAsync(topic, privacyLevel).GetAwaiter().GetResult();
public Task <DiscordStageInstance> CreateInstanceAsync(string topic, StagePrivacyLevel privacyLevel = StagePrivacyLevel.GuildOnly) => Client.CreateStageInstanceAsync(Id, topic, privacyLevel);