Skip to content

Commit

Permalink
feat: cocoa 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
leomotors committed Sep 25, 2023
1 parent 9c54f6e commit 1b03c5b
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 83 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"devDependencies": {
"@leomotors/config": "0.11.0",
"@trivago/prettier-plugin-sort-imports": "4.2.0",
"@types/eslint": "8.44.2",
"@types/node": "18.17.18",
"@types/eslint": "8.44.3",
"@types/node": "18.17.19",
"@typescript-eslint/eslint-plugin": "6.7.2",
"@typescript-eslint/parser": "6.7.2",
"eslint": "8.50.0",
Expand Down
4 changes: 4 additions & 0 deletions packages/cocoa-discord/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ See also: [GitHub Releases](https://github.com/Leomotors/cocoa-discord/releases)
- Not all change will be noted, see commits for _full_ changelog
- Some pre-release or beta build may not appear here

## [3.1.0] - 2023-09-25

- feat(template): status embed -> Running On fields now show Bun if is running on Bun

## [3.0.0] - 2023-09-22

- refactor: Package is now pure ESM
Expand Down
3 changes: 2 additions & 1 deletion packages/cocoa-discord/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cocoa-discord",
"version": "3.0.0",
"version": "3.1.0",
"description": "Yet another Discord Bot Utility npm package",
"main": "dist/main/index.js",
"type": "module",
Expand Down Expand Up @@ -34,6 +34,7 @@
"@leomotors/scripts": "3.1.0",
"@types/sinon": "10.0.16",
"@vitest/coverage-v8": "0.34.5",
"bun-types": "1.0.3",
"rimraf": "5.0.1",
"sinon": "16.0.0",
"ts-node": "10.9.1",
Expand Down
11 changes: 10 additions & 1 deletion packages/cocoa-discord/src/template/status.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/// <reference types="bun-types" />
import { APIEmbedField } from "discord-api-types/v10";
import { CommandInteraction, Message } from "discord.js";

Expand All @@ -14,6 +15,14 @@ export interface GetStatusFieldsOption {
botUptime?: string;
}

export function getRuntimeVersion() {
if (typeof Bun !== "undefined") {
return `Bun v${Bun.version}`;
} else {
return `Node.js ${process.version}`;
}
}

/**
* Template Field for Bot Status, deconstruct this in `.addFields()` method
*
Expand Down Expand Up @@ -41,7 +50,7 @@ export async function getStatusFields(
return [
{
name: runningOn ?? "Running On",
value: `${process.platform} ${process.arch}, Node.js ${process.version}`,
value: `${process.platform} ${process.arch}, ${getRuntimeVersion()}`,
inline,
},
{
Expand Down
4 changes: 4 additions & 0 deletions packages/music-module/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ See also: [GitHub Releases](https://github.com/Leomotors/cocoa-discord/releases)
- Not all change will be noted, see commits for _full_ changelog
- Some pre-release or beta build may not appear here

## [1.2.x] - Upcoming Release

- chore: bump play-dl to 1.9.7, removed play-dl patch function

## [1.1.0] - 2023-09-23

- fix: undefined text in embed
Expand Down
2 changes: 1 addition & 1 deletion packages/music-module/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"cocoa-discord": "^3.0.0",
"discord.js": "^14.13.0",
"microsoft-cognitiveservices-speech-sdk": "^1.32.0",
"play-dl": "^1.9.6",
"play-dl": "^1.9.7",
"tslib": "^2.6.2",
"uuid": "^9.0.1"
},
Expand Down
3 changes: 0 additions & 3 deletions packages/music-module/patch.js

This file was deleted.

3 changes: 0 additions & 3 deletions packages/music-module/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,3 @@ export * from "./core/voice.js";
export * from "./core/types.js";

export * from "./adapters/youtube.js";

// TEMP See: https://github.com/play-dl/play-dl/issues/357
export * from "./patch.js";
28 changes: 0 additions & 28 deletions packages/music-module/src/patch.ts

This file was deleted.

0 comments on commit 1b03c5b

Please sign in to comment.