diff --git a/bun.lockb b/bun.lockb index 0a13f92..7de5209 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 43750cc..db274fb 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "dependencies": { "@lilybird/handlers": "0.4.0-alpha.2", "@lilybird/jsx": "0.2.0", + "@lilybird/transformers": "0.2.0-alpha.1", "@paperdave/logger": "^3.0.1", "algoliasearch": "^4.23.2", "gray-matter": "^4.0.3", diff --git a/src/constants.ts b/src/constants.ts index 46cd69d..b0ac994 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -37,4 +37,7 @@ export const BUN_EMOJIS = [ { name: "octobun", id: "1210663393480941598" }, { name: "bunparty", id: "1210663548963921960" }, { name: "bunsplode", id: "1210663666454634586" }, + { name: "bundowspet", id: "1222860633377341461", animated: true }, + { name: "bunpet", id: "1172808445737574591", animated: true }, + { name: "bunsegfault", id: "1175208306533486632", animated: true }, ]; diff --git a/src/listeners/message_create.tsx b/src/listeners/message_create.tsx index 9bb8735..e518bd1 100644 --- a/src/listeners/message_create.tsx +++ b/src/listeners/message_create.tsx @@ -1,4 +1,5 @@ -import { Message, ButtonStyle } from "lilybird"; +import { ButtonStyle } from "lilybird"; +import { Message } from "@lilybird/transformers"; import { ActionRow, Button } from "@lilybird/jsx"; import { extname, basename } from "node:path"; import { Event } from "@lilybird/handlers"; diff --git a/src/listeners/message_update.ts b/src/listeners/message_update.ts index 1fe355b..8f651e0 100644 --- a/src/listeners/message_update.ts +++ b/src/listeners/message_update.ts @@ -1,5 +1,5 @@ import { Event } from "@lilybird/handlers"; -import { PartialMessage } from "lilybird"; +import { PartialMessage } from "@lilybird/transformers"; import { isBunOnlyLikeMessage } from "src/util.ts"; export default { diff --git a/src/loaders/tags.ts b/src/loaders/tags.ts index a40fe4a..fe9e66e 100644 --- a/src/loaders/tags.ts +++ b/src/loaders/tags.ts @@ -1,8 +1,5 @@ -import { - PartialChannel, - GuildTextChannel, - ApplicationCommandOptionChoiceStructure, -} from "lilybird"; +import { ApplicationCommandOptionChoiceStructure } from "lilybird"; +import { PartialChannel, GuildTextChannel } from "@lilybird/transformers"; import { Tag } from "../structs/Tag.ts"; import { readFileSync } from "node:fs"; import { safeSlice } from "../util.ts"; diff --git a/src/util.ts b/src/util.ts index 147d0eb..025a407 100644 --- a/src/util.ts +++ b/src/util.ts @@ -1,4 +1,4 @@ -import { GuildMember } from "lilybird"; +import { GuildMember } from "@lilybird/transformers"; import { BUN_EMOJIS } from "./constants.ts"; export function safeSlice>( @@ -32,8 +32,10 @@ export function isBunOnlyLikeMessage(content?: string) { if (!content) return false; if (content === "bun") return true; - return BUN_EMOJIS.some( - (emoji) => content.replace(/<:|>/g, "") == `${emoji.name}:${emoji.id}` + return BUN_EMOJIS.some((emoji) => + emoji.animated + ? content.replace(//g, "") == `${emoji.name}:${emoji.id}` + : content.replace(/<:|>/g, "") == `${emoji.name}:${emoji.id}` ); }