diff --git a/.env_example b/.env.example similarity index 93% rename from .env_example rename to .env.example index 98bb5dd3..5e4e43c5 100644 --- a/.env_example +++ b/.env.example @@ -1,7 +1,7 @@ #============================================================================== # IMPORTANT - What is the name of your bot? -# Example: BOT_NAME="Stegripe WhatsApp Bot" -# Default: Stegripe WhatsApp Bot +# Example: BOT_NAME="Bajigur" +# Default: Bajigur BOT_NAME="Bajigur" #============================================================================== diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 11e331f3..1833fe74 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,3 +1,3 @@ -github: [clytage, ZenShibata] -patreon: clytage -custom: ["https://clytage.org/donate"] +github: [stegripe] +patreon: stegripe +custom: ["https://stegripe.org/donate"] diff --git a/.github/renovate.json b/.github/renovate.json index 893fe8f6..11a9ecee 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -1,4 +1,4 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": ["github>clytage/renovate-config"] + "extends": ["github>stegripe/renovate-config"] } diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yaml similarity index 56% rename from .github/workflows/build-docker.yml rename to .github/workflows/build-docker.yaml index f9ccfc85..6783cfac 100644 --- a/.github/workflows/build-docker.yml +++ b/.github/workflows/build-docker.yaml @@ -1,4 +1,4 @@ -name: Build & Push Docker Image to container image registry +name: Build and Push Docker Image to the container image registry on: release: @@ -14,5 +14,5 @@ on: jobs: docker: - uses: stegripe/workflows/.github/workflows/docker-build.yml@main + uses: stegripe/workflows/.github/workflows/docker-build-and-push.yaml@main secrets: inherit diff --git a/.github/workflows/test.yml b/.github/workflows/test.yaml similarity index 94% rename from .github/workflows/test.yml rename to .github/workflows/test.yaml index cb6b6f88..1c257877 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yaml @@ -10,5 +10,5 @@ on: jobs: test: - uses: stegripe/workflows/.github/workflows/pnpm-lint-and-test.yml@main + uses: stegripe/workflows/.github/workflows/pnpm-lint-and-test.yaml@main secrets: inherit diff --git a/.vscode/settings.json b/.vscode/settings.json index 5f316b40..7179db78 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,5 @@ { "typescript.tsdk": "node_modules/typescript/lib", + "files.eol": "\n", "npm.packageManager": "npm", - "files.eol": "\n" } diff --git a/Dockerfile b/Dockerfile index 04cb61b5..66766924 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ RUN pnpm prune --production FROM ghcr.io/hazmi35/node:21-alpine LABEL name "bajigur" -LABEL maintainer "Stegripe " +LABEL maintainer "Stegripe Development " # Install ffmpeg RUN apk add --no-cache ffmpeg @@ -42,4 +42,4 @@ ENV NODE_ENV production VOLUME /app/auth_state # Start the app with node -CMD ["node", "dist/index.js"] \ No newline at end of file +CMD ["node", "dist/index.js"] diff --git a/README.md b/README.md index c34e735e..6fc9a7e1 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -# WhatsApp Bot +# Bajigur > A simple and easy-to-use WhatsApp bot project, written in TypeScript. -CI Status +CI Status ## Features - Easy to use. diff --git a/package.json b/package.json index f9616300..d89e922d 100644 --- a/package.json +++ b/package.json @@ -2,21 +2,18 @@ "name": "bajigur", "version": "1.5.5", "description": "A simple and easy-to-use WhatsApp bot project, written in TypeScript.", - "homepage": "https://github.com/stegripe/bajigur#readme", - "bugs": { - "url": "https://github.com/stegripe/bajigur/issues" - }, + "license": "AGPL-3.0", + "author": "Stegripe Development ", "repository": { "type": "git", "url": "git+https://github.com/stegripe/bajigur.git" }, - "license": "AGPL-3.0", - "author": "Stegripe ", - "type": "module", - "imports": { - "#bajigur/*": "./dist/*" + "bugs": { + "url": "https://github.com/stegripe/bajigur/issues" }, + "homepage": "https://github.com/stegripe/bajigur#readme", "main": "dist", + "type": "module", "scripts": { "build": "rimraf dist && npm run lint && npm run compile", "compile": "swc src -d dist --strip-leading-paths", @@ -28,6 +25,13 @@ "start": "node --env-file=.env .", "start:dev": "rimraf dist && set NODE_ENV=development && tsc-watch --onSuccess \"pnpm start\"" }, + "engines": { + "node": ">=20", + "npm": ">=10" + }, + "imports": { + "#bajigur/*": "./dist/*" + }, "prettier": { "arrowParens": "avoid", "printWidth": 100, @@ -80,9 +84,5 @@ "ts-node": "10.9.2", "tsc-watch": "^6.2.0", "typescript": "5.5.3" - }, - "engines": { - "node": ">=20", - "npm": ">=10" } -} \ No newline at end of file +} diff --git a/src/commands/general/HelpCommand.ts b/src/commands/general/HelpCommand.ts index 5ebebebf..d85fdc5c 100644 --- a/src/commands/general/HelpCommand.ts +++ b/src/commands/general/HelpCommand.ts @@ -1,5 +1,5 @@ -import { BOT_NAME, PREFIX } from "#bajigur/config.js"; import ApplyMetadata from "#bajigur/decorators/ApplyMetadata.js"; +import { BOT_NAME, PREFIX } from "#bajigur/config.js"; import Command from "#bajigur/structures/Command.js"; import { ICommand } from "#bajigur/types/index.js"; import { WAProto } from "@whiskeysockets/baileys"; diff --git a/src/commands/general/PingCommand.ts b/src/commands/general/PingCommand.ts index 101ce3fa..a448241e 100644 --- a/src/commands/general/PingCommand.ts +++ b/src/commands/general/PingCommand.ts @@ -1,8 +1,8 @@ import ApplyMetadata from "#bajigur/decorators/ApplyMetadata.js"; import Command from "#bajigur/structures/Command.js"; import { ICommand } from "#bajigur/types/index.js"; -import { cast } from "@sapphire/utilities"; import { WAProto } from "@whiskeysockets/baileys"; +import { cast } from "@sapphire/utilities"; @ApplyMetadata({ name: "ping", diff --git a/src/commands/general/StickerCommand.ts b/src/commands/general/StickerCommand.ts index eec92d39..18cef7dc 100644 --- a/src/commands/general/StickerCommand.ts +++ b/src/commands/general/StickerCommand.ts @@ -5,8 +5,8 @@ import { ICommand } from "#bajigur/types/index.js"; import GetMediaTypeFromBuffer from "#bajigur/utils/GetMediaTypeFromBuffer.js"; import { WAProto, downloadMediaMessage } from "@whiskeysockets/baileys"; import { unlinkSync, writeFileSync } from "fs"; -import { join } from "path"; import { createSticker } from "wa-sticker"; +import { join } from "path"; @ApplyMetadata({ name: "sticker", diff --git a/src/listeners/ConnectionUpdateListener.ts b/src/listeners/ConnectionUpdateListener.ts index e8984d25..47a05e8c 100644 --- a/src/listeners/ConnectionUpdateListener.ts +++ b/src/listeners/ConnectionUpdateListener.ts @@ -1,9 +1,9 @@ import ApplyMetadata from "#bajigur/decorators/ApplyMetadata.js"; import Listener from "#bajigur/structures/Listener.js"; import { IListener } from "#bajigur/types/index.js"; -import { Boom } from "@hapi/boom"; -import { cast } from "@sapphire/utilities"; import { BaileysEventMap, DisconnectReason } from "@whiskeysockets/baileys"; +import { cast } from "@sapphire/utilities"; +import { Boom } from "@hapi/boom"; import { rmSync } from "node:fs"; @ApplyMetadata({ diff --git a/src/listeners/MessageUpsertListener.ts b/src/listeners/MessageUpsertListener.ts index b8f14244..b30269d9 100644 --- a/src/listeners/MessageUpsertListener.ts +++ b/src/listeners/MessageUpsertListener.ts @@ -1,7 +1,7 @@ -import { PREFIX } from "#bajigur/config.js"; import ApplyMetadata from "#bajigur/decorators/ApplyMetadata.js"; import Listener from "#bajigur/structures/Listener.js"; import { IListener } from "#bajigur/types/index.js"; +import { PREFIX } from "#bajigur/config.js"; import { BaileysEventMap } from "@whiskeysockets/baileys"; @ApplyMetadata({ diff --git a/src/structures/BajigurClient.ts b/src/structures/BajigurClient.ts index d2e2d030..9ca88430 100644 --- a/src/structures/BajigurClient.ts +++ b/src/structures/BajigurClient.ts @@ -1,14 +1,10 @@ -import { ISDEV } from "#bajigur/config.js"; import ImportURLToString from "#bajigur/utils/ImportURLToString.js"; -import { - makeCacheableSignalKeyStore, - makeWASocket, - useMultiFileAuthState -} from "@whiskeysockets/baileys"; -import { resolve } from "path"; -import { Logger, pino } from "pino"; -import { CommandHandler } from "./Command.js"; +import { ISDEV } from "#bajigur/config.js"; import { ListenerHandler } from "./Listener.js"; +import { CommandHandler } from "./Command.js"; +import { makeCacheableSignalKeyStore, makeWASocket, useMultiFileAuthState } from "@whiskeysockets/baileys"; +import { Logger, pino } from "pino"; +import { resolve } from "path"; export default class BajigurClient { public socket?: ReturnType; diff --git a/src/structures/Command.ts b/src/structures/Command.ts index c3ae84d6..e62ee75b 100644 --- a/src/structures/Command.ts +++ b/src/structures/Command.ts @@ -1,12 +1,12 @@ +import ReadDirRecursive from "#bajigur/utils/ReadDirRecursive.js"; import { DEVS, ISDEV, PREFIX } from "#bajigur/config.js"; -import { ICommand } from "#bajigur/types/index.js"; import ImportClass from "#bajigur/utils/ImportClass.js"; -import ReadDirRecursive from "#bajigur/utils/ReadDirRecursive.js"; +import { ICommand } from "#bajigur/types/index.js"; +import BajigurClient from "./BajigurClient.js"; import { Collection } from "@discordjs/collection"; import { mergeDefault } from "@sapphire/utilities"; import { WAProto } from "@whiskeysockets/baileys"; import { resolve } from "node:path"; -import BajigurClient from "./BajigurClient.js"; export default abstract class Command implements ICommand { public constructor( diff --git a/src/structures/Listener.ts b/src/structures/Listener.ts index 48d4de32..886bd8e7 100644 --- a/src/structures/Listener.ts +++ b/src/structures/Listener.ts @@ -1,10 +1,10 @@ -import { IListener } from "#bajigur/types/index.js"; -import importClass from "#bajigur/utils/ImportClass.js"; import readdirRecursive from "#bajigur/utils/ReadDirRecursive.js"; -import { Collection } from "@discordjs/collection"; +import importClass from "#bajigur/utils/ImportClass.js"; +import { IListener } from "#bajigur/types/index.js"; +import BajigurClient from "./BajigurClient.js"; import { BaileysEvent, BaileysEventMap } from "@whiskeysockets/baileys"; +import { Collection } from "@discordjs/collection"; import { resolve } from "path"; -import BajigurClient from "./BajigurClient.js"; export default abstract class Listener implements IListener { public constructor( diff --git a/tsconfig.json b/tsconfig.json index cba7bf29..bf5ec9dc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,9 @@ "target": "ES2022", "module": "Node16", "moduleResolution": "Node16", - "lib": ["ES2022"], + "lib": [ + "ES2022" + ], "strict": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, @@ -12,14 +14,22 @@ "skipLibCheck": true, "noEmitHelpers": true, "importHelpers": true, - "rootDir": "src", "outDir": "dist", + "rootDir": "src", "baseUrl": "src", - "typeRoots": ["node_modules/@types", "src/types"], + "typeRoots": [ + "node_modules/@types", + "src/types" + ], "paths": { "#bajigur/*": ["*"] } }, - "exclude": ["node_modules/**", "**/.*/"], - "include": ["src/**/*.ts"] + "include": [ + "src/**/*.ts" + ], + "exclude": [ + "node_modules/**", + "**/.*/" + ] }