File tree 4 files changed +11
-5
lines changed
4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,13 @@ export default class MentionCommand extends Command<MentionArguments> {
41
41
return { mentions, matches } ;
42
42
}
43
43
44
+ < << << << HEAD
44
45
public async run ( message : Message , args : MentionArguments ) : Promise < boolean > {
46
+ = === ===
47
+ public static get ticketLinkRegex ( ) : RegExp {
48
+ return new RegExp ( `https?://bugs.mojang.com/(?:browse|projects/\\w+/issues)/(${ MentionCommand . ticketPattern } )` , 'g' ) ;
49
+ }
50
+ > >>> >>> 43 b3cdfff8d4e88c40b2cdb9a8405d529a0bb327
45
51
46
52
let mentions = new Array < Mention > ( ) ;
47
53
let group = false ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import Permission from './Permission';
6
6
* This allows the command to be run by any guild member who has the "Manage messages" permission serverwide.
7
7
*/
8
8
export default class ModeratorPermission extends Permission {
9
- public checkPermission ( member : GuildMember ) : boolean {
10
- return member . hasPermission ( 'MANAGE_MESSAGES' ) ;
9
+ public checkPermission ( member ? : GuildMember ) : boolean {
10
+ return member ? .hasPermission ( 'MANAGE_MESSAGES' ) ;
11
11
}
12
12
}
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import Permission from './Permission';
3
3
import BotConfig from '../BotConfig' ;
4
4
5
5
export default class OwnerPermission extends Permission {
6
- public checkPermission ( member : GuildMember ) : boolean {
7
- return member . id === BotConfig . owner ;
6
+ public checkPermission ( member ? : GuildMember ) : boolean {
7
+ return member ? .id === BotConfig . owner ;
8
8
}
9
9
}
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export default class MentionUtil {
14
14
}
15
15
16
16
public static get linkPattern ( ) : string {
17
- return 'https?:\\/\\/bugs.mojang.com\\/browse\\/' ;
17
+ return 'https?:\\/\\/bugs.mojang.com\\/(?: browse|projects\\/\\w+\\/issues) \\/' ;
18
18
}
19
19
20
20
public static get ticketLinkPattern ( ) : string {
You can’t perform that action at this time.
0 commit comments