Skip to content

Commit

Permalink
fix: antilink
Browse files Browse the repository at this point in the history
  • Loading branch information
xbnfz01 authored Feb 5, 2024
1 parent 7558e5e commit fcafeda
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/commands/groupsetting/antiLink.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Antilink } from "@prisma/client";
import { AntilinkList } from "@prisma/client";
import type { ConfigCommands } from "../../types/structure/commands";

export default <ConfigCommands>{
Expand Down Expand Up @@ -43,7 +43,7 @@ export default <ConfigCommands>{
const listLink = ["youtube", "facebook", "instagram", "whatsapp", "twitter", "tiktok", "all"];
switch (args[0]) {
case "add":
if (groupSetting?.antilink.list.includes(args[1]))
if (!groupSetting?.antilink.list.includes(args[1] as AntilinkList))
return Chisato.sendText(from, `Link ${args[1]} already in list!`, message);
if (!listLink.includes(args[1]))
return Chisato.sendText(
Expand Down Expand Up @@ -71,7 +71,7 @@ export default <ConfigCommands>{
await Chisato.sendText(from, `Link ${args[1]} has been added to list!`, message);
break;
case "del":
if (!groupSetting?.antilink.list.includes(args[1]))
if (!groupSetting?.antilink.list.includes(args[1] as AntilinkList))
return Chisato.sendText(from, `Link ${args[1]} not in list!`, message);
if (!listLink.includes(args[1]))
return Chisato.sendText(
Expand Down

0 comments on commit fcafeda

Please sign in to comment.