Skip to content

Commit

Permalink
chore: fix typebox enum
Browse files Browse the repository at this point in the history
  • Loading branch information
Keyrxng committed Oct 4, 2024
1 parent dfe54ea commit 4276338
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ async function handlePaymentNotification(username: string, claimUrlBase64String:

try {
await bot?.api.sendMessage(telegramId, message, { parse_mode: "MarkdownV2" });

} catch (er) {
logger.error(`Error sending message to ${telegramId}`, { er });
}
Expand Down
25 changes: 13 additions & 12 deletions src/types/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,19 @@ import { StandardValidator } from "typebox-validators";
/**
* We can restrict which updates the BotFather bot will receive.
*/
const allowedUpdates = T.Object({
message: T.String(),
poll: T.String(),
edited_message: T.String(),
channel_post: T.String(),
edited_channel_post: T.String(),
business_connection: T.String(),
business_message: T.String(),
edited_business_message: T.String(),
deleted_business_messages: T.String(),
message_reaction_count: T.String(),
});

const allowedUpdates = {
message: "message",
poll: "poll",
edited_message: "edited_message",
channel_post: "channel_post",
edited_channel_post: "edited_channel_post",
business_connection: "business_connection",
business_message: "business_message",
edited_business_message: "edited_business_message",
deleted_business_messages: "deleted_business_messages",
message_reaction_count: "message_reaction_count",
} as const;

const botSettings = T.Object({
/**
Expand Down

0 comments on commit 4276338

Please sign in to comment.