File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { Context } from "grammy" ;
22import { BotOverseer } from "../service/bot" ;
33import { Logger } from "../config/logger" ;
4- const logger = new Logger ( { file : "error.log" , level : "error" } ) ;
4+ const logger = new Logger ( { file : "error.log" , level : "error" , timestampFormat : 'locale' } ) ;
55
66export async function handleError (
77 ctx : Context ,
@@ -61,12 +61,10 @@ export const COMMANDS: string[] = [
6161 "date" ,
6262 "future" ,
6363 "rules" ,
64+ "approvedList" ,
65+ "shahin" ,
6466] ;
65- export async function executeService (
66- ctx : Context ,
67- service : any ,
68- method : string
69- ) {
67+ export async function executeService ( ctx : Context , service : any , method : string ) {
7068 if ( service [ method ] ) {
7169 ( await service [ method ] ( ctx ) ) || ( await new service ( ctx ) [ method ] ) ;
7270 } else {
@@ -91,8 +89,5 @@ export async function executeServiceAdmin(
9189 }
9290 } else {
9391 logger . error ( `Action ${ action } not found on service ${ ServiceClass . name } ` ) ;
94- await ctx . reply ( "There was an error processing your command." , {
95- reply_to_message_id : ctx . message ?. message_id ,
96- } ) ;
9792 }
9893}
You can’t perform that action at this time.
0 commit comments