fix: ensure VIEW_CHANNEL permissions before trying to join (#3046)

* fix: ensure VIEW_CHANNEL permissions before joining

* nit(GuildChannel): remove the redundant truthy check
This commit is contained in:
SpaceEEC
2019-02-10 16:21:59 +01:00
committed by Amish Shah
parent ff95e587cb
commit 7324a993ed
3 changed files with 17 additions and 4 deletions

1
typings/index.d.ts vendored
View File

@@ -523,6 +523,7 @@ declare module 'discord.js' {
public readonly permissionsLocked: boolean;
public readonly position: number;
public rawPosition: number;
public readonly viewable: boolean;
public clone(options?: GuildChannelCloneOptions): Promise<GuildChannel>;
public createInvite(options?: InviteOptions): Promise<Invite>;
public createOverwrite(userOrRole: RoleResolvable | UserResolvable, options: PermissionOverwriteOption, reason?: string): Promise<GuildChannel>;