-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
32d6a64
commit bc45edd
Showing
67 changed files
with
14,342 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# editorconfig.org | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
indent_style = tab | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
indent_size = 4 | ||
max_line_length = 140 | ||
|
||
[*.{yaml, yml}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[*.md] | ||
indent_style = space | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
EXPOSED_DOCUSAURUS_PORT=3000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
yarn.lock -diff -merge | ||
yarn.lock linguist-generated=true | ||
* text eol=lf | ||
*.png binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
lerna-debug.log* | ||
|
||
# Tests | ||
/coverage | ||
/.nyc_output | ||
|
||
# IDEs and editors | ||
.vscode | ||
.idea | ||
.project | ||
.classpath | ||
.c9/ | ||
*.launch | ||
.settings/ | ||
*.sublime-workspace | ||
|
||
# IDE - VSCode | ||
.vscode/* | ||
!.vscode/settings.json | ||
!.vscode/tasks.json | ||
!.vscode/launch.json | ||
!.vscode/extensions.json | ||
|
||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
# Lockfile for other package managers | ||
yarn.locl | ||
|
||
# Docker .env file | ||
.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"trailingComma": "none", | ||
"singleQuote": true, | ||
"arrowParens": "avoid", | ||
"endOfLine": "auto", | ||
"printWidth": 100 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Base | ||
FROM node:18 as base | ||
|
||
## Set a default workdir that's easy to remember/use | ||
WORKDIR /opt/app | ||
|
||
## Expose docusaurus default serve port | ||
EXPOSE 3000 | ||
|
||
## Install docusaurus globally | ||
RUN yarn global add docusaurus | ||
|
||
## Set yarn as entrypoint | ||
ENTRYPOINT [ "yarn" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2003 GlobalArt Inc | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<div align="center"> | ||
<h1> | ||
<a href="#"><img src="https://nestcord.globalart.dev/img/logo.png" alt ="NestCord Logo"></a> | ||
</h1> | ||
🤖 A module for creating <b><a href="https://discord.com/">Discord</a> bots</b> using <a href="https://nestjs.com">NestJS</a>, based on <a href="https://discord.js.org/">Discord.js</a> | ||
<br/><br/> | ||
<a href="https://nestcord.globalart.dev">Documentation ✨</a>   <a href="https://github.com/GlobalArtInc/nestcord">Source code 🪡</a>   <a href="https://github.com/GlobalArtInc/nestcord/tree/master/examples">Examples 🛠️</a>   <a href="https://discord.gg/BBFhU8g">Community 💬</a> | ||
</div> | ||
|
||
|
||
<br/> | ||
|
||
<p align="center"> | ||
<a href='https://img.shields.io/npm/v/@globalart/nestcord'><img src="https://img.shields.io/npm/v/@globalart/nestcord" alt="NPM Version" /></a> | ||
<a href='https://img.shields.io/npm/l/@globalart/nestcord'><img src="https://img.shields.io/npm/l/@globalart/nestcord" alt="NPM License" /></a> | ||
<a href='https://img.shields.io/npm/dm/@globalart/nestcord'><img src="https://img.shields.io/npm/dm/@globalart/nestcord" alt="NPM Downloads" /></a> | ||
<a href='https://img.shields.io/github/last-commit/GlobalArtInc/nestcord'><img src="https://img.shields.io/github/last-commit/GlobalArtInc/nestcord" alt="Last commit" /></a> | ||
</p> | ||
|
||
|
||
## About | ||
|
||
This package uses the best of the NodeJS world under the hood. [Discord.js](https://github.com/discordjs/discord.js) is the most powerful | ||
library for creating bots and [Nest.js](https://github.com/nestjs) is a progressive framework for creating well-architectured applications. | ||
This module provides fast and easy way for creating Discord bots and deep integration with your NestJS application. | ||
|
||
**Features** | ||
|
||
- Simple. Flexible. Easy to use. | ||
- Ability to create custom decorators. | ||
- Interact with Discord (Slash Commands, Context Menus, Message Components, Listeners). | ||
- Full support of NestJS guards, interceptors, filters and pipes! | ||
|
||
For questions and support please use | ||
the [Issues](https://github.com/GlobalArtInc/nestcord/issues/new?assignees=&labels=question&template=question.yml). | ||
|
||
|
||
## How to update documentation? | ||
|
||
This documentation is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator. | ||
|
||
### Installation | ||
|
||
``` | ||
$ yarn | ||
``` | ||
|
||
### Local Development | ||
|
||
``` | ||
$ yarn start | ||
``` | ||
|
||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
label: 'Contributing' | ||
position: 99 | ||
collapsible: true | ||
collapsed: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
--- | ||
id: code-of-conduct | ||
|
||
title: Code of Conduct | ||
|
||
sidebar_position: 2 | ||
--- | ||
|
||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, gender identity and expression, level of experience, | ||
nationality, personal appearance, race, religion, or sexual identity and | ||
orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
- Using welcoming and inclusive language | ||
- Being respectful of differing viewpoints and experiences | ||
- Gracefully accepting constructive criticism | ||
- Focusing on what is best for the community | ||
- Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
- The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
- Trolling, insulting/derogatory comments, and personal or political attacks | ||
- Public or private harassment | ||
- Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
- Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. Examples of | ||
representing a project or community include using an official project e-mail | ||
address, posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. Representation of a project may be | ||
further defined and clarified by project maintainers. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at [http://contributor-covenant.org/version/1/4][version] | ||
|
||
[homepage]: http://contributor-covenant.org | ||
[version]: http://contributor-covenant.org/version/1/4/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
id: commit-convention | ||
|
||
title: Commit convention | ||
|
||
sidebar_position: 3 | ||
--- | ||
|
||
## Git Commit Message Convention | ||
|
||
:::info | ||
|
||
This is adapted from [Angular's commit convention](https://github.com/conventional-changelog/conventional-changelog/tree/master/packages/conventional-changelog-angular). | ||
|
||
::: | ||
|
||
#### TL;DR: | ||
|
||
Commit titles must match the following regex: | ||
|
||
```js | ||
/^(revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|build|ci|chore|types|wip)(\(.+\))?: .{1,72}/; | ||
``` | ||
|
||
### Full Message Format | ||
|
||
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**: | ||
|
||
``` | ||
<type>(<scope>): <subject> | ||
<BLANK LINE> | ||
<body> | ||
<BLANK LINE> | ||
<footer> | ||
``` | ||
|
||
The **header** is mandatory and the **scope** of the header is optional. | ||
|
||
### Revert | ||
|
||
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. | ||
|
||
### Type | ||
|
||
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. | ||
|
||
Other prefixes are up to your discretion. Suggested prefixes are `docs`, `chore`, `style`, `refactor`, and `test` for non-changelog related tasks. | ||
|
||
### Scope | ||
|
||
The scope refers to which section of the application the changes took place in, such as `SlashCommand`, `ContextMenu`, or `MessageComponents` | ||
|
||
### Subject | ||
|
||
The subject contains a succinct description of the change: | ||
|
||
- Use the imperative, present tense: "change", not "changed" nor "changes" | ||
- do not capitalize the first letter | ||
- do not end you message with a period (.) | ||
|
||
### Body | ||
|
||
Like in the **subject**, use the imperative, present tense | ||
The body should include the motivation for the change and difference with the previous behavior. | ||
|
||
### Footer | ||
|
||
The footer should contain any information about **Breaking Changes** and is also the place to | ||
reference GitHub issues that this commit **Closes**. | ||
|
||
**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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
id: contribution-guide | ||
|
||
title: Contribution Guide | ||
|
||
sidebar_position: 1 | ||
--- | ||
|
||
# Contributing | ||
|
||
If you wish to contribute to the nestcord codebase or documentation, feel free to fork the repository and submit a | ||
pull request. We use ESLint to enforce a consistent coding style, so having that set up in your editor of choice | ||
reduces friction contributing to this project. | ||
|
||
## Setup | ||
|
||
You will need [Node.js](http://nodejs.org) **version 16+**, and [npm](https://www.npmjs.com/). | ||
|
||
To get ready to work on the codebase, please do the following: | ||
|
||
1. Fork & clone the repository. Make sure you're up-to-date with the **master** branch! | ||
2. Install the dependencies using `npm ci` | ||
3. Code your heart out! | ||
4. Run `npm lint` to run ESLint and ensure changes respect our styleguide | ||
5. [Submit a pull request](https://github.com/GlobalArtInc/nestcord/compare) | ||
|
||
A high level overview of tools used: | ||
|
||
- [TypeScript](https://www.typescriptlang.org/) as the development language | ||
- [Eslint](https://eslint.org/) for code-style | ||
- [Prettier](https://prettier.io/) for code formatting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
id: funding | ||
|
||
title: Funding | ||
|
||
sidebar_position: 4 | ||
--- | ||
|
||
# Funding | ||
|
||
NestCord is an open source project with its ongoing development made possible thanks to the support by the community. | ||
This library is a result of the long road, full of sleepless nights, working after hours, and busy weekends. | ||
|
||
If you wish to support NestCord financially, thank you! | ||
You can use the following methods to send your donation: | ||
|
||
- become a backer or sponsor on [OpenCollective](https://opencollective.com/GlobalArtInc) |
Oops, something went wrong.