+17
apps/bot/commands/recent.ts
+17
apps/bot/commands/recent.ts
···
1
+
import { logger } from "@tealfmbot/common/logger";
2
+
// import {db} from "@tealfmbot/database/db"
3
+
import { ChatInputCommandInteraction, SlashCommandBuilder } from "discord.js";
4
+
5
+
export default {
6
+
data: new SlashCommandBuilder()
7
+
.setName("recent")
8
+
.setDescription(
9
+
"Show your most recently played track",
10
+
),
11
+
async execute(interaction: ChatInputCommandInteraction) {
12
+
await interaction.reply("recent");
13
+
logger.info(
14
+
`fetching recent track for ${interaction.user.username} in guild ${interaction.guildId} at ${new Date().toJSON()}`,
15
+
);
16
+
},
17
+
};
+1
apps/bot/package.json
+1
apps/bot/package.json
+1
-1
apps/tapper/index.ts
+1
-1
apps/tapper/index.ts
+7
-5
build-and-publish-images.sh
+7
-5
build-and-publish-images.sh
···
1
1
SHA=$(git rev-parse HEAD)
2
2
BUILD_DATE=$(date -u +%Y-%m-%dT%H:%M:%SZ)
3
+
LAST_BUILT=$(date -u +%Y%m%d)
3
4
VERSION=$(git describe --tags --abbrev=0)
4
5
REGISTRY=atcr.io/besaid.zone
5
-
DID=did:plc:qttsv4e7pu2jl3ilanfgc3zn
6
6
7
7
services=(
8
8
web
···
10
10
tapper
11
11
)
12
12
13
-
echo "building container versions: ${VERSION#v}"
13
+
echo "building versioned containers with version ${VERSION#v} and tagging :latest"
14
14
15
15
for svc in ${services[@]}; do
16
16
docker buildx build \
17
17
-t $REGISTRY/discostu$svc:${VERSION#v} \
18
+
-t $REGISTRY/discostu$svc:latest \
19
+
--platform linux/amd64,linux/arm64 \
18
20
--target $svc \
19
21
--build-arg VERSION=${VERSION#v} \
20
22
--build-arg SHA=$SHA \
21
-
--build-arg DID=$DID \
23
+
--build-arg DID=did:plc:qttsv4e7pu2jl3ilanfgc3zn \
22
24
--build-arg BUILD_DATE=$BUILD_DATE \
23
25
--pull \
24
-
--no-cache \
25
-
--push .
26
+
--no-cache .
27
+
# --push .
26
28
done
+4
-3
docker-compose.prod.yml
+4
-3
docker-compose.prod.yml
···
1
+
name: "Disco Stu Compose - Prod"
1
2
services:
2
3
web:
3
4
container_name: web
4
5
restart: always
5
6
build:
6
7
context: .
7
-
dockerfile: Dockerfile
8
+
dockerfile: atcr.io/besaid.zone/discostuweb:1.0
8
9
target: web
9
10
ports:
10
11
- 8002:8002
···
29
30
container_name: tapper
30
31
build:
31
32
context: .
32
-
dockerfile: Dockerfile
33
+
dockerfile: atcr.io/besaid.zone/discostutapper:1.0
33
34
target: tapper
34
35
35
36
depends_on:
···
44
45
restart: always
45
46
build:
46
47
context: .
47
-
dockerfile: Dockerfile
48
+
dockerfile: atcr.io/besaid.zone/discostubot:1.0
48
49
target: bot
49
50
50
51
depends_on:
+53
justfile
+53
justfile
···
1
+
sha := `git rev-parse HEAD`
2
+
build_date := `date -u +%Y-%m-%dT%H:%M:%SZ`
3
+
registry := "atcr.io/besaid.zone"
4
+
5
+
default:
6
+
@just --list
7
+
8
+
release:
9
+
#!/usr/bin/env bash
10
+
VERSION=$(git describe --tags --abbrev=0)
11
+
services=(
12
+
web
13
+
tapper
14
+
bot
15
+
)
16
+
17
+
echo "building versioned containers with version ${VERSION#v} and tagging :latest"
18
+
19
+
for svc in ${services[@]}; do
20
+
docker buildx build \
21
+
-t "{{registry}}"/discostu$svc:${VERSION#v} \
22
+
-t "{{registry}}"/discostu$svc:latest \
23
+
--target $svc \
24
+
--build-arg VERSION=${VERSION#v} \
25
+
--build-arg SHA="{{sha}}" \
26
+
--build-arg DID=did:plc:qttsv4e7pu2jl3ilanfgc3zn \
27
+
--build-arg BUILD_DATE="{{build_date}}" \
28
+
--pull \
29
+
--no-cache \
30
+
--push .
31
+
done
32
+
33
+
latest:
34
+
#!/usr/bin/env bash
35
+
VERSION=$(git describe --tags --abbrev=0)
36
+
services=(
37
+
web
38
+
tapper
39
+
bot
40
+
)
41
+
42
+
for svc in ${services[@]}; do
43
+
docker buildx build \
44
+
-t "{{registry}}"/discostu$svc:latest \
45
+
--target $svc \
46
+
--build-arg VERSION=${VERSION#v} \
47
+
--build-arg SHA="{{sha}}" \
48
+
--build-arg DID=did:plc:qttsv4e7pu2jl3ilanfgc3zn \
49
+
--build-arg BUILD_DATE="{{build_date}}" \
50
+
--pull \
51
+
--no-cache \
52
+
--push .
53
+
done
+4
-3
packages/database/database.d.ts
+4
-3
packages/database/database.d.ts
···
5
5
6
6
import type { ColumnType } from "kysely";
7
7
8
-
export type Generated<T> = T extends ColumnType<infer S, infer I, infer U>
9
-
? ColumnType<S, I | undefined, U>
10
-
: ColumnType<T, T | undefined, T>;
8
+
export type Generated<T> =
9
+
T extends ColumnType<infer S, infer I, infer U>
10
+
? ColumnType<S, I | undefined, U>
11
+
: ColumnType<T, T | undefined, T>;
11
12
12
13
export type Timestamp = ColumnType<Date, Date | string, Date | string>;
13
14