Compare commits
3 Commits
88710c18ea
...
4738c6bea1
Author | SHA1 | Date | |
---|---|---|---|
4738c6bea1 | |||
324973cc13 | |||
56b43d8e16 |
13
README.md
13
README.md
@ -1 +1,14 @@
|
|||||||
# A DiscordJS Template
|
# A DiscordJS Template
|
||||||
|
|
||||||
|
## Getting started
|
||||||
|
|
||||||
|
- Clone this repository:
|
||||||
|
```
|
||||||
|
https://git.baipyr.us/Baipyrus/DiscordJS.git
|
||||||
|
```
|
||||||
|
- Remove example commands:
|
||||||
|
- Either permanently delete directory `commands/examples/`
|
||||||
|
- Or move `commands/examples/` elsewhere, commit deletion, add to [`.gitignore`](.gitignore) and move back in
|
||||||
|
- Look through, copy and/or modify the [examples](commands/examples/).
|
||||||
|
- Either read a [guide](https://discordjs.guide/)!
|
||||||
|
- Or read the [docs](https://discord.js.org/docs)!
|
||||||
|
@ -40,7 +40,7 @@ readdirAsync(mainPath)
|
|||||||
await Promise.all(
|
await Promise.all(
|
||||||
categories.map(async (category) => {
|
categories.map(async (category) => {
|
||||||
const catPath = join(mainPath, category);
|
const catPath = join(mainPath, category);
|
||||||
const files = (await readdirAsync(catPath)).filter((file) => file.endsWith('.js'));
|
const files = (await readdirAsync(catPath)).filter((file) => file.endsWith('.js') && !file.endsWith('.example.js'));
|
||||||
// For each command file
|
// For each command file
|
||||||
return await Promise.all(
|
return await Promise.all(
|
||||||
files.map(async (current) => {
|
files.map(async (current) => {
|
||||||
|
2
index.js
2
index.js
@ -38,7 +38,7 @@ readdirAsync(cmdPath)
|
|||||||
categories.map(async (category) => {
|
categories.map(async (category) => {
|
||||||
const catPath = join(cmdPath, category);
|
const catPath = join(cmdPath, category);
|
||||||
const content = await readdirAsync(catPath);
|
const content = await readdirAsync(catPath);
|
||||||
const files = content.filter((file) => file.endsWith('.js'));
|
const files = content.filter((file) => file.endsWith('.js') && !file.endsWith('.example.js'));
|
||||||
// For each command file
|
// For each command file
|
||||||
return await Promise.all(
|
return await Promise.all(
|
||||||
files.map(async (current) => {
|
files.map(async (current) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user