We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Added try-catch block to announcement service to log errors when sending messages
1 parent 526f134 commit 7c236f6Copy full SHA for 7c236f6
src/bot/services/handling/announcement/announcement.service.ts
@@ -40,9 +40,13 @@ export class GlobalAnnouncementService {
40
}
41
users.forEach(async (user) => {
42
if (user.tgId !== msg.chat.id) {
43
- await bot.sendMessage(user.tgId, msg.text, {
44
- parse_mode: 'HTML',
45
- })
+ try {
+ await bot.sendMessage(user.tgId, msg.text, {
+ parse_mode: 'HTML',
46
+ })
47
+ } catch (error) {
48
+ console.error(error)
49
+ }
50
51
})
52
await this.userService.update(msg.chat.id, {
0 commit comments