public static Task <IReadOnlyList <IInvite> > FetchInvitesAsync(this IGuildChannel channel,
                                                                        IRestRequestOptions options = null, CancellationToken cancellationToken = default)
        {
            var client = channel.GetRestClient();

            return(client.FetchChannelInvitesAsync(channel.Id, options, cancellationToken));
        }
        public static Task <IInvite> CreateInviteAsync(this IGuildChannel channel,
                                                       TimeSpan maxAge             = default, int maxUses = 0, bool isTemporaryMembership = false, bool isUnique = false,
                                                       IRestRequestOptions options = null, CancellationToken cancellationToken = default)
        {
            var client = channel.GetRestClient();

            return(client.CreateInviteAsync(channel.Id, maxAge, maxUses, isTemporaryMembership, isUnique, options, cancellationToken));
        }
        public static Task DeleteOverwriteAsync(this IGuildChannel channel,
                                                Snowflake targetId,
                                                IRestRequestOptions options = null, CancellationToken cancellationToken = default)
        {
            var client = channel.GetRestClient();

            return(client.DeleteOverwriteAsync(channel.Id, targetId, options, cancellationToken));
        }
        public static Task SetOverwriteAsync(this IGuildChannel channel,
                                             LocalOverwrite overwrite,
                                             IRestRequestOptions options = null, CancellationToken cancellationToken = default)
        {
            var client = channel.GetRestClient();

            return(client.SetOverwriteAsync(channel.Id, overwrite, options, cancellationToken));
        }
Ejemplo n.º 5
0
        public static Task <IReadOnlyList <IInvite> > FetchInvitesAsync(this IGuildChannel channel, IRestRequestOptions options = null)
        {
            var client = channel.GetRestClient();

            return(client.FetchChannelInvitesAsync(channel.Id, options));
        }
Ejemplo n.º 6
0
        public static Task DeleteOverwriteAsync(this IGuildChannel channel, Snowflake targetId, IRestRequestOptions options = null)
        {
            var client = channel.GetRestClient();

            return(client.DeleteOverwriteAsync(channel.Id, targetId, options));
        }
Ejemplo n.º 7
0
        public static Task SetOverwriteAsync(this IGuildChannel channel, LocalOverwrite overwrite, IRestRequestOptions options = null)
        {
            var client = channel.GetRestClient();

            return(client.SetOverwriteAsync(channel.Id, overwrite, options));
        }