Skip to content

Commit

Permalink
[docs only] Message referencing docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyrobbrt committed Aug 9, 2024
1 parent 15aec23 commit 838da26
Show file tree
Hide file tree
Showing 13 changed files with 1,065 additions and 2,993 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'docs/docs/.vuepress/dist/'
path: 'docs/docs/.vitepress/dist/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
6 changes: 3 additions & 3 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
node_modules
docs/.vuepress/
!docs/.vuepress/public
!docs/.vuepress/config.js
docs/.vitepress/.cache/
docs/.vitepress/cache/
docs/.vitepress/dist/
48 changes: 48 additions & 0 deletions docs/docs/.vitepress/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
export default {
lang: 'en-US',

title: 'Camelot',
description: 'Documentation for the Camelot Discord bot',
base: '/Camelot/',

themeConfig: {
logo: '/hero.png',
sidebar: [
{
text: 'Setting up Camelot',
link: '/get-started'
},
{
text: 'Modules',
link: '/modules/',
collapsed: false,
items: [
{
text: 'Moderation',
link: '/modules/moderation'
},
{
text: 'Counters',
link: '/modules/counters'
},
{
text: 'Message Referencing',
link: '/modules/message-referencing'
}
]
}
],
nav: [{
text: 'Setting up Camelot',
link: '/get-started',
}, {
text: 'Modules',
link: '/modules/',
activeMatch: '/modules/'
}],
footer: {
message: 'Released under the MIT License.',
copyright: 'Copyright © 2024 NeoForged'
}
}
}
47 changes: 0 additions & 47 deletions docs/docs/.vuepress/config.js

This file was deleted.

23 changes: 0 additions & 23 deletions docs/docs/README.md

This file was deleted.

26 changes: 26 additions & 0 deletions docs/docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
layout: home
title: Camelot
hero:
text: Powerful Discord bot
tagline: Customize your Discord experience
image:
src: /hero.png
alt: Camelot
actions:
- text: Get Started running Camelot
link: /get-started.html
theme: brand

- text: Module documentation
link: /modules/
theme: alt

features:
- title: Modular
details: Pick and choose the features you want
- title: Customizable
details: Configure most features to your liking
- title: Powerful
details: Make use of custom commands in the form of powerful JavaScript tricks
---
3 changes: 3 additions & 0 deletions docs/docs/modules/counters.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ The counters module (id: `counters`, configuration class: `Counters`) provides u
- `<counter>==`: gets a counter's value

For instance, `derps++` increments the value of the `derps` counter by 1.

## Bot Permissions
The following bot permissions are required by this module: `Send Messages`.
2 changes: 1 addition & 1 deletion docs/docs/modules/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ By default, the following modules are enabled:
- File Preview (must have a PAT configured to work)
- Info Channels (must have a PAT configured to work)
- Logging
- Message Referencing
- [Message Referencing](./message-referencing)
- [Moderation](./moderation)
- Quotes
- Reminders
Expand Down
22 changes: 22 additions & 0 deletions docs/docs/modules/message-referencing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Message Referencing Module
The message referencing module (id: `message-referencing`, configuration class: `MessageReferencing`) will automatically convert
Discord message links and dot-replies sent in chat to embeds.
This way, a conversation that references to an older message can be linear, without needing to jump to other channels.

## Reference embed
![Reference embed](./message-referencing.png)
The timestamp of the embed is the date at which the referenced message was sent.
The footer displays the member that referenced the message, **unless** the author of the referenced message and the referencer are the same.

## Triggering
A message reference may be triggered in multiple ways:
- replying with just `.` or `^` to a message; the reply will be deleted unless it is a ping reply
- sending a message that starts with a Discord message link; your message will be deleted if it is just a message link

## Leaking private channels
By design, Camelot does **not** check the permissions of the member referencing a message, or the channel the reference is invoked in.
This means that a message from a private channel may be accidentally _or intentionally_ leaked if a link to it is sent in a public channel.
To avoid it when not desired, you may surround the link the same way you suppress embeds (`<https://discord.com/....>`).

## Bot Permissions
The following bot permissions are required by this module: `Send Messages`, `Read Message History`, `Manage Messages`.
Binary file added docs/docs/modules/message-referencing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading

0 comments on commit 838da26

Please sign in to comment.