22'use strict' ;
33
44// Utils
5+ const { inspect } = require ( 'util' ) ;
56const { displayUser, scheduleDeletion } = require ( '../../utils/tg' ) ;
67const { html, lrm, TgHtml } = require ( '../../utils/html' ) ;
78const { isMaster, isWarnNotExpired } = require ( '../../utils/config' ) ;
@@ -21,7 +22,7 @@ const formatEntry = async (entry, defaultVal) => {
2122 if ( ! entry || ! entry . by_id ) return html `${ defaultVal } ` ;
2223 const { first_name } = await getUser ( { id : entry . by_id } ) || { } ;
2324 if ( ! first_name ) return html `${ lrm } ${ entry . reason } (${ formatDate ( entry . date ) } )` ;
24- return html `${ lrm } ; ${ entry . reason } (${ first_name } , ${ formatDate ( entry . date ) } )` ;
25+ return html `${ lrm } ${ entry . reason } (${ first_name } , ${ formatDate ( entry . date ) } )` ;
2526} ;
2627
2728const formatWarn = async ( warn , i ) =>
@@ -56,7 +57,7 @@ const getWarnsHandler = async ({ from, message, replyWithHTML }) => {
5657 ) . then ( scheduleDeletion ( ) ) ;
5758 }
5859
59- const { targets } = parse ( message ) ;
60+ const { flags , targets } = parse ( message ) ;
6061
6162 if ( targets . length > 1 ) {
6263 return replyWithHTML (
@@ -74,6 +75,12 @@ const getWarnsHandler = async ({ from, message, replyWithHTML }) => {
7475 ) . then ( scheduleDeletion ( ) ) ;
7576 }
7677
78+ if ( flags . has ( 'raw' ) && from . status === 'admin' ) {
79+ return replyWithHTML (
80+ TgHtml . pre ( inspect ( theUser ) ) ,
81+ ) . then ( scheduleDeletion ( ) ) ;
82+ }
83+
7784 const header = html `${ title ( theUser ) } ${ displayUser ( theUser ) } ` ;
7885 const banReason = optional (
7986 html `🚫 < b > Ban reason:</ b > ` ,
0 commit comments