Skip to content

Commit

Permalink
ah lol?
Browse files Browse the repository at this point in the history
  • Loading branch information
MasedMSD committed Nov 14, 2024
1 parent 90bb926 commit 8875fb3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/handlers/autocaching.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const autoCaching = async (ctx: Context & { database: Database }, databas
ctx.database = database;

const user = ctx.from;
if (!user || user.is_bot || user.id == 777000) return await next();
if (!user || user.is_bot || user.id == 777000) return next();

const dbuser = await database.resolveUser(user!, true);

Expand All @@ -21,5 +21,5 @@ export const autoCaching = async (ctx: Context & { database: Database }, databas
});
}

await next();
return next();
};
8 changes: 4 additions & 4 deletions src/handlers/shitposts.composer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ export const shitpostsComposer = new Composer();

const safeWord = (word: string) => word.replace(/</g, "&lt;").replace(/>/g, "&gt;");

shitpostsComposer.on("message", async ctx => {
if (!ctx.message.forward_origin) return;
if (channelID !== (ctx.message?.forward_origin! as Message).chat.id) return;
shitpostsComposer.on("message", async (ctx, next) => {
if (!ctx.message.forward_origin) return next();
if (channelID !== (ctx.message?.forward_origin! as Message).chat.id) return next();

const text = ctx.message.text || ctx.message.caption;
if (!text) return;
if (!text) return next();

const rows = text.split("\n");
const words = await checkText(text, {});
Expand Down

0 comments on commit 8875fb3

Please sign in to comment.