Merged via /review-pr -> /prepare-pr -> /merge-pr. Prepared head SHA: 27a343cd4d9c778a6017ff666d8285ae60256bf4 Co-authored-by: theSamPadilla <[email protected]> Co-authored-by: obviyus <[email protected]> Reviewed-by: @obviyus
15 lines
475 B
TypeScript
15 lines
475 B
TypeScript
import { API_CONSTANTS } from "grammy";
|
|
|
|
type TelegramUpdateType = (typeof API_CONSTANTS.ALL_UPDATE_TYPES)[number];
|
|
|
|
export function resolveTelegramAllowedUpdates(): ReadonlyArray<TelegramUpdateType> {
|
|
const updates = [...API_CONSTANTS.DEFAULT_UPDATE_TYPES] as TelegramUpdateType[];
|
|
if (!updates.includes("message_reaction")) {
|
|
updates.push("message_reaction");
|
|
}
|
|
if (!updates.includes("channel_post")) {
|
|
updates.push("channel_post");
|
|
}
|
|
return updates;
|
|
}
|