File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,11 @@ export class LookupCommand implements Command {
7979 }
8080 }
8181
82+ if ( rows . length === 0 ) {
83+ await interaction . reply ( 'Verilen ile eşleşen hiçbir oyuncu bulunamadı.' ) ;
84+ return ;
85+ }
86+
8287 const longestCkey = rows . reduce (
8388 ( max , row ) => Math . max ( max , row [ 2 ] . length ) ,
8489 0
@@ -87,7 +92,7 @@ export class LookupCommand implements Command {
8792 // :tf:
8893 const message =
8994 '```md\n' +
90- `| CID | IP | ${ ' ' . repeat ( Math . floor ( longestCkey / 2 ) - 2 ) } CKEY${ ' ' . repeat ( Math . ceil ( longestCkey / 2 ) - 2 ) } |\n` +
95+ `| CID | IP | ${ ' ' . repeat ( Math . max ( Math . floor ( longestCkey / 2 ) - 2 , 0 ) ) } CKEY${ ' ' . repeat ( Math . max ( Math . ceil ( longestCkey / 2 ) - 2 , 0 ) ) } |\n` +
9196 `|------------|-----------------|-${ '-' . repeat ( longestCkey ) } -|\n` +
9297 rows
9398 . map (
You can’t perform that action at this time.
0 commit comments