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

MVP 1 (0.1.0) #9

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
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
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Code ownership file
* @zorbyte
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
10 changes: 7 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
},
"homepage": "https://github.com/zorbyte/DeX#readme",
"xo": {
"extends": ["xo-typescript"],
"extends": [
"xo-typescript"
],
"esnext": true,
"semicolon": true,
"space": true,
Expand Down Expand Up @@ -104,7 +106,9 @@
"varsIgnorePattern": "^_"
}
],
"no-console": ["error"],
"no-console": [
"error"
],
"no-dupe-class-members": "off",
"@typescript-eslint/unified-signatures": "off"
},
Expand All @@ -123,7 +127,7 @@
"clean-stack": "^2.1.0",
"debug": "^4.1.1",
"didyoumean2": "^3.1.1",
"discord.js": "discordjs/discord.js",
"discord.js": "discordjs/discord.js#master",
"dotenv": "^8.0.0",
"fs-nextra": "^0.4.5",
"keyv": "^3.1.0",
Expand Down
11 changes: 3 additions & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,7 @@ const client = new Client({
disabledEvents: ["TYPING_START"],
});

try {
client.login().catch(error => {
client.log.error(`Failed to bootstrap and log into Discord.`, error);
process.exit(1);
});
} catch (error) {
client.log.error(`An unknown error occurred.`, error);
client.login().catch(error => {
client.log.error(`Failed to bootstrap and log into Discord.`, error);
process.exit(1);
}
});
7 changes: 5 additions & 2 deletions src/lib/utils/Util.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { inspect } from "util";
import { join, extname } from "path";
import { join, relative, extname } from "path";
import { scan } from "fs-nextra";
import chalk from "chalk";
import {
Expand Down Expand Up @@ -60,7 +60,10 @@ class Util {
await Promise.all([...filePaths.keys()]
.map(async filePath => {
const { default: component }: { default: T } = await import(filePath);

if (!component) {
log(`Malformed ${displayTypeName} at ${relative(scanPath, filePath)}.`);
return;
}
const componentName = await loadFunc(component, filePath, scanPath, log);
if (componentName)
log(`Loaded ${displayTypeName} ${componentName}.`);
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"pretty": true,
"removeComments": true,
"resolveJsonModule": true,
"sourceMap": true,
"sourceMap": false,
"strict": true,
"strictBindCallApply": true,
"strictNullChecks": true,
Expand All @@ -39,7 +39,7 @@
"include": [
"configs/**/*",
//"src/**/*",
"src/**/*",
"src/**/*"
//"src/@types/**/*"
]
}