Skip to content

Commit

Permalink
fix: replace urban-dictionary with ud-api
Browse files Browse the repository at this point in the history
  • Loading branch information
sdip15fa committed Dec 27, 2023
1 parent 971c908 commit 1baa101
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 15 deletions.
6 changes: 3 additions & 3 deletions commands/ud.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//jshint esversion:8
import dictionary from "urban-dictionary";
import dictionary from "ud-api";
import { Client, Message } from "whatsapp-web.js";

async function ud(term: string) {
Expand All @@ -17,7 +17,7 @@ const execute = async (client: Client, msg: Message, args: string[]) => {
await client.sendMessage(
chatId,
`🙇‍♂️ *Error*\n\n` +
"```Something Unexpected Happened while Lookup on Urban Dictionary```"
"```Something Unexpected Happened while Lookup on Urban Dictionary```",
);
} else if (typeof data !== "string") {
await client.sendMessage(
Expand All @@ -30,7 +30,7 @@ const execute = async (client: Client, msg: Message, args: string[]) => {
"```\n\n" +
"*Example:* ```" +
data[0].example +
"```"
"```",
);
}
};
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"scalc": "^2.0.1",
"serve-index": "^1.9.1",
"strict-uri-encode": "^2.0.0",
"urban-dictionary": "^3.0.2",
"ud-api": "^3.0.2-2",
"uuid": "^9.0.0",
"weather-js": "^2.0.0",
"whatsapp-web.js": "https://github.com/pedroslopez/whatsapp-web.js"
Expand All @@ -79,7 +79,6 @@
"@types/node-fetch": "^2.6.2",
"@types/qr-image": "^3.2.5",
"@types/qrcode-terminal": "^0.12.0",
"@types/urban-dictionary": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^5.49.0",
"@typescript-eslint/parser": "^5.49.0",
"eslint": "^8.31.0",
Expand Down
15 changes: 5 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1490,11 +1490,6 @@
"@types/mime" "*"
"@types/node" "*"

"@types/urban-dictionary@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@types/urban-dictionary/-/urban-dictionary-3.0.0.tgz#6a10f692fd872b03758bcde3308ec6791c567a15"
integrity sha512-zGc/rL7a11fSf98MsVKnTLQ0s3BukUrdHRWe4Hf4jj3psTVqBIibv7cKUF23We3qDn29/2mYeo56jLZjnm5ZzA==

"@types/uuid@^9.0.1":
version "9.0.1"
resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-9.0.1.tgz#98586dc36aee8dacc98cc396dbca8d0429647aa6"
Expand Down Expand Up @@ -6168,6 +6163,11 @@ typescript@^4.9.4:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.4.tgz#a2a3d2756c079abda241d75f149df9d561091e78"
integrity sha512-Uz+dTXYzxXXbsFpM86Wh3dKCxrQqUcVMxwU54orwlJjOpO3ao8L7j5lH+dWfTwgCwIuM9GQ2kvVotzYJMXTBZg==

ud-api@^3.0.2-2:
version "3.0.2-2"
resolved "https://registry.yarnpkg.com/ud-api/-/ud-api-3.0.2-2.tgz#02178c5206b0b0e3b57c34bb93bcc905556a92e8"
integrity sha512-tUPA0mmGTUD2rqdAcX+5neZo+5vOLr+bVOgiRUJxJgMAuajGzq9yjDYhjcHRI4zOBZoUlTJRij28BY7D1nlSTA==

[email protected]:
version "0.0.3"
resolved "https://registry.yarnpkg.com/uid2/-/uid2-0.0.3.tgz#483126e11774df2f71b8b639dcd799c376162b82"
Expand Down Expand Up @@ -6227,11 +6227,6 @@ unzipper@^0.10.11:
readable-stream "~2.3.6"
setimmediate "~1.0.4"

urban-dictionary@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/urban-dictionary/-/urban-dictionary-3.0.2.tgz#8028350dfd57e80a17b4fdac1cbc81f0672a38bc"
integrity sha512-hoYevSg6JNr8NiYRtxz7sqBDBu4RL52Bd45L2jQQ44Rwrz6ACmnKnRcUkH2TIQRILN+viZMT/MYYU3OyBz68AA==

uri-js@^4.2.2:
version "4.4.1"
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e"
Expand Down

0 comments on commit 1baa101

Please sign in to comment.