Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/mojira/mojira-discord-bot
Browse files Browse the repository at this point in the history
…into feature/mention-config
  • Loading branch information
NeunEinser committed Mar 12, 2020
2 parents 873101b + 43b3cdf commit 56b52ec
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/permissions/ModeratorPermission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Permission from './Permission';
* This allows the command to be run by any guild member who has the "Manage messages" permission serverwide.
*/
export default class ModeratorPermission extends Permission {
public checkPermission( member: GuildMember ): boolean {
return member.hasPermission( 'MANAGE_MESSAGES' );
public checkPermission( member?: GuildMember ): boolean {
return member?.hasPermission( 'MANAGE_MESSAGES' );
}
}
4 changes: 2 additions & 2 deletions src/permissions/OwnerPermission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Permission from './Permission';
import BotConfig from '../BotConfig';

export default class OwnerPermission extends Permission {
public checkPermission( member: GuildMember ): boolean {
return member.id === BotConfig.owner;
public checkPermission( member?: GuildMember ): boolean {
return member?.id === BotConfig.owner;
}
}
2 changes: 1 addition & 1 deletion src/util/MentionUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default class MentionUtil {
}

public static get linkPattern(): string {
return 'https?:\\/\\/bugs.mojang.com\\/browse\\/';
return 'https?:\\/\\/bugs.mojang.com\\/(?:browse|projects\\/\\w+\\/issues)\\/';
}

public static get ticketLinkPattern(): string {
Expand Down

0 comments on commit 56b52ec

Please sign in to comment.