Skip to content

Commit bfa7f15

Browse files
committed
Updated extensions guide
1 parent 9451cf3 commit bfa7f15

File tree

109 files changed

+253
-256
lines changed

Some content is hidden

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

109 files changed

+253
-256
lines changed

EXTENSIONS.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ Create a new `commit.ts` file in your `src` root folder. Copy and paste the code
8888
```ts
8989
import { execSync } from "child_process"
9090
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "fs"
91-
import { join } from "path"
9291
import prompt from "./functions/prompt"
92+
import { join } from "path"
9393
9494
const path = "./metadata"
9595
if (!existsSync(path)) mkdirSync(path)
@@ -119,11 +119,15 @@ async function main() {
119119
).trim()
120120
121121
const fileName = join(path, "changelogs.json")
122-
const json: Record<string, string[]> = existsSync(fileName) ? JSON.parse(readFileSync(fileName, "utf-8")) : {}
122+
const json: Record<string, object[]> = existsSync(fileName) ? JSON.parse(readFileSync(fileName, "utf-8")) : {}
123123
json[version] ??= []
124124
125125
if (!skip) {
126-
json[version].unshift(msg)
126+
json[version].unshift({
127+
message: msg,
128+
timestamp: new Date(),
129+
author: execSync("git config user.name").toString().trim()
130+
})
127131
writeFileSync(fileName, JSON.stringify(json), "utf-8")
128132
}
129133

dist/commit.js

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/commit.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/classes/ApplicationCommand.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)