diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..d1c6344 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,31 @@ +version: 2 +updates: + - package-ecosystem: npm + directory: / + schedule: + interval: weekly + day: monday + open-pull-requests-limit: 5 + groups: + docusaurus: + patterns: + - "@docusaurus/*" + - "prism-react-renderer" + - "@mdx-js/*" + - "@easyops-cn/docusaurus-search-local" + update-types: + - minor + - patch + dev-tools: + patterns: + - "typescript" + - "@types/*" + update-types: + - minor + - patch + + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + day: monday diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b88a98b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: CI + +on: + pull_request: + branches: + - master + push: + branches-ignore: + - master + - gh-pages + +jobs: + build: + name: Build and verify docs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '20' + + - name: Install dependencies + run: yarn + + - name: Build + run: yarn build diff --git a/blog/2026-04-16-documentation-refresh.md b/blog/2026-04-16-documentation-refresh.md new file mode 100644 index 0000000..f0d8471 --- /dev/null +++ b/blog/2026-04-16-documentation-refresh.md @@ -0,0 +1,59 @@ +--- +slug: documentation-refresh-2026 +title: Documentation Refresh — Tutorials, Dark Theme, Search +authors: [mocha-team] +tags: [docs, release] +description: We rebuilt the Mocha documentation site from the ground up — new tutorials, dark theme, local search, and every feature documented with examples and troubleshooting. +--- + +The Mocha documentation site just got a full refresh. Every feature is now documented, the theme matches the main mocha-bot.xyz site, and there's a proper tutorial track for people getting started with the bot. + + + +## What's new + +### Tutorials + +There's a new **Tutorials** section with four step-by-step walkthroughs that take you from "I've never used this bot" to "I'm moderating a cross-server room": + +- **[Getting Started](/tutorials/getting-started)** — invite the bot, set up permissions, create your first room. +- **[Connect Two Servers](/tutorials/connect-two-servers)** — bridge two Discord servers end-to-end with a test checklist. +- **[Share a Room via Invitation](/tutorials/share-via-invite)** — the full invitation flow with aliases, usage caps, and expiration. +- **[Curate Your Room](/tutorials/curate-your-room)** — editing details, kicking channels, enabling personalization, deleting rooms. + +### Full feature coverage + +Every slash command, chat behavior, and room feature now has its own reference page with: + +- Exact parameters with types and whether they're required. +- What the bot does under the hood (without dragging in implementation details). +- A troubleshooting table for the errors you're most likely to hit. +- Cross-links so you can hop from a command to the concept behind it. + +That includes `/feedback` (new), the full `/room invite` subcommand group, typing indicators, reply threading, pins, ratings, and personalization. + +### Dark theme to match the main site + +The docs site now uses the same visual language as [mocha-bot.xyz](https://mocha-bot.xyz): pure black background, Plus Jakarta Sans, gold accents, glass surfaces, blurred navbar. Dark mode is the only mode — no more accidental light-mode flashes when following links out of the main site. + +### Local search + +There's a search bar in the navbar now. It indexes every page at build time — no third-party service, no approval process, instant results. + +### SEO and sharing + +- Per-page Open Graph and Twitter card metadata so shared links render properly in Discord, Slack, and Twitter. +- A site-wide schema.org `WebSite` JSON-LD block plus the automatic `BreadcrumbList` structured data Docusaurus ships. +- A generated sitemap and a `robots.txt` pointing at it. +- A custom 404 page with links to the tutorials, commands reference, and FAQ. + +### Under the hood + +- Docusaurus v3 (up from v2 RC). +- PWA enabled — you can install the docs as an app. +- CI runs `yarn build` and link-checks every pull request. +- Dependabot watches for updates so nothing rots. + +## What's next + +If you spot something missing, wrong, or confusing, let us know via the in-bot `/feedback` command or drop a message in the [support server](https://discord.mocha-bot.xyz/). This site is living documentation — the more you tell us where it breaks, the better it gets. diff --git a/blog/authors.yml b/blog/authors.yml new file mode 100644 index 0000000..da468b0 --- /dev/null +++ b/blog/authors.yml @@ -0,0 +1,7 @@ +mocha-team: + name: Mocha Team + title: Mocha Bot maintainers + url: https://mocha-bot.xyz + image_url: /img/logo-mocha.png + socials: + github: mocha-bot diff --git a/docs/chat/messages.md b/docs/chat/messages.md index 026a8e2..d255d58 100644 --- a/docs/chat/messages.md +++ b/docs/chat/messages.md @@ -56,6 +56,10 @@ Editing a message edits its copies in every other channel in the room. There is After the window expires the original edit will no longer propagate to followers. +:::warning +The window is measured from when the message was originally sent, not when you start editing. If you open the edit dialog just before the window closes and hit save a minute later, Mocha has already forgotten about the message and your change will only affect the original channel. +::: + ## Delete Message Deleting a message deletes every copy of it in the room, under the same time-window rules as editing. diff --git a/docs/commands/bind.md b/docs/commands/bind.md new file mode 100644 index 0000000..b3c7c2f --- /dev/null +++ b/docs/commands/bind.md @@ -0,0 +1,49 @@ +--- +sidebar_position: 4 +title: "/bind — Link Your Discord Account to Mocha" +description: Use /bind to connect your Discord account to your Mocha SSO account, enabling access to the dashboard, subscriptions, and account-gated features. +keywords: + - /bind command + - mocha sso + - link discord account + - mocha account + - discord login +--- + +# Bind + +Link your Discord identity to your Mocha account. Required to access the [dashboard](https://dash.mocha-bot.xyz), manage subscriptions, and use account-gated features. + +## Slash Commands + +### Bind + +Run this in any channel where the bot is present. The response is **ephemeral** — only you see it. + +**Usage** + +```md + /bind +``` + +**What you'll see** + +An embed titled **Connect Your Account** with two buttons: + +| Button | When to use | +| ------ | ----------- | +| **Login / Register** | You don't have a Mocha account yet. Opens the SSO page to create one using Discord OAuth. | +| **Link Discord to Existing Account** | You already have a Mocha account (created with Google or another method) and want to attach your Discord identity to it. | + +Both flows redirect back to your dashboard profile page after completion. + +## Why bind your account? + +- **Dashboard access** — [dash.mocha-bot.xyz](https://dash.mocha-bot.xyz) uses Mocha SSO. Without a linked account you cannot log in. +- **Subscriptions** — plan purchases are tied to your Mocha account. Binding makes sure payments apply to the right profile. +- **Private room gate** — some premium features require the subscribing user to have their Discord account linked. + +## See also + +- [/subscribe](/commands/subscribe) — view and upgrade your server's plan. +- [Pricing](/web/pricing) — compare plans on the web. diff --git a/docs/commands/feedback.md b/docs/commands/feedback.md index 37ae306..66f4237 100644 --- a/docs/commands/feedback.md +++ b/docs/commands/feedback.md @@ -1,65 +1,24 @@ --- -sidebar_position: 3 -title: "/feedback — Send Feedback to Mocha Developers" -description: Use the /feedback slash command to send bug reports, suggestions, and feature requests directly to the Mocha developers from any Discord server. +sidebar_position: 5 +title: "/feedback — Removed" +description: The /feedback slash command has been removed. Use the Mocha support server or GitHub issues to send feedback. keywords: - - /feedback command - - mocha bug report - - mocha feature request - - discord bot feedback + - mocha feedback + - mocha support --- # Feedback -Send feedback to the Mocha maintainers directly from Discord. The command opens a modal form that ends up as a formatted message in the developer channel, tagged with the server and user it came from so we can follow up if needed. +:::caution Removed +The `/feedback` slash command has been removed. It is no longer available in Discord. +::: -## Slash Commands +## How to send feedback now -### Feedback - -**Usage** - -```md - /feedback -``` - -**What happens next** - -1. Mocha responds with an ephemeral modal titled **Send Feedback**. -2. You fill in two fields. -3. You submit — Mocha replies *"Thank you for your feedback!"* and forwards the details to the developer channel. - -## Modal fields - -| Field | Required | Limits | Description | -| ---------- | -------- | -------------------- | ------------------------------------------------------------- | -| **Type** | yes | 3–20 characters | One of `bug`, `suggestion`, `feature_request`, `other`. | -| **Feedback** | yes | up to 2000 characters | Free-form description. Be specific — the more context, the better. | - -If you type something that isn't one of the four known values for **Type**, Mocha will accept the submission and quietly categorise it as `other`. You don't need to worry about spelling it exactly. - -## What the maintainers see - -Your submission is posted to the developer channel as an embed containing: - -- **Title** — "Received a feedback!" -- **Description** — the body you typed. -- **Color** — tinted by feedback type (bug, suggestion, feature_request, other each have their own color). -- **Author** — your Discord tag and avatar. -- **Type field** — the category. -- **Guild field** — the server name and ID the feedback came from. -- **User field** — your display name and user ID. -- **Timestamp** — when you submitted. - -## Writing effective feedback - -To help us act on your report quickly: - -- **Bugs** — include the command or action you ran, what you expected, what happened, and (if possible) the room ID. -- **Suggestions / feature requests** — describe the problem you're trying to solve, not just the solution you have in mind. We can usually find a better fit for the underlying need. -- **Other** — use this for questions, praise, or anything that doesn't fit the first three. We read all of it. +- **Support server** — join [discord.mocha-bot.xyz](https://discord.mocha-bot.xyz) and post in the appropriate channel. +- **GitHub issues** — open an issue at the Mocha GitHub repository for bug reports and feature requests. ## See also -- [Support server](https://discord.mocha-bot.xyz/) — real-time help from the community. -- [Frequent Searches](/others/frequent-searches) — answers to the most common questions before you reach for `/feedback`. +- [Frequent Searches](/others/frequent-searches) — answers to common problems. +- [Getting Started](/tutorials/getting-started) — setup walkthrough. diff --git a/docs/commands/room.md b/docs/commands/room.md index b73f608..c6629d2 100644 --- a/docs/commands/room.md +++ b/docs/commands/room.md @@ -132,3 +132,39 @@ Join a room using an invitation code or alias. The channel must not already be c ```md room invite join ``` + +### Tag + +Manage topic tags on the current room. See [Room Tags](/rooms/tags) for the full reference. + +All tag subcommands require the channel to be connected to a room. `set` and `remove` are **owner-only**. + +#### tag list + +Show the tags currently assigned to this room. + +**Usage** + +```md + /room tag list +``` + +#### tag set + +Open a select menu to assign one or more tags to this room. Only the room owner can use this. + +**Usage** + +```md + /room tag set +``` + +#### tag remove + +Open a select menu to remove one or more assigned tags. Only the room owner can use this. + +**Usage** + +```md + /room tag remove +``` diff --git a/docs/commands/subscribe.md b/docs/commands/subscribe.md new file mode 100644 index 0000000..8506994 --- /dev/null +++ b/docs/commands/subscribe.md @@ -0,0 +1,59 @@ +--- +sidebar_position: 3 +title: "/subscribe — View and Upgrade Your Server Plan" +description: Use /subscribe to check your server's current plan and active features, and to browse available premium plans with direct checkout links. +keywords: + - /subscribe command + - mocha premium + - mocha plans + - discord bot subscription + - upgrade mocha +--- + +# Subscribe + +Check your server's current plan and browse available premium plans — all without leaving Discord. + +## Slash Commands + +### Subscribe + +Run this in any channel where the bot is present. The response is **ephemeral** — only you see it. + +**Usage** + +```md + /subscribe +``` + +**What you'll see** + +1. **Current Server Plan** embed — lists every premium feature currently active on your server. If no plan is active the embed describes the Free plan and prompts you to upgrade. +2. **Available Plans** embed (if plans are configured) — shows each active plan with its name, price, and included features. +3. **Subscribe buttons** — one button per plan, each linking directly to that plan's checkout page. If no plans have a checkout URL configured, a generic **View Plans** button links to the dashboard pricing page. + +**Active features shown** + +| Feature key | Display label | +| -------------------------------- | ------------------------------ | +| `private_room` | Private Rooms | +| `room_invitation` | Room Invitations | +| `room_invitation_alias` | Custom Invitation Aliases | +| `room_invitation_unlimited_option` | Unlimited Invitation Uses | +| `personalization` | Personalized Messages | +| `welcoming` | Welcome Messages | +| `max_channels` | Extended Channel Limit | + +Only features that are **active** on your server appear in the embed. + +## When to use it + +- **Check your plan** — quickly see which features your server has without opening a browser. +- **Upgrade** — hit a feature gate mid-setup and want to subscribe immediately. +- **Share with admins** — because the response is ephemeral you can run it anywhere, then copy the plan link to share with whoever controls billing. + +## See also + +- [Pricing](/web/pricing) — full plan comparison on the web. +- [Rooms Overview](/rooms/overview) — feature gate reference. +- [Personalization](/rooms/personalization) — one of the premium features unlocked by a plan. diff --git a/docs/donut/_category_.json b/docs/donut/_category_.json new file mode 100644 index 0000000..d1b13e0 --- /dev/null +++ b/docs/donut/_category_.json @@ -0,0 +1,8 @@ +{ + "label": "Donut", + "position": 6, + "link": { + "type": "generated-index", + "description": "Donut is Mocha's community matchmaking feature — automatically pairs members for 1-on-1 or small-group interactions." + } +} diff --git a/docs/donut/overview.md b/docs/donut/overview.md new file mode 100644 index 0000000..9952b85 --- /dev/null +++ b/docs/donut/overview.md @@ -0,0 +1,83 @@ +--- +sidebar_position: 1 +title: Donut — Community Matchmaking +description: Donut automatically pairs Discord community members for 1-on-1 or small-group interactions. Use it to run speed dating events, mentorship circles, icebreakers, and gaming brackets. +keywords: + - mocha donut + - discord matchmaking + - community pairing + - 1-on-1 discord + - speed dating discord + - mentorship discord +--- + +# Donut + +Donut is Mocha's matchmaking feature. It automatically pairs registered members for 1-on-1 or small-group interactions — no manual bracket-building or spreadsheets needed. + +## What it does + +1. You create a named **match session**. +2. Members register for the session (by Discord user ID or reference). +3. You start the match — Donut pairs everyone instantly. +4. Pairs are revealed. Odd-numbered groups get a 3-way pair so nobody is left out. +5. You retrieve the pair list and notify members however you like. + +## Use cases + +| Use case | How Donut helps | +| -------- | --------------- | +| **Speed dating** | Rotate members through timed 1-on-1 chats in your community. | +| **Mentorship circles** | Match newcomers with experienced members automatically. | +| **Gaming brackets** | Auto-seed players into 1v1 match pairs for tournaments or scrims. | +| **Icebreakers** | Randomly pair members for warm-up conversations at the start of an event. | + +## Match lifecycle + +A match moves through the following states: + +``` +pending → running → finished + ↘ stopped +``` + +| State | Meaning | +| ----- | ------- | +| `pending` | Match created, members can register. | +| `running` | Match started, pairs have been generated. | +| `finished` | All pairs have been marked as called/completed. | +| `stopped` | Match was halted before all pairs finished. | + +Each individual participant also has their own status: `pending` → `running` → `finished` / `stopped`. + +## API overview + +Donut is accessible via the Mocha REST API. All endpoints are under `/api/v1/match/`. + +| Method | Endpoint | Description | +| ------ | -------- | ----------- | +| `POST` | `/api/v1/match` | Create a new match session. | +| `GET` | `/api/v1/match/:serial` | Get match information and status. | +| `POST` | `/api/v1/match/:serial/start` | Start the match — triggers auto-pairing. | +| `POST` | `/api/v1/match/:serial/stop` | Stop the match. | +| `GET` | `/api/v1/match/:serial/people` | List all registered participants. | +| `POST` | `/api/v1/match/:serial/people` | Register participants. | +| `DELETE` | `/api/v1/match/:serial/people` | Unregister participants. | +| `GET` | `/api/v1/match/:serial/pairs` | Get generated pairs. | +| `POST` | `/api/v1/match/:serial/call` | Mark a pair as completed. | + +## Pairing algorithm + +- Members are shuffled randomly when the match starts. +- Pairs are 2-person by default. +- If the total count is odd, the last group becomes a 3-person pair. +- A single leftover member (only possible if count is 1) is not paired. + +## Dashboard + +You can manage match sessions from the [Mocha dashboard](https://dash.mocha-bot.xyz). A live demo of the pairing flow is available at [mocha-bot.xyz/donut](https://mocha-bot.xyz/donut). + +## See also + +- [Getting Started](/tutorials/getting-started) — invite the bot and set up your first room. +- [Pricing](/web/pricing) — plan comparison. diff --git a/docs/index.mdx b/docs/index.mdx index f5c87ea..74290d4 100644 --- a/docs/index.mdx +++ b/docs/index.mdx @@ -39,15 +39,27 @@ That channel is now the owner of a new room. Share its ID (or an [invitation cod ## Reference -- [Commands](/category/commands) — every slash command Mocha understands. +- [Commands](/category/commands) — every slash command Mocha understands, including `/subscribe`, `/bind`, and `/room tag`. - [Chat](/category/chat) — how messages, edits, replies, pins, mentions, and `!tmp` work. -- [Rooms](/category/rooms) — invitations, ratings, personalization. +- [Rooms](/category/rooms) — invitations, ratings, personalization, tags. +- [Donut](/category/donut) — community matchmaking for 1-on-1 and small-group pairing events. - [Web](/category/web) — discover public rooms at [mocha-bot.xyz/search](https://mocha-bot.xyz/search) and compare plans on [Pricing](/web/pricing). +## Slash commands summary + +| Command | Description | +| ------- | ----------- | +| `/help` | List available commands and confirm the bot is alive. | +| `/room create` | Create a new room in the current channel. | +| `/room join` | Join an existing room by ID. | +| `/room disconnect` | Leave the current room. | +| `/room switch` | Swap rooms in one command. | +| `/room info` | View room details, ratings, and controls. | +| `/room invite create/join` | Manage invitation codes. | +| `/room tag list/set/remove` | Manage topic tags on the room. | +| `/subscribe` | View your server plan and subscribe to a premium plan. | +| `/bind` | Link your Discord account to your Mocha SSO account. | + ## Reporting issues If you're having issues with the bot, check the [Frequent Searches](/others/frequent-searches) page. If you can't find a solution, join the [support server](https://discord.mocha-bot.xyz/) and ask for help there. - -## Making suggestions - -Use the [`/feedback`](/commands/feedback) slash command from any server the bot is in, or drop a message in the [support server](https://discord.mocha-bot.xyz/). diff --git a/docs/rooms/personalization.md b/docs/rooms/personalization.md index c6bda44..aafe0a5 100644 --- a/docs/rooms/personalization.md +++ b/docs/rooms/personalization.md @@ -30,6 +30,10 @@ The room owner can toggle the flag later. Personalization requires the **Persona - If the webhook is missing (for example, because the server didn't grant **Manage Webhooks**), Mocha falls back to a normal bot message with the standard `[ Server ][ user ] >>` prefix — nothing is lost. - When a channel disconnects, its webhook is deleted. +:::note Needs "Manage Webhooks" +Personalization only works on servers where Mocha was granted **Manage Webhooks**. The fallback keeps the room functional for servers that didn't grant it, but those channels won't show per-user avatars. There's no warning — if you're running a mixed room, some sides will have personalization and others won't. +::: + ## Things to know - Per-user edits and deletes still work: Mocha tracks the webhook that sent each copy and edits/deletes via that webhook. diff --git a/docs/rooms/tags.md b/docs/rooms/tags.md new file mode 100644 index 0000000..57fa00a --- /dev/null +++ b/docs/rooms/tags.md @@ -0,0 +1,67 @@ +--- +sidebar_position: 5 +title: Room Tags +description: Assign category tags to your Mocha room so members can find it by topic on the Discover page. Only the room owner can manage tags. +keywords: + - mocha room tags + - discord room categories + - room tag management + - mocha discover +--- + +# Tags + +Tags let you label a room with topic categories — for example `gaming`, `study`, or `dev`. Tagged rooms appear under those categories on the [Discover page](https://mocha-bot.xyz/search), making them easier for new members to find. + +## Who can manage tags + +Only the **room owner** (the channel that ran `room create`) can assign or remove tags. Any member can view the current tags on a room. + +## Slash Commands + +All tag commands operate on the room the current channel is connected to. The channel must be joined to a room for any of them to work. + +### room tag list + +Show the tags currently assigned to this room. + +**Usage** + +```md + /room tag list +``` + +The response is **ephemeral** — only you see it. It shows each tag's name and description in a compact embed. If no tags are assigned, the embed says so. + +### room tag set + +Assign one or more tags from the available tag list. **Owner only.** + +**Usage** + +```md + /room tag set +``` + +Mocha responds with a select menu containing all available tags. Choose one or more and confirm. Tags are cumulative — setting tags does not replace tags assigned in a previous call, it adds to them. + +:::note +Tags are created by Mocha administrators, not by room owners. If the select menu is empty, no tags have been created for your instance yet. +::: + +### room tag remove + +Remove one or more tags currently assigned to this room. **Owner only.** + +**Usage** + +```md + /room tag remove +``` + +Mocha responds with a select menu listing only the tags currently on the room. Choose the ones to remove and confirm. + +## See also + +- [Rooms Overview](/rooms/overview) — key room properties and lifecycle. +- [Web / Discover](/web/discover) — how tags surface rooms on the public search page. diff --git a/docs/tutorials/getting-started.md b/docs/tutorials/getting-started.md index 6f1b20f..061c82a 100644 --- a/docs/tutorials/getting-started.md +++ b/docs/tutorials/getting-started.md @@ -37,6 +37,10 @@ This tutorial walks you through everything you need to get Mocha running in a Di When you're done, the bot will show up in your server member list and be ready to receive slash commands. +:::info Why keep every permission? +Mocha's relay pipeline uses nearly every permission Discord exposes for a chat bot — cutting one usually breaks a subtle feature (personalization falls back to plain text, edits stop propagating, attachments get stripped). The safe default is to grant the full set. +::: + ### Permissions cheat sheet | Permission | Why Mocha needs it | diff --git a/docs/web/pricing.md b/docs/web/pricing.md index 504ab88..149d7af 100644 --- a/docs/web/pricing.md +++ b/docs/web/pricing.md @@ -1,41 +1,77 @@ --- sidebar_position: 3 title: Mocha Pricing and Plans -description: Mocha is free to use. Compare the Starter, Premium, and Pro plans to see which features — edit windows, personalization, room limits, and statistics — each plan unlocks. +description: Mocha is free to use. Compare subscription plans and add-ons on the pricing page, and subscribe directly from Discord with /subscribe or from the web. keywords: - mocha pricing - mocha plans - - starter plan - - premium plan - - pro plan + - mocha subscription - discord bot pricing + - mocha add-ons --- # Pricing -Mocha is **free to use**. The pricing page at [mocha-bot.xyz/pricing](https://mocha-bot.xyz/pricing) lists optional premium plans that unlock additional room features. Payment is accepted in cryptocurrency. +Mocha is **free to use**. Optional premium plans and add-ons unlock additional features. View current plans at [mocha-bot.xyz/pricing](https://mocha-bot.xyz/pricing). -## Plans +## Subscription plans -| Feature | Starter ($5/mo) | Premium ($10/mo) | Pro ($20/mo) | -| ------------------------------- | --------------- | ---------------- | -------------- | -| Server-to-server file sharing | No watermark | + basic logs | + detailed logs | -| Message edit window | 24 hours | 7 days | 14 days | -| Message delete window | 24 hours | 7 days | 14 days | -| Max rooms per server | 2 | 3 | 5 | -| Max channels per room | 2 | 3 | 4 | -| Room statistics | — | Basic | Detailed + CSV export | -| [Personalization](/rooms/personalization) | — | — | Included | +Subscription plans are billed on a recurring interval and apply to your server. The features they unlock are listed in the `/subscribe` command response and on the pricing page. -### What "message window" means +**Feature gates unlocked by premium plans** -How long after sending a message you can still [edit](/chat/messages#edit-message) or [delete](/chat/messages#delete-message) it and have the change propagate across every room channel. +| Feature | Description | +| ------- | ----------- | +| Private Rooms | Password-protect a room so only invited channels can join. | +| Room Invitations | Generate invitation codes for others to join without knowing the room ID. | +| Custom Invitation Aliases | Use a human-readable alias instead of an auto-generated code. | +| Unlimited Invitation Uses | Set invitation `max_usage` to `-1` (no cap). | +| Personalized Messages | Relay messages with the sender's original avatar and name via webhooks. | +| Welcome Messages | Send a welcome embed when a new channel joins the room. | +| Extended Channel Limit | Connect more than the default number of channels to a single room. | -### What "statistics" covers +## Add-ons -- **Basic** — messages sent, active users, messages/day, top 3 active users. -- **Detailed** — all of the above plus custom time ranges, activity graphs, and CSV export. +Add-ons are available as separate purchasable items and can extend individual features on top of a base plan. Add-ons are listed in the **Add-ons** section on the pricing page. + +## Billing intervals + +Plans and add-ons support the following billing types: + +| Type | Description | +| ---- | ----------- | +| Monthly / recurring | Billed on a repeating schedule. Cancel any time — access ends at the period close. | +| One-time | Single payment, permanent access. | +| Lifetime | One payment covers the feature indefinitely. | ## Payment -Payments are handled in crypto only. If you have questions about a plan or payment, reach out via the [support server](https://discord.mocha-bot.xyz/). +Payments are processed through multiple providers for reliability. The active provider options for each plan are shown on the pricing page and in the `/subscribe` command. + +## Subscribing + +**From Discord** + +```md + /subscribe +``` + +Displays your current plan and shows **Subscribe** buttons for available plans with direct checkout links. + +**From the web** + +Visit [mocha-bot.xyz/pricing](https://mocha-bot.xyz/pricing), choose a plan, and click **Subscribe**. You will be redirected to complete payment. + +## Cancellation + +You can cancel a recurring subscription at any time. Access continues until the end of the current billing period. No refund is issued for unused time. + +## Refund policy + +All purchases are final. See the [Refund Policy](https://mocha-bot.xyz/refund-policy) for full details. + +## See also + +- [/subscribe command](/commands/subscribe) — check your plan and subscribe from Discord. +- [Rooms Overview](/rooms/overview) — feature gate details. +- [Personalization](/rooms/personalization) — one of the premium features. diff --git a/docusaurus.config.js b/docusaurus.config.js index 985bb63..0f2ff01 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -20,6 +20,7 @@ const siteKeywords = [ 'discord server bridge', 'cross-server messaging', ]; +const ogImage = 'img/og-image.svg'; /** @type {import('@docusaurus/types').Config} */ const config = { @@ -29,7 +30,7 @@ const config = { baseUrl: '/', trailingSlash: false, onBrokenLinks: 'throw', - favicon: 'img/favicon.ico', + favicon: 'img/logo-mocha.svg', markdown: { hooks: { @@ -46,8 +47,8 @@ const config = { locales: ['en'], }, - // Extra head tags for SEO — canonical hint, robots, theme color, - // structured data for search engines. + // Extra head tags for SEO and PWA — canonical hint, robots, theme color, + // structured data, manifest, and Apple/mask icon links. headTags: [ { tagName: 'meta', @@ -77,6 +78,42 @@ const config = { href: siteUrl, }, }, + { + tagName: 'link', + attributes: { + rel: 'manifest', + href: '/manifest.json', + }, + }, + { + tagName: 'link', + attributes: { + rel: 'apple-touch-icon', + href: '/img/logo-mocha.svg', + }, + }, + { + tagName: 'link', + attributes: { + rel: 'mask-icon', + href: '/img/logo-mocha.svg', + color: '#ffd700', + }, + }, + { + tagName: 'meta', + attributes: { + name: 'apple-mobile-web-app-capable', + content: 'yes', + }, + }, + { + tagName: 'meta', + attributes: { + name: 'apple-mobile-web-app-status-bar-style', + content: 'black', + }, + }, { tagName: 'script', attributes: { @@ -113,8 +150,26 @@ const config = { sidebarPath: require.resolve('./sidebars.js'), editUrl: 'https://github.com/mocha-bot/docs/tree/master/docs/', showLastUpdateTime: true, + showLastUpdateAuthor: true, + }, + blog: { + routeBasePath: 'changelog', + path: 'blog', + blogTitle: 'Changelog', + blogDescription: + 'Release notes, documentation updates, and behind-the-scenes notes from the Mocha team.', + blogSidebarTitle: 'Recent updates', + blogSidebarCount: 'ALL', + postsPerPage: 10, + showReadingTime: false, + feedOptions: { + type: ['rss', 'atom'], + title: 'Mocha Bot Changelog', + description: + 'Release notes and documentation updates for the Mocha Discord bot.', + copyright: `Copyright © ${new Date().getFullYear()} Mocha Bot, Inc.`, + }, }, - blog: false, theme: { customCss: require.resolve('./src/css/custom.css'), }, @@ -122,17 +177,83 @@ const config = { lastmod: 'date', changefreq: 'weekly', priority: 0.5, - ignorePatterns: ['/tags/**'], filename: 'sitemap.xml', }, }), ], ], + plugins: [ + [ + require.resolve('@easyops-cn/docusaurus-search-local'), + /** @type {import('@easyops-cn/docusaurus-search-local').PluginOptions} */ + ({ + hashed: true, + language: ['en'], + docsRouteBasePath: '/', + indexBlog: true, + indexPages: true, + highlightSearchTermsOnTargetPage: true, + searchResultLimits: 10, + searchBarShortcutHint: false, + }), + ], + [ + '@docusaurus/plugin-pwa', + { + debug: false, + offlineModeActivationStrategies: [ + 'appInstalled', + 'standalone', + 'queryString', + ], + swRegister: false, + pwaHead: [ + { + tagName: 'link', + rel: 'icon', + href: '/img/logo-mocha.svg', + }, + { + tagName: 'link', + rel: 'manifest', + href: '/manifest.json', + }, + { + tagName: 'meta', + name: 'theme-color', + content: '#000000', + }, + { + tagName: 'meta', + name: 'apple-mobile-web-app-capable', + content: 'yes', + }, + { + tagName: 'meta', + name: 'apple-mobile-web-app-status-bar-style', + content: 'black', + }, + { + tagName: 'link', + rel: 'apple-touch-icon', + href: '/img/logo-mocha.svg', + }, + { + tagName: 'link', + rel: 'mask-icon', + href: '/img/logo-mocha.svg', + color: '#ffd700', + }, + ], + }, + ], + ], + themeConfig: /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ ({ - image: 'img/logo-mocha.png', + image: ogImage, metadata: [ {name: 'description', content: siteDescription}, {name: 'keywords', content: siteKeywords.join(', ')}, @@ -144,16 +265,18 @@ const config = { {property: 'og:title', content: siteTitle}, {property: 'og:description', content: siteDescription}, {property: 'og:url', content: siteUrl}, - {property: 'og:image', content: `${siteUrl}/img/logo-mocha.png`}, - {property: 'og:image:alt', content: 'Mocha Bot logo'}, + {property: 'og:image', content: `${siteUrl}/${ogImage}`}, + {property: 'og:image:alt', content: 'Mocha Bot Documentation'}, + {property: 'og:image:width', content: '1200'}, + {property: 'og:image:height', content: '630'}, {property: 'og:locale', content: 'en_US'}, // Twitter {name: 'twitter:card', content: 'summary_large_image'}, {name: 'twitter:title', content: siteTitle}, {name: 'twitter:description', content: siteDescription}, - {name: 'twitter:image', content: `${siteUrl}/img/logo-mocha.png`}, - {name: 'twitter:image:alt', content: 'Mocha Bot logo'}, + {name: 'twitter:image', content: `${siteUrl}/${ogImage}`}, + {name: 'twitter:image:alt', content: 'Mocha Bot Documentation'}, ], colorMode: { defaultMode: 'dark', @@ -167,6 +290,11 @@ const config = { src: 'img/logo-mocha.svg', }, items: [ + { + to: '/changelog', + label: 'Changelog', + position: 'right', + }, { href: 'https://mocha-bot.xyz', position: 'right', @@ -202,6 +330,7 @@ const config = { { title: 'More', items: [ + {label: 'Changelog', to: '/changelog'}, {label: 'GitHub', href: 'https://github.com/mocha-bot'}, { label: 'Edit on GitHub', diff --git a/package.json b/package.json index ef50a67..89278f0 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,9 @@ }, "dependencies": { "@docusaurus/core": "^3.7.0", + "@docusaurus/plugin-pwa": "^3.7.0", "@docusaurus/preset-classic": "^3.7.0", + "@easyops-cn/docusaurus-search-local": "^0.46.0", "@mdx-js/react": "^3.0.0", "clsx": "^2.0.0", "prism-react-renderer": "^2.3.0", diff --git a/src/css/custom.css b/src/css/custom.css index 1012781..a20dfe1 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -295,6 +295,47 @@ div[class*='codeBlockContainer'] { display: none !important; } +/* Code copy button — visible by default on the dark glass background. */ +.theme-code-block button[class*='copyButton'], +.theme-code-block button.clean-btn[class*='copyButton'] { + background: var(--mocha-surface) !important; + border: 1px solid var(--mocha-border-strong) !important; + color: rgba(255, 255, 255, 0.85) !important; + border-radius: 8px; + opacity: 1; + transition: border-color 0.2s ease, background-color 0.2s ease, + color 0.2s ease; +} + +.theme-code-block button[class*='copyButton']:hover { + border-color: var(--mocha-accent) !important; + background: rgba(255, 215, 0, 0.08) !important; + color: var(--mocha-accent) !important; +} + +.theme-code-block button[class*='copyButtonCopied'] { + border-color: var(--mocha-accent) !important; + color: var(--mocha-accent) !important; + background: rgba(255, 215, 0, 0.12) !important; +} + +/* "Last updated" line — muted foot of each doc page. */ +.theme-last-updated { + color: var(--mocha-text-muted); + font-size: 0.85rem; +} + +.theme-last-updated b { + color: var(--mocha-text); + font-weight: 600; +} + +/* Blog (changelog) — match the docs card surface. */ +.blogPostTitle_node_modules-\@docusaurus-theme-classic-lib-theme-BlogPostItem-Header-Title-styles-module, +article.blog-post h2 a { + color: var(--mocha-text); +} + /* Scrollbar (webkit only) */ ::-webkit-scrollbar { width: 10px; diff --git a/src/pages/404.module.css b/src/pages/404.module.css new file mode 100644 index 0000000..b0bd0f4 --- /dev/null +++ b/src/pages/404.module.css @@ -0,0 +1,100 @@ +.notFound { + min-height: calc(100vh - var(--ifm-navbar-height) - 4rem); + display: flex; + align-items: center; + justify-content: center; + padding: 4rem 1rem; +} + +.card { + max-width: 960px; + width: 100%; + background: rgba(255, 255, 255, 0.04); + border: 1px solid rgba(255, 255, 255, 0.12); + border-radius: 20px; + padding: 3rem 2.5rem; + text-align: center; +} + +.code { + font-size: 1rem; + letter-spacing: 0.2em; + text-transform: uppercase; + color: var(--mocha-accent, #ffd700); + font-weight: 700; + margin: 0 0 0.5rem; +} + +.title { + font-size: clamp(2rem, 4vw, 3rem); + font-weight: 800; + letter-spacing: -0.02em; + margin: 0 0 1rem; + color: #fff; +} + +.subtitle { + color: rgba(255, 255, 255, 0.7); + max-width: 560px; + margin: 0 auto 2.5rem; + font-size: 1.05rem; + line-height: 1.55; +} + +.grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); + gap: 1rem; + margin-bottom: 2.5rem; + text-align: left; +} + +.tile { + display: flex; + flex-direction: column; + gap: 0.4rem; + padding: 1.25rem 1.5rem; + background: rgba(255, 255, 255, 0.04); + border: 1px solid rgba(255, 255, 255, 0.12); + border-radius: 14px; + text-decoration: none !important; + color: #fff; + transition: border-color 0.2s ease, background-color 0.2s ease, + transform 0.2s ease; +} + +.tile:hover { + border-color: var(--mocha-accent, #ffd700); + background: rgba(255, 255, 255, 0.08); + transform: translateY(-2px); + color: #fff; +} + +.tileLabel { + font-size: 0.72rem; + text-transform: uppercase; + letter-spacing: 0.14em; + color: var(--mocha-accent, #ffd700); + font-weight: 700; +} + +.tileTitle { + font-size: 1.2rem; + font-weight: 700; +} + +.tileDesc { + font-size: 0.9rem; + color: rgba(255, 255, 255, 0.65); + line-height: 1.4; +} + +.footerLinks { + color: rgba(255, 255, 255, 0.65); + font-size: 0.95rem; + margin: 0; +} + +.footerLinks a { + color: var(--mocha-accent, #ffd700); +} diff --git a/src/pages/404.tsx b/src/pages/404.tsx new file mode 100644 index 0000000..c973143 --- /dev/null +++ b/src/pages/404.tsx @@ -0,0 +1,57 @@ +import React from 'react'; +import Layout from '@theme/Layout'; +import Link from '@docusaurus/Link'; +import styles from './404.module.css'; + +export default function NotFound(): JSX.Element { + return ( + +
+
+

