Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add readLegal functionality #3

Open
wants to merge 1 commit into
base: unstable
Choose a base branch
from
Open

add readLegal functionality #3

wants to merge 1 commit into from

Conversation

appleflyerv3
Copy link
Collaborator

No description provided.


// TODO: This will parse the markdown in the terms directory and get the text from the file (except from the title) and display it in the embed
const data: CreateSlashApplicationCommand = {
name: "legal",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The command name was supposed to be readLegal

description: "The legal document to read",
required: true,
choices: [
{ name: "Terms of Service", value: "tos" },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You forgot the choices "privacy policy" and "terms of service" (long version)

if (contentWithoutTitle.length > 4096) {
const chunks = contentWithoutTitle.match(/.{1,2000}/g) || [];
for (let i = 1; i < chunks.length; i++) {
await responder.respond(chunks[i]);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer you embed this with the title "Content Policy" or "Terms of Service" and abstract code splitting with a module for doing it. It would take in an embed object, and if the field, such as the description, is over the limit, it would add ...(rest of the field). It could also take in a string and have a normal respond message split.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants