Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 1 addition & 30 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,5 @@
# Contributing Guide

New contributers are encouraged to read about the general structure of a discord.js bot before proceeding. Once you are
familiar with the execution flow of such a bot, the execution flow of this codebase will hopefully be easier to follow.

After getting familiar with this codebase, you are encouraged to check for open issues to tackle. **Please create a new
branch to house your contributions.**

Before pushing code to this repository, it would be beneficial for future maintainers to follow the established code
style.

## Code Style

This is an informal code style documentation in lieu of an actual style document such as `.prettierrc`, `.eslintrc`,
`.editorconfig`, etc.

At the time of writing of this document, the general code style used in this repository:

- Uses tab characters (ASCII code `0x09`) for indentations instead of space characters (ASCII code `0x20`)
- Each tab character is equivalent to 4 space characters in width.
- Uses `LF` line endings (ASCII byte sequence `0x0A`) on all platforms, including Windows, which usually uses `CRLF`
(byte sequence `0x0D 0x0A`)
- Uses a single trailing empty line
- Mostly uses [the OTBS variant of K&R style braces](https://en.wikipedia.org/wiki/Indentation_style#OTBS)
- Mostly uses [the Java naming convention](https://en.wikipedia.org/wiki/Naming_convention_(programming)#Java)
- Class, enum, and type names use `PascalCaase`
- Function, variable, and file names use `camelCase`
- Categorizes and sorts `import`s:
- Categorizes by source:
- Top-level: `import { MessageEmbed } from "discord.js";`
- User-defined: `import { formatPeriod } from "../util";`
- Sorts ASCII-betically

As informal and incomplete this document may be, it hopefully still helps ensure a somewhat consistent code style.
This repository uses [EditorConfig](https://editorconfig.org/), [ESLint](https://eslint.org/) and [Prettier](https://prettier.io/). Please ensure especially that you run ESLint and Prettier on your changes before opening a pull request. It's recommended to have these tools installed as extensions in your code editor.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
1. Create an application at the [discord developer portal](https://discord.com/developers/applications)
2. Clone the repository
3. Create a .env file (see example.env) at the repository root
4. [Create a `config.json` file](https://github.com/binusgdc/VCPA/wiki/Setup#configjson) at the repository root
5. Build (`npm build`) and run (`npm start`)
4. Build (`npm build`) and run (`npm start`)

## Contributing

Expand Down