public static Task <IReadOnlyList <IThreadMember> > FetchMembersAsync(this IThreadChannel thread,
                                                                              IRestRequestOptions options = null, CancellationToken cancellationToken = default)
        {
            var client = thread.GetRestClient();

            return(client.FetchThreadMembersAsync(thread.Id, options, cancellationToken));
        }
        public static Task LeaveAsync(this IThreadChannel thread,
                                      IRestRequestOptions options = null, CancellationToken cancellationToken = default)
        {
            var client = thread.GetRestClient();

            return(client.LeaveThreadAsync(thread.Id, options, cancellationToken));
        }
        public static Task <IThreadChannel> ModifyAsync(this IThreadChannel thread,
                                                        Action <ModifyThreadChannelActionProperties> action,
                                                        IRestRequestOptions options = null, CancellationToken cancellationToken = default)
        {
            var client = thread.GetRestClient();

            return(client.ModifyThreadChannelAsync(thread.Id, action, options, cancellationToken));
        }
        public static Task FetchMemberAsync(this IThreadChannel thread,
                                            Snowflake memberId,
                                            IRestRequestOptions options = null, CancellationToken cancellationToken = default)
        {
            var client = thread.GetRestClient();

            return(client.FetchThreadMemberAsync(thread.Id, memberId, options, cancellationToken));
        }
        public static Task <IReadOnlyList <IThreadChannel> > FetchPublicArchivedThreadsAsync(this IThreadChannel channel, int limit = 100, DateTimeOffset?startFromDate = null, IRestRequestOptions options = null)
        {
            var client = channel.GetRestClient();

            return(client.FetchPublicArchivedThreadsAsync(channel.Id, limit, startFromDate, options));
        }
        public static Task <IReadOnlyList <IThreadMember> > FetchMembersAsync(this IThreadChannel thread, IRestRequestOptions options = null)
        {
            var client = thread.GetRestClient();

            return(client.FetchThreadMembersAsync(thread.Id, options));
        }
        public static Task RemoveMemberAsync(this IThreadChannel thread, Snowflake memberId, IRestRequestOptions options = null)
        {
            var client = thread.GetRestClient();

            return(client.RemoveThreadMemberAsync(thread.Id, memberId, options));
        }
        public static Task LeaveAsync(this IThreadChannel thread, IRestRequestOptions options = null)
        {
            var client = thread.GetRestClient();

            return(client.LeaveThreadAsync(thread.Id, options));
        }