mirror of
https://github.com/thedevs-network/the-guard-bot
synced 2025-08-31 06:05:22 +00:00
Update typings
This commit is contained in:
@@ -6,6 +6,8 @@ const { optional, passThru } = require('telegraf');
|
||||
const { excludeLinks = [] } = require('../../utils/config').config;
|
||||
|
||||
if (excludeLinks === false || excludeLinks === '*') {
|
||||
|
||||
/** @type { import('../../typings/context').GuardMiddlewareFn } */
|
||||
module.exports = passThru();
|
||||
return;
|
||||
}
|
||||
|
6
typings/context.d.ts
vendored
6
typings/context.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
import type { ContextMessageUpdate } from 'telegraf';
|
||||
import type { Context, MiddlewareFn } from 'telegraf';
|
||||
import type {
|
||||
User,
|
||||
Message,
|
||||
@@ -33,6 +33,8 @@ export interface ContextExtensions {
|
||||
): Promise<Message>;
|
||||
}
|
||||
|
||||
export type ExtendedContext = ContextExtensions & ContextMessageUpdate & {
|
||||
export type ExtendedContext = ContextExtensions & Context & {
|
||||
from?: DbUser,
|
||||
};
|
||||
|
||||
export type GuardMiddlewareFn = MiddlewareFn<ExtendedContext>;
|
||||
|
Reference in New Issue
Block a user