1
0
Fork 0
mirror of https://github.com/muerwre/vk-tg-bot.git synced 2025-04-24 22:46:41 +07:00

Merge pull request #11 from muerwre/fix/silent-messages

Added silent message mode
This commit is contained in:
muerwre 2022-06-02 19:36:53 +07:00 committed by GitHub
commit 13b55d33fc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 2 deletions

View file

@ -6,7 +6,9 @@ import { UsersUserFull } from "vk-io/lib/api/schemas/objects";
import { ConfigGroup } from "../types";
import { ExtraReplyMessage } from "telegraf/typings/telegram-types";
interface Fields {}
interface Fields {
silent?: boolean
}
interface Values {
user?: UsersUserFull;
@ -43,6 +45,7 @@ export class JoinLeaveHandler extends VkEventHandler<Fields, Values> {
const extras: ExtraReplyMessage = {
disable_web_page_preview: true,
disable_notification: !!this.template.fields.silent,
};
await this.telegram.sendMessageToChan(

View file

@ -18,7 +18,6 @@ import Composer from "telegraf";
import CallbackQueryUpdate = Update.CallbackQueryUpdate;
import { Template } from "../../template";
import { getAttachment } from "../../../utils/attachment";
import PhotoMessage = Message.PhotoMessage;
type Button = "links" | "likes" | "more";
type UrlPrefix = string;

View file

@ -1,4 +1,5 @@
---
silent: true
---
{{!--
use handlebars template here

View file

@ -1,4 +1,5 @@
---
silent: true
---
{{!--
use handlebars template here