Skip to content

GramIO API Reference / gramio/dist / Suppress

Interface: Suppress<IsSuppressed>

Defined in: gramio/index.d.ts:618

Interface for add suppress param to params

Type Parameters

Type ParameterDefault type
IsSuppressed extends boolean | undefinedundefined

Properties

PropertyTypeDescriptionDefined in
suppress?IsSuppressedPass true if you want to suppress throwing errors of this method. But this does not undo getting into the onResponseError hook. Example const response = await bot.api.sendMessage({ suppress: true, chat_id: "@not_found", text: "Suppressed method" }); if(response instanceof TelegramError) console.error("sendMessage returns an error...") else console.log("Message has been sent successfully");gramio/index.d.ts:637