Improvements

This commit is contained in:
Ethan Lane 2021-10-04 19:43:53 +01:00
parent d3f9fc4fa0
commit 1a8baecfa1
Signed by: Vylpes
GPG key ID: EED233CC06D12504
4 changed files with 31 additions and 29 deletions

3
.gitignore vendored
View file

@ -113,3 +113,6 @@ events/
# Linux Environment Files # Linux Environment Files
*.swp *.swp
# macOS Environment Files
.DS_Store

View file

@ -61,7 +61,7 @@ representative at an online or offline event.
Instances of abusive, harassing, or otherwise unacceptable behavior may be Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at reported to the community leaders responsible for enforcement at
getgravitysoftware@gmail.com. ethan@vylpes.com.
All complaints will be reviewed and investigated promptly and fairly. All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the All community leaders are obligated to respect the privacy and security of the

View file

@ -12,7 +12,7 @@ This project and everyone participating in it is governed by the VylBot Core Cod
> **Note:** Please don't file an issue to ask a question. You'll get faster results by using the resources below. > **Note:** Please don't file an issue to ask a question. You'll get faster results by using the resources below.
You can ask a question about the project by emailing us at `getgravitysoftware@gmail.com`. You can ask a question about the project by emailing us at `ethan@vylpes.com`.
You can ask a question about the project in the `#development` channel in the [Discord Server](https://discord.gg/UyAhAVp). You can ask a question about the project in the `#development` channel in the [Discord Server](https://discord.gg/UyAhAVp).
@ -32,7 +32,7 @@ There are a few conventions that have developed over time for this project. When
We won't accept pull requests unless these checks pass. If yours fail, simply fix what the bot says until it passes and then get a repo member to review your code. We won't accept pull requests unless these checks pass. If yours fail, simply fix what the bot says until it passes and then get a repo member to review your code.
The rules for the code is based upon [Gravity Software's Config Repo](https://github.com/GetGravitySoft/Config) The rules for the code is based upon [Vylpes' Config Repo](https://github.com/vylpes/Config)
* Variable names should use **Camel Case** * Variable names should use **Camel Case**
* Functions should put **braces on the same line** * Functions should put **braces on the same line**
@ -119,26 +119,26 @@ Enhancement suggestions are tracked as GitHub issues. After you've determined th
Unsure where to begin contributing to VylBot Core? You can start by looking through these `good first` and `help wanted` issues: Unsure where to begin contributing to VylBot Core? You can start by looking through these `good first` and `help wanted` issues:
* [Good first issue](https://github.com/getgravitysoft/vylbot-core/labels/good%20first%20issue) - issues which should only require a few lines of code, and a test or two. * [Good first issue](https://github.com/vylpes/vylbot-core/labels/good%20first%20issue) - issues which should only require a few lines of code, and a test or two.
* [Help wanted](https://github.com/getgravitysoft/vylbot-core/labels/help%20wanted) - issues which should be a bit more involved than `good first` issues. * [Help wanted](https://github.com/vylpes/vylbot-core/labels/help%20wanted) - issues which should be a bit more involved than `good first` issues.
#### Prerequisites #### Prerequisites
In order to download necessary tools, clone the repository, and install dependencies via `npm` you need network access. In order to download necessary tools, clone the repository, and install dependencies via `yarn` you need network access.
You'll need the following tools: You'll need the following tools:
* Git * Git
* NodeJS * NodeJS
Install and build all of the dependencies using `npm` Install and build all of the dependencies using `yarn`
```bash ```bash
cd VylBot Core cd vylbot-core
npm install yarn install
cp config.json.template config.json cp .env.template .env
``` ```
And then use your text editor of choice to fill in the `config.json` file. And then use your text editor of choice to fill in the `.env` file.
#### Build and Run #### Build and Run
@ -147,15 +147,15 @@ If you want to understand how VylBot Core works or want to debug an issue, you'l
First, fork the VylBot Core repository so that you can make a pull request. Then, clone your fork locally: First, fork the VylBot Core repository so that you can make a pull request. Then, clone your fork locally:
```bash ```bash
git clone https://github.com/<your-github-account>/VylBot Core.git git clone https://github.com/<your-github-account>/vylbot-core.git
``` ```
Occasionally, you will want to merge changes in the upstream repository (the official code repo) with your fork. Occasionally, you will want to merge changes in the upstream repository (the official code repo) with your fork.
```bash ```bash
cd VylBot Core cd vylbot-core
git checkout master git checkout master
git pull https://github.com/getgravitysoft/VylBot Core.git master git pull https://github.com/vylpes/vylbot-core.git master
``` ```
Manage any merge conflicts, commit them, and then push them to your fork. Manage any merge conflicts, commit them, and then push them to your fork.
@ -202,20 +202,18 @@ As well as eslint's recommended defaults.
Example Example
```js ```ts
function ban (member) { // hello.ts
let reason = "Example reason"; import { Command, ICommandContext } from "vylbot-core";
let args = [ export class hello extends Command {
"one", constructor() {
"two" super();
]; }
member.ban(reason).then(() => { public override execute(context: ICommandContext) {
// handle then here context.message.reply("Hello");
}).catch(err => { }
// handle error here
});
} }
``` ```
@ -251,7 +249,7 @@ There are a few conventions that have developed over time for this project. When
We won't accept pull requests unless these checks pass. If yours fail, simply fix what the bot says until it passes and then get a repo member to review your code. We won't accept pull requests unless these checks pass. If yours fail, simply fix what the bot says until it passes and then get a repo member to review your code.
The rules for the code is based upon [Gravity Software's Config Repo](https://github.com/getgravitysoft/config) The rules for the code is based upon [Vylpes' Config Repo](https://github.com/vylpes/config)
* Variable names should use **Camel Case** * Variable names should use **Camel Case**
* Functions should put **braces on the same line** * Functions should put **braces on the same line**

View file

@ -5,12 +5,13 @@
"main": "./src/index", "main": "./src/index",
"scripts": { "scripts": {
"build": "tsc", "build": "tsc",
"test": "jest --coverage", "test": "jest",
"test:coverage": "jest --coverage",
"lint": "eslint ." "lint": "eslint ."
}, },
"author": "Vylpes", "author": "Vylpes",
"license": "MIT", "license": "MIT",
"funding": "https://ko-fi.com/gravitysoftware", "funding": "https://ko-fi.com/vylpes",
"dependencies": { "dependencies": {
"discord.js": "^12.3.1", "discord.js": "^12.3.1",
"dotenv": "^10.0.0" "dotenv": "^10.0.0"