Skip to content

Commit 63c8450

Browse files
authored
Merge pull request #23 from clearfunction/fix/bump-packages
fix: use fetch instead of request
2 parents 4ded13e + a61657d commit 63c8450

File tree

5 files changed

+200
-494
lines changed

5 files changed

+200
-494
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ obj/
1515
*.key
1616
*.swp
1717
.env
18-
.DS_Store
18+
.DS_Store
19+
build/

app.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import 'dotenv/config';
33
import { io, Socket } from 'socket.io-client';
44
import { spawn } from 'node:child_process';
55
import player from 'play-sound';
6-
import request from 'request';
76

87
type PlayUrl = {
98
url: string;
@@ -42,7 +41,7 @@ function playClip(roomName: string, data: PlayClip): void {
4241
if (process.env.USE_LOCAL_SOUNDS === 'true') {
4342
player().play(`static/clips/${data.file}`);
4443
} else {
45-
request(`${urlForRoom(roomName)}/clip/${file}/${volume}`);
44+
fetch(`${urlForRoom(roomName)}/clip/${file}/${volume}`);
4645
}
4746
}
4847

@@ -62,7 +61,7 @@ function sayClip(roomName: string, data: PlayText): void {
6261
if (process.env.USE_LOCAL_SOUNDS === 'true') {
6362
localSay(text);
6463
} else {
65-
request(`${urlForRoom(roomName)}/say/${text}/${volume}`);
64+
fetch(`${urlForRoom(roomName)}/say/${text}/${volume}`);
6665
}
6766
}
6867

0 commit comments

Comments
 (0)