Migrate to TypeScript, minor changes and fixes #46
1 changed files with 2 additions and 2 deletions
|
@ -3,11 +3,11 @@ import { getStrings } from '../plugins/checklang';
|
||||||
import { isOnSpamWatch } from '../spamwatch/spamwatch';
|
import { isOnSpamWatch } from '../spamwatch/spamwatch';
|
||||||
import spamwatchMiddlewareModule from '../spamwatch/Middleware';
|
import spamwatchMiddlewareModule from '../spamwatch/Middleware';
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { Context } from 'telegraf';
|
import { Context, Telegraf } from 'telegraf';
|
||||||
|
|
||||||
const spamwatchMiddleware = spamwatchMiddlewareModule(isOnSpamWatch);
|
const spamwatchMiddleware = spamwatchMiddlewareModule(isOnSpamWatch);
|
||||||
|
|
||||||
export default (bot) => {
|
export default (bot: Telegraf<Context>) => {
|
||||||
bot.command("duck", spamwatchMiddleware, async (ctx: Context & { message: { text: string } }) => {
|
bot.command("duck", spamwatchMiddleware, async (ctx: Context & { message: { text: string } }) => {
|
||||||
const Strings = getStrings(ctx.from?.language_code);
|
const Strings = getStrings(ctx.from?.language_code);
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue