11import { Context } from 'grammy' ;
22import { Catch } from '../../../decorators/Catch' ;
33import { BotReply } from '../../../utils/chat/BotReply' ;
4- import { help , start , commands } from '../../../utils/jsons/botMessages.json' ;
4+ import * as botMessages from '../../../utils/jsons/botMessages.json' ;
55import { ChatInfo } from '../../../utils/chat/ChatInfo' ;
66import { DateCommand } from '../../service/general/date' ;
77import * as BotInfoJson from '../../../../docs/BotInfo.json' ;
@@ -18,20 +18,21 @@ import * as BotInfoJson from '../../../../docs/BotInfo.json';
1818 * Code for handling case-insensitivity bot/bot.ts
1919 */
2020export class GeneralCommands {
21+ @Catch ( )
2122 static getMessage ( ctx : Context ) : { commands : string ; help : string ; start : string } {
2223 const chatInfo = new ChatInfo ( ctx ) ;
2324 const chattype = chatInfo . getChatType ( ) ;
2425 if ( chattype === 'private' ) {
2526 return {
26- help : help . general ,
27- commands : commands . private ,
28- start : start . Private ,
27+ help : botMessages . help . general ,
28+ commands : botMessages . commands . private ,
29+ start : botMessages . start . Private ,
2930 } ;
3031 }
3132 return {
32- commands : commands . public ,
33- help : help . general ,
34- start : start . gorup ,
33+ commands : botMessages . commands . public ,
34+ help : botMessages . help . general ,
35+ start : botMessages . start . gorup ,
3536 } ;
3637 }
3738 // === General Command Handlers ===
0 commit comments