404

+

This page doesn't exist

+

+ The link you followed might be broken, or the page may have moved. + Try one of the starting points below. +

+ +
+ + Start here + Introduction + + What Mocha is and how to get it into your Discord server. + + + + Tutorial + Getting Started + + Invite the bot, create your first room, send a test message. + + + + Reference + Commands + + Every slash command Mocha understands, with options and + examples. + + +
+ +

+ Still stuck?{' '} + Check the FAQ or{' '} + + ask in the support server + + . +

+
+
+
+ ); +} diff --git a/static/img/og-image.svg b/static/img/og-image.svg new file mode 100644 index 0000000..866c56e --- /dev/null +++ b/static/img/og-image.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + MOCHA BOT + Documentation + Drink mocha with people across the universe. + + Tutorials · Commands · Rooms · Chat · Pricing + docs.mocha-bot.xyz + + diff --git a/static/manifest.json b/static/manifest.json new file mode 100644 index 0000000..d03d73a --- /dev/null +++ b/static/manifest.json @@ -0,0 +1,25 @@ +{ + "name": "Mocha Bot Documentation", + "short_name": "Mocha Docs", + "description": "Mocha is a Discord bot that links channels across Discord servers into shared rooms. Tutorials, reference docs, and changelog.", + "start_url": "/", + "scope": "/", + "display": "standalone", + "orientation": "portrait", + "background_color": "#000000", + "theme_color": "#000000", + "icons": [ + { + "src": "/img/logo-mocha.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "any maskable" + }, + { + "src": "/img/logo-mocha.svg", + "sizes": "any", + "type": "image/svg+xml", + "purpose": "any" + } + ] +}