Skip to content

Commit 266d250

Browse files
committed
chore: initial commit 🎉
0 parents  commit 266d250

Some content is hidden

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

74 files changed

+10883
-0
lines changed

.commitlintrc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": ["@commitlint/config-angular"],
3+
"rules": {
4+
"type-enum": [
5+
2,
6+
"always",
7+
["chore", "build", "ci", "docs", "feat", "fix", "perf", "refactor", "revert", "style", "test", "types", "typings"]
8+
],
9+
"scope-case": [0]
10+
}
11+
}

.eslintrc.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"root": true,
3+
"extends": "marine/prettier/node",
4+
"parserOptions": {
5+
"project": "./tsconfig.eslint.json"
6+
},
7+
"ignorePatterns": ["**/dist/*"],
8+
"env": {
9+
"jest": true
10+
}
11+
}

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* text=auto eol=lf

.github/CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to make participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies within all project spaces, and it also applies when
49+
an individual is representing the project or its community in public spaces.
50+
Examples of representing a project or community include using an official
51+
project e-mail address, posting via an official social media account, or acting
52+
as an appointed representative at an online or offline event. Representation of
53+
a project may be further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at https://discord.gg/djs. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

.github/COMMIT_CONVENTION.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
## Git Commit Message Convention
2+
3+
> This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular).
4+
5+
#### TL;DR:
6+
7+
Messages must be matched by the following regex:
8+
9+
```js
10+
/^(revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|build|ci|chore|types|wip)(\(.+\))?: .{1,72}/;
11+
```
12+
13+
#### Examples
14+
15+
Appears under "Features" header, `GuildMember` subheader:
16+
17+
```
18+
feat(GuildMember): add 'tag' method
19+
```
20+
21+
Appears under "Bug Fixes" header, `Guild` subheader, with a link to issue #28:
22+
23+
```
24+
fix(Guild): handle events correctly
25+
26+
close #28
27+
```
28+
29+
Appears under "Performance Improvements" header, and under "Breaking Changes" with the breaking change explanation:
30+
31+
```
32+
perf(core): improve patching by removing 'bar' option
33+
34+
BREAKING CHANGE: The 'bar' option has been removed.
35+
```
36+
37+
The following commit and commit `667ecc1` do not appear in the changelog if they are under the same release. If not, the revert commit appears under the "Reverts" header.
38+
39+
```
40+
revert: feat(Managers): add Managers
41+
42+
This reverts commit 667ecc1654a317a13331b17617d973392f415f02.
43+
```
44+
45+
### Full Message Format
46+
47+
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
48+
49+
```
50+
<type>(<scope>): <subject>
51+
<BLANK LINE>
52+
<body>
53+
<BLANK LINE>
54+
<footer>
55+
```
56+
57+
The **header** is mandatory and the **scope** of the header is optional.
58+
59+
### Revert
60+
61+
If the commit reverts a previous commit, it should begin with `revert:`, followed by the header of the reverted commit. In the body, it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
62+
63+
### Type
64+
65+
If the prefix is `feat`, `fix` or `perf`, it will appear in the changelog. However, if there is any [BREAKING CHANGE](#footer), the commit will always appear in the changelog.
66+
67+
Other prefixes are up to your discretion. Suggested prefixes are `docs`, `chore`, `style`, `refactor`, and `test` for non-changelog related tasks.
68+
69+
### Scope
70+
71+
The scope could be anything specifying the place of the commit change. For example `GuildMember`, `Guild`, `Message`, `TextChannel` etc...
72+
73+
### Subject
74+
75+
The subject contains a succinct description of the change:
76+
77+
- use the imperative, present tense: "change" not "changed" nor "changes"
78+
- don't capitalize the first letter
79+
- no dot (.) at the end
80+
81+
### Body
82+
83+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
84+
The body should include the motivation for the change and contrast this with previous behavior.
85+
86+
### Footer
87+
88+
The footer should contain any information about **Breaking Changes** and is also the place to
89+
reference GitHub issues that this commit **Closes**.
90+
91+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.

.github/CONTRIBUTING.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Contributing
2+
3+
**The issue tracker is only for bug reports and enhancement suggestions. If you have a question, please ask it in the [Discord server](https://discord.gg/djs) instead of opening an issue – you will get redirected there anyway.**
4+
5+
If you wish to contribute to the discord.js codebase or documentation, feel free to fork the repository and submit a
6+
pull request. We use ESLint to enforce a consistent coding style, so having that set up in your editor of choice
7+
is a great boon to your development process.
8+
9+
## Setup
10+
11+
To get ready to work on the codebase, please do the following:
12+
13+
1. Fork & clone the repository, and make sure you're on the **main** branch
14+
2. Run `yarn --immutable` ([install](https://yarnpkg.com/getting-started/install))
15+
3. Code your heart out!
16+
4. Run `yarn test` to run ESLint and ensure any JSDoc changes are valid
17+
5. [Submit a pull request](https://github.com/discordjs/discord.js/compare) (Make sure you follow the [conventional commit format](https://github.com/discordjs/discord.js/blob/main/.github/COMMIT_CONVENTION.md))

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: [iCrawl, amishshah, vladfrangu, kyranet]
2+
open_collective: discordjs
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Bug report
2+
description: Report incorrect or unexpected behavior of an example
3+
labels: [bug, need repro]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
Use Discord for questions: https://discord.gg/djs
9+
- type: dropdown
10+
id: package
11+
attributes:
12+
label: Which example is this bug report for?
13+
options:
14+
- basic
15+
- radio-bot
16+
- recorder
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: description
21+
attributes:
22+
label: Issue description
23+
description: |
24+
Describe the issue in as much detail as possible.
25+
26+
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files into it.
27+
placeholder: |
28+
Steps to reproduce with below code sample:
29+
1. do thing
30+
2. do thing in Discord client
31+
3. observe behavior
32+
4. see error logs below
33+
validations:
34+
required: true
35+
- type: textarea
36+
id: codesample
37+
attributes:
38+
label: Code sample
39+
description: Include a reproducible, minimal code sample. This will be automatically formatted into code, so no need for backticks.
40+
render: typescript
41+
placeholder: |
42+
Your code sample should be...
43+
... Minimal - Use as little code as possible that still produces the same problem (and is understandable)
44+
... Complete - Provide all parts someone else needs to reproduce your problem
45+
... Reproducible - Test the code you're about to provide to make sure it reproduces the problem
46+
- type: input
47+
id: djs-voice-version
48+
attributes:
49+
label: "@discordjs/version version"
50+
description: Which version of @discordjs/voice are you using? Run `npm list <package>` in your project directory and paste the output.
51+
validations:
52+
required: true
53+
- type: input
54+
id: node-version
55+
attributes:
56+
label: Node.js version
57+
description: |
58+
Which version of Node.js are you using? Run `node --version` in your project directory and paste the output.
59+
If you are using TypeScript, please include its version (`npm list typescript`) as well.
60+
placeholder: Node.js version 16.9+ is required for version 14.0.0+
61+
validations:
62+
required: true
63+
- type: input
64+
id: os
65+
attributes:
66+
label: Operating system
67+
description: Which OS does your application run on?
68+
- type: dropdown
69+
id: priority
70+
attributes:
71+
label: Priority this issue should have
72+
description: Please be realistic. If you need to elaborate on your reasoning, please use the Issue description field above.
73+
options:
74+
- Low (slightly annoying)
75+
- Medium (should be fixed soon)
76+
- High (immediate attention needed)
77+
validations:
78+
required: true
79+
- type: input
80+
id: dev-release
81+
attributes:
82+
label: I have tested this issue on a development release
83+
placeholder: d23280c (commit hash)
84+
description: |
85+
The issue might already be fixed in a development release or main. This is not required, but helps us greatly.
86+
\To install the latest development release run `npm i @discordjs/voice@dev` in your project directory.
87+
Run `npm list @discordjs/voice` and use the last part of the printed information (`d23280c` for `@discordjs/[email protected]`)

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Discord server
4+
url: https://discord.gg/djs
5+
about: Please visit our Discord server for questions and support requests.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**Please describe the changes this PR makes and why it should be merged:**

0 commit comments

Comments
 (0)