File tree Expand file tree Collapse file tree 4 files changed +38
-3
lines changed Expand file tree Collapse file tree 4 files changed +38
-3
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ import mongodb from './mongodb';
1717import mydevil from './mydevil' ;
1818import npm from './npm' ;
1919import odpowiedz from './odpowiedz' ;
20+ import prs from './prs' ;
2021import prune from './prune' ;
2122import quiz from './quiz' ;
2223import regulamin from './regulamin' ;
@@ -28,9 +29,9 @@ import stats from './stats';
2829import typeofweb from './towarticle' ;
2930import wiki from './wiki' ;
3031import xd from './xd' ;
32+ import xkcd from './xkcd' ;
3133import yesno from './yesno' ;
3234import youtube from './youtube' ;
33- import xkcd from './xkcd' ;
3435
3536export const COMMAND_PATTERN = new RegExp ( getConfig ( 'PREFIX' ) + '([a-z1-9]+)(?: (.*))?' ) ;
3637
@@ -47,6 +48,7 @@ const allCommands = [
4748 mydevil ,
4849 npm ,
4950 odpowiedz ,
51+ prs ,
5052 prune ,
5153 quiz ,
5254 regulamin ,
@@ -58,9 +60,9 @@ const allCommands = [
5860 typeofweb ,
5961 wiki ,
6062 xd ,
63+ xkcd ,
6164 yesno ,
6265 youtube ,
63- xkcd ,
6466] ;
6567
6668const cooldowns = new Discord . Collection < string , Discord . Collection < string , number > > ( ) ;
Original file line number Diff line number Diff line change 1+ import { Command } from '../types' ;
2+
3+ const formatter = new Intl . ListFormat ( 'pl' , { style : 'long' , type : 'conjunction' } ) ;
4+
5+ const link : Command = {
6+ name : 'prs' ,
7+ description : 'PRs are welcome' ,
8+ args : 'required' ,
9+ async execute ( msg ) {
10+ if ( ! msg . mentions . members ?. size ) {
11+ return null ;
12+ }
13+
14+ const mentions = formatter . format ( msg . mentions . members . map ( ( m ) => m . toString ( ) ) ) ;
15+
16+ await msg . delete ( ) ;
17+ await msg . channel . send ( `PRs are welcome ${ mentions } ` ) ;
18+ return null ;
19+ } ,
20+ } ;
21+
22+ export default link ;
Original file line number Diff line number Diff line change 55 "emitDecoratorMetadata" : true ,
66 "esModuleInterop" : true ,
77 "experimentalDecorators" : true ,
8- "lib" : [" es2020 " ],
8+ "lib" : [" es2021 " ],
99 "module" : " commonjs" ,
1010 "noFallthroughCasesInSwitch" : true ,
1111 "noImplicitReturns" : true ,
Original file line number Diff line number Diff line change 1+ declare namespace Intl {
2+ interface ListFormatOptions {
3+ style : 'long' | 'short' ;
4+ type : 'conjunction' | 'disjunction' ;
5+ }
6+
7+ class ListFormat {
8+ constructor ( locales ?: string | string [ ] , options ?: Intl . ListFormatOptions ) ;
9+ public format ( items : string [ ] ) : string ;
10+ }
11+ }
You can’t perform that action at this time.
0 commit comments