Skip to content

Commit

Permalink
fix: type compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
fengkx committed Jan 12, 2022
1 parent 319dc17 commit 988fd93
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
5 changes: 1 addition & 4 deletions source/controlers/language.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ export async function changeLangCallback(
const id = data[data.length - 1];
await setLangById(parseInt(id), lang);
// @ts-ignore
ctx.telegram.answerCbQuery(
parseInt(cb.id),
i18n[lang]['SET_LANG_TO'] + ' ' + lang
);
ctx.telegram.answerCbQuery(cb.id, i18n[lang]['SET_LANG_TO'] + ' ' + lang);
await ctx.telegram.deleteMessage(cb.message.chat.id, cb.message.message_id);
await next();
}
1 change: 1 addition & 0 deletions source/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ bot.on(

bot.on('migrate_to_chat_id', (ctx) => {
const from = ctx.update.message.chat.id;
// @ts-expect-error migrate_to_chat_id
const to = ctx.update.message.migrate_to_chat_id;
migrateUser(from, to);
});
Expand Down
1 change: 1 addition & 0 deletions source/middlewares/get-url-by-title.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default async (ctx: MContext, next: Next): Promise<void> => {
if (!replyToMessage || replyToMessage.from.id !== myId) {
throw errors.newCtrlErr('UNSUBTHIS_USAGE');
}
//@ts-expect-error text type
const title = replyToMessage.text.split('\n')[0];
const feeds = await getFeedsByTitle(title);
if (feeds.length > 1) throw errors.newCtrlErr('SAME_NAME');
Expand Down

0 comments on commit 988fd93

Please sign in to comment.