Skip to content

Commit 58e7b7d

Browse files
authored
Merge pull request #49 from senchabot-opensource/feat/update-docs
feat: update documentation for Discord, Twitch, and Kick bots with ne…
2 parents dcf1494 + 6a92b91 commit 58e7b7d

49 files changed

Lines changed: 1127 additions & 244 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/.vitepress/config.ts

Lines changed: 141 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,69 @@
1+
import { writeFileSync } from 'node:fs'
2+
import { resolve } from 'node:path'
13
import { defineConfig } from 'vitepress'
24

5+
const SITE_URL = 'https://docs.senchabot.com'
6+
7+
function generateSitemap(siteConfig: any) {
8+
const pages = (siteConfig.pages as string[])
9+
.map((path) => {
10+
const url = path.replace(/^\//, '').replace(/\.md$/, '').replace(/\/index$/, '')
11+
const loc = url === '' ? SITE_URL : `${SITE_URL}/${url}`
12+
return ` <url>\n <loc>${loc}</loc>\n </url>`
13+
})
14+
.join('\n')
15+
16+
const sitemap = `<?xml version="1.0" encoding="UTF-8"?>\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n${pages}\n</urlset>`
17+
writeFileSync(resolve(siteConfig.outDir, 'sitemap.xml'), sitemap)
18+
}
19+
20+
const structuredData = {
21+
'@context': 'https://schema.org',
22+
'@graph': [
23+
{
24+
'@type': 'Organization',
25+
name: 'Senchabot',
26+
url: 'https://senchabot.com',
27+
logo: 'https://senchabot.com/senchabot-logo.svg',
28+
sameAs: [
29+
'https://twitter.com/senchabot',
30+
'https://github.com/senchabot-opensource',
31+
'https://discord.com/invite/qUxwcjRzND',
32+
'https://www.youtube.com/@Senchabot',
33+
],
34+
},
35+
{
36+
'@type': 'WebSite',
37+
name: 'Senchabot Documentation',
38+
url: SITE_URL,
39+
potentialAction: {
40+
'@type': 'SearchAction',
41+
target: {
42+
'@type': 'EntryPoint',
43+
urlTemplate: `${SITE_URL}/search?q={search_term_string}`,
44+
},
45+
'query-input': 'required name=search_term_string',
46+
},
47+
},
48+
{
49+
'@type': 'SoftwareApplication',
50+
name: 'Senchabot',
51+
applicationCategory: 'DeveloperApplication',
52+
operatingSystem: 'Any',
53+
offers: {
54+
'@type': 'Offer',
55+
price: '0',
56+
priceCurrency: 'USD',
57+
},
58+
aggregateRating: {
59+
'@type': 'AggregateRating',
60+
ratingValue: '5',
61+
ratingCount: '100',
62+
},
63+
},
64+
],
65+
}
66+
367
// https://vitepress.dev/reference/site-config
468
export default defineConfig({
569
vite: {
@@ -14,6 +78,34 @@ export default defineConfig({
1478
cleanUrls: true,
1579
ignoreDeadLinks: true,
1680

81+
buildEnd: generateSitemap,
82+
83+
transformHead({ pageData, siteConfig }) {
84+
const pagePath = pageData.relativePath.replace(/\.md$/, '').replace(/\/index$/, '')
85+
const canonicalUrl = pagePath === '' ? SITE_URL : `${SITE_URL}/${pagePath}`
86+
const pageTitle = pageData.frontmatter.title || siteConfig.site.title
87+
const pageDescription = pageData.frontmatter.description || siteConfig.site.description
88+
89+
const head: any[] = [
90+
['link', { rel: 'canonical', href: canonicalUrl }],
91+
['meta', { property: 'og:title', content: `${pageTitle} | Senchabot Docs` }],
92+
['meta', { property: 'og:description', content: pageDescription }],
93+
['meta', { property: 'twitter:title', content: `${pageTitle} | Senchabot Docs` }],
94+
['meta', { property: 'twitter:description', content: pageDescription }],
95+
]
96+
97+
// Inject JSON-LD only on the home page
98+
if (pageData.relativePath === 'index.md') {
99+
head.push([
100+
'script',
101+
{ type: 'application/ld+json' },
102+
JSON.stringify(structuredData),
103+
])
104+
}
105+
106+
return head
107+
},
108+
17109
head: [
18110
['link', { rel: 'icon', href: '/favicon.ico' }],
19111
[
@@ -25,38 +117,31 @@ export default defineConfig({
25117
}
26118
],
27119
['meta', { name: 'theme-color', content: '#20AB8C' }],
28-
['meta', { name: 'og:type', content: 'website' }],
29-
['meta', { name: 'og:site_name', content: 'Senchabot' }],
120+
['meta', { property: 'og:type', content: 'website' }],
121+
['meta', { property: 'og:site_name', content: 'Senchabot' }],
122+
['meta', { property: 'og:url', content: SITE_URL }],
30123
[
31124
'meta',
32125
{
33-
name: 'og:image',
34-
content: 'https://avatars.githubusercontent.com/u/125701962'
126+
property: 'og:image',
127+
content: `${SITE_URL}/og-image.svg`
35128
}
36129
],
37130
[
38131
'meta',
39132
{
40-
name: 'og:description',
133+
property: 'og:description',
41134
content:
42135
'A multi-platform Twitch, Kick, and Discord bot for content creators to manage their communities.'
43136
}
44137
],
45138
['meta', { name: 'twitter:site', content: '@senchabot' }],
46-
['meta', { name: 'twitter:card', content: 'summary' }],
47-
[
48-
'meta',
49-
{
50-
name: 'twitter:description',
51-
content:
52-
'A multi-platform Twitch, Kick, and Discord bot for content creators to manage their communities.'
53-
}
54-
],
139+
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
55140
[
56141
'meta',
57142
{
58143
name: 'twitter:image',
59-
content: 'https://avatars.githubusercontent.com/u/125701962'
144+
content: `${SITE_URL}/og-image.svg`
60145
}
61146
],
62147
['meta', { name: 'robots', content: 'index,follow' }],
@@ -240,11 +325,21 @@ export default defineConfig({
240325
// link: "/discord-bot/reminder-system",
241326
// },
242327
]
328+
},
329+
{
330+
text: 'Planned',
331+
collapsed: true,
332+
items: [
333+
{
334+
text: 'YouTube Commands',
335+
link: '/discord-bot/commands#planned'
336+
}
337+
]
338+
},
339+
{
340+
text: 'Variables',
341+
link: '/discord-bot/variables'
243342
}
244-
// {
245-
// text: "Variables",
246-
// link: "/discord-bot/variables",
247-
// },
248343
]
249344
},
250345
{
@@ -276,11 +371,13 @@ export default defineConfig({
276371
link: '/kick-bot/command-timer-system'
277372
}
278373
]
374+
},
375+
{
376+
text: 'Variables',
377+
link: '/kick-bot/variables'
279378
}
280379
]
281-
}
282-
// Variables - Twitch & Discord
283-
// { text: "Variables", link: "/variables" },
380+
},
284381
]
285382
}
286383
},
@@ -396,11 +493,21 @@ export default defineConfig({
396493
// link: "/tr/discord-bot/reminder-system",
397494
// },
398495
]
496+
},
497+
{
498+
text: 'Planlandı',
499+
collapsed: true,
500+
items: [
501+
{
502+
text: 'YouTube Komutları',
503+
link: '/tr/discord-bot/commands#planned'
504+
}
505+
]
506+
},
507+
{
508+
text: 'Değişkenler',
509+
link: '/tr/discord-bot/variables'
399510
}
400-
// {
401-
// text: "Değişkenler",
402-
// link: "/tr/discord-bot/variables",
403-
// },
404511
]
405512
},
406513
{
@@ -427,11 +534,15 @@ export default defineConfig({
427534
text: 'Custom API Sistemi',
428535
link: '/tr/kick-bot/custom-api-system'
429536
},
430-
{
431-
text: 'Komut Zamanlayıcı Sistemi',
432-
link: '/tr/kick-bot/command-timer-system'
433-
}
537+
{
538+
text: 'Komut Zamanlayıcı Sistemi',
539+
link: '/tr/kick-bot/command-timer-system'
540+
}
434541
]
542+
},
543+
{
544+
text: 'Değişkenler',
545+
link: '/tr/kick-bot/variables'
435546
}
436547
]
437548
}

docs/discord-bot/commands.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
# Commands
1+
---
2+
title: Discord Bot — Commands
3+
description: Complete reference for Senchabot Discord slash commands including Twitch and Kick live stream announcement management, purge, and server settings.
4+
---
5+
6+
# Discord Bot — Commands
27

38
## System Commands <Badge type="warning" text="NEW"/>
49

@@ -14,6 +19,7 @@
1419
| /do-not-track-my-messages | Opt out of message tracking. |
1520
| /track-my-messages | Opt in to message tracking. |
1621
| /cmds | List available commands for the server. |
22+
| /help | Show system command list. |
1723

1824
::: info Information
1925

@@ -107,6 +113,16 @@ Custom slash command management commands are documented in [`Custom Commands`](/
107113
</a>
108114
</div>
109115

116+
## Planned {#planned}
117+
118+
The following commands are planned but not yet active:
119+
120+
| Command | Description |
121+
| :-- | :-- |
122+
| /set-youtube | Add YouTube livestream announcement for a channel. |
123+
| /del-youtube | Remove YouTube livestream announcement. |
124+
| /youtube-list | List tracked YouTube channels. |
125+
110126
<!-- Reminder System - CONTENT REFERANCE SMALL -->
111127
<style src="@theme/style.css" scoped></style>
112128
<div>
@@ -121,5 +137,5 @@ Custom slash command management commands are documented in [`Custom Commands`](/
121137
<br/>
122138

123139
::: info Cooldown System
124-
Command usage cooldown time is 2 seconds per user.
140+
Command usage cooldown time is 1 second per user.
125141
:::

docs/discord-bot/custom-api-system.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,21 @@
11
---
22
outline: [2, 3]
3+
title: Discord Bot — Custom API System
4+
description: Fetch external data into your Discord custom commands using the Senchabot Custom API system.
35
---
46

5-
# Custom API System <Badge type="warning" text="NEW"/>
7+
# Discord Bot — Custom API System <Badge type="warning" text="NEW"/>
68

79
This system allows you to send a GET request to a URL through the specified template and receive a response through a custom command you have added to your channel.
810

911
```
1012
{customapi.https://...}
1113
```
1214

15+
::: tip Limitation
16+
Only **one** `{customapi.https://...}` tag is processed per command response.
17+
:::
18+
1319
#### Adding Commands to Your Server
1420

1521
```

docs/discord-bot/custom-commands.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
---
22
outline: [2, 3]
3+
title: Discord Bot — Custom Commands
4+
description: Create, update, delete, and alias custom slash commands for your Discord server with Senchabot.
35
---
46

5-
# Custom Commands <Badge type="warning" text="NEW"/>
7+
# Discord Bot — Custom Commands <Badge type="warning" text="NEW"/>
68

79
## Server Commands
810

docs/discord-bot/getting-started.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
# Getting Started
1+
---
2+
title: Discord Bot — Getting Started
3+
description: Invite Senchabot to your Discord server and start managing your community with slash commands, Twitch and Kick live stream announcements, and moderation tools.
4+
---
5+
6+
# Discord Bot — Getting Started
27

38
## Invite to Your Discord Server
49

0 commit comments

Comments
 (0)