Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
fix: remove unnecessary optional chain
Browse files Browse the repository at this point in the history
  • Loading branch information
favna committed Jun 14, 2020
1 parent 35a9a0a commit bd7f3ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core-decorators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export function requiresPermission(value: number, fallback: Fallback = (): void
export const requiredPermissions = (permissionsResolvable: PermissionsResolvable): MethodDecorator => {
const resolved = Permissions.resolve(permissionsResolvable);
return createFunctionInhibitor(async (message: KlasaMessage) => {
const missing = (message.channel as TextChannel).permissionsFor(message.guild!.me ?? (await message.guild!.members.fetch(message.client.user!.id)))?.missing(resolved) ?? [];
const missing = (message.channel as TextChannel).permissionsFor(message.guild!.me ?? (await message.guild!.members.fetch(message.client.user!.id))).missing(resolved) ?? [];

if (missing.length) {
const permissions = message.language.PERMISSIONS;
Expand Down

0 comments on commit bd7f3ec

Please sign in to comment.