Update imports and group info extraction from context.
This commit is contained in:
@@ -4,7 +4,7 @@ import { logHandle } from "#root/bot/helpers/logging.js";
|
||||
import metaLinkCheck from "#root/lib/metaLinkCheck.js";
|
||||
import twitterLinkCheck from "#root/lib/twitterLinkCheck.js";
|
||||
import { urql } from "#root/main.js";
|
||||
import increment from "#root/lib/graphql/mutations/incrimentMutation.js";
|
||||
import increment from "#root/lib/graphql/mutations/incrementMutation.js";
|
||||
import addGroup from "#root/lib/graphql/mutations/addGroupMutation.js";
|
||||
import incrementGroup from "#root/lib/graphql/mutations/incrementGroupMutation.js";
|
||||
|
||||
@@ -22,9 +22,9 @@ feature.on("message::url", logHandle("embed-check"), async (ctx: Context) => {
|
||||
await urql.mutation(increment, { trigger: true, mutationKey });
|
||||
|
||||
if (ctx.chat && ctx.msg) {
|
||||
const groupName = ctx.chat?.title;
|
||||
const groupID = ctx.chat?.id;
|
||||
const groupUsername = ctx.chat?.username;
|
||||
const groupName = ctx.chat?.title || "";
|
||||
const groupID = ctx.chat?.id.toString() || "";
|
||||
const groupUsername = ctx.chat?.username || "";
|
||||
let deletedLinks = 0;
|
||||
|
||||
const username = ctx.msg.from?.username;
|
||||
|
||||
Reference in New Issue
Block a user