Exemplo n.º 1
0
 internal StageInstanceCreateAuditLogData(string topic, StagePrivacyLevel privacyLevel, IUser user, ulong channelId)
 {
     Topic          = topic;
     PrivacyLevel   = privacyLevel;
     User           = user;
     StageChannelId = channelId;
 }
Exemplo n.º 2
0
        /// <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);
        }
Exemplo n.º 3
0
 public static DiscordStageInstance CreateStageInstance(this DiscordClient client, ulong channelId, string topic, StagePrivacyLevel privacyLevel = StagePrivacyLevel.GuildOnly) =>
 client.CreateStageInstanceAsync(channelId, topic, privacyLevel).GetAwaiter().GetResult();
Exemplo n.º 4
0
 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);
Exemplo n.º 5
0
 public DiscordStageInstance CreateInstance(string topic, StagePrivacyLevel privacyLevel = StagePrivacyLevel.GuildOnly) =>
 CreateInstanceAsync(topic, privacyLevel).GetAwaiter().GetResult();
Exemplo n.º 6
0
 public Task <DiscordStageInstance> CreateInstanceAsync(string topic, StagePrivacyLevel privacyLevel = StagePrivacyLevel.GuildOnly) =>
 Client.CreateStageInstanceAsync(Id, topic, privacyLevel);