-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Pull in latest core changes from my private bots * Package updates * Small change to pruning, now it is toggable on a per-queue basis
- Loading branch information
Showing
39 changed files
with
521 additions
and
772 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,6 @@ | ||
TOKEN=TOKEN_HERE | ||
DEVTOKEN=DEV_TOKEN_HERE | ||
SOUNDCLOUD_CLIENT_ID=CLIENT_ID_HERE | ||
SPOTIFY_SECRET_ID=SECRET_ID_HERE | ||
SPOTIFY_CLIENT_ID=CLIENT_ID_HERE | ||
SPOTIFY_REFRESH_TOKEN=REFRESH_TOKEN_HERE |
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
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 @@ | ||
import { execSync } from "child_process"; | ||
import { version } from "typescript" | ||
import { buildSync } from "esbuild"; | ||
|
||
function hash() { | ||
try { | ||
return execSync("git rev-parse --short HEAD").toString().trim(); | ||
} catch (e) { | ||
return "null"; | ||
} | ||
} | ||
|
||
try { | ||
console.log("Building Music Bot..."); | ||
|
||
buildSync({ | ||
entryPoints: ["src/index.ts"], | ||
bundle: true, | ||
packages: "external", | ||
platform: "node", | ||
target: "node22", | ||
format: "esm", | ||
minify: true, | ||
minifyIdentifiers: true, | ||
minifySyntax: true, | ||
minifyWhitespace: true, | ||
mangleQuoted: true, | ||
ignoreAnnotations: true, | ||
treeShaking: true, | ||
outfile: "dist/bundle.js", | ||
define: { | ||
__VERSION__: `"${hash()}"`, | ||
__TYPESCRIPTVERSION__: `"${version}"` | ||
}, | ||
}); | ||
|
||
console.log("Successfully built Music Bot!"); | ||
} catch (err) { | ||
console.error(`Failed to build Music Bot:\n ${err}`); | ||
process.exit(1); | ||
} | ||
|
||
|
||
if (process.argv.includes("--run")) { | ||
console.log("Running Music Bot bundle..."); | ||
try { | ||
execSync("node ./dist/bundle.js", { stdio: "inherit" }); | ||
} catch (_x) { | ||
console.log("Music Bot closed."); | ||
} | ||
} |
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
Oops, something went wrong.