feat(ThreadChannel): add fetchOwner() method (#6207)

* feat(ThreadChannel): add owner and fetchOwner()

* fix(ThreadChannel): remove owner and return ThreadMember with fetchOwner

* fix(ThreadChannel): apply suggestions from code review

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>

* fix(ThreadChannel): correctly point to the manager

* docs(FetchOwnerOptions): update desc to mention threads

* fix(ThreadChannel): fetchOwner can return null

* docs(ThreadChannel): owner is nullable

Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
This commit is contained in:
Rodry
2021-07-31 13:00:33 +01:00
committed by GitHub
parent 77c72e625f
commit 331a9d3ffc
3 changed files with 18 additions and 1 deletions

1
typings/index.d.ts vendored
View File

@@ -1703,6 +1703,7 @@ export class ThreadChannel extends TextBasedChannel(Channel) {
public leave(): Promise<ThreadChannel>;
public permissionsFor(memberOrRole: GuildMember | Role): Readonly<Permissions>;
public permissionsFor(memberOrRole: GuildMemberResolvable | RoleResolvable): Readonly<Permissions> | null;
public fetchOwner(options?: FetchOwnerOptions): Promise<ThreadMember | null>;
public setArchived(archived?: boolean, reason?: string): Promise<ThreadChannel>;
public setAutoArchiveDuration(
autoArchiveDuration: ThreadAutoArchiveDuration,