tumoiyorozu / discordwerewolf.ts Goto Github PK
View Code? Open in Web Editor NEWDiscord bot for Werewolf GM
Discord bot for Werewolf GM
エラーコードです
@ubuntu:~/DiscordWerewolf.ts$ tsc
src/GameState.ts:346:16 - error TS2790: The operand of a 'delete' operator must be optional.
346 delete this.streams;
~~~~~~~~~~~~
src/HttpServer.ts:134:16 - error TS2790: The operand of a 'delete' operator must be optional.
134 delete this.subscribers;
~~~~~~~~~~~~~~~~
src/HttpServer.ts:135:16 - error TS2790: The operand of a 'delete' operator must be optional.
135 delete this.uid2bid;
~~~~~~~~~~~~
src/HttpServer.ts:136:16 - error TS2790: The operand of a 'delete' operator must be optional.
136 delete this.bid2uid;
~~~~~~~~~~~~
src/HttpServer.ts:137:16 - error TS2790: The operand of a 'delete' operator must be optional.
137 delete this.userState;
~~~~~~~~~~~~~~
src/LiveStream.ts:162:16 - error TS2790: The operand of a 'delete' operator must be optional.
162 delete this.liveMixer
~~~~~~~~~~~~~~
src/LiveStream.ts:163:16 - error TS2790: The operand of a 'delete' operator must be optional.
163 delete this.audioMixer
~~~~~~~~~~~~~~~
src/LiveStream.ts:164:16 - error TS2790: The operand of a 'delete' operator must be optional.
164 delete this.dummyInput1
~~~~~~~~~~~~~~~~
src/LiveStream.ts:165:16 - error TS2790: The operand of a 'delete' operator must be optional.
165 delete this.conn1
~~~~~~~~~~
src/LiveStream.ts:166:16 - error TS2790: The operand of a 'delete' operator must be optional.
166 delete this.conn2
~~~~~~~~~~
src/LiveStream.ts:167:16 - error TS2790: The operand of a 'delete' operator must be optional.
167 delete this.bgmInput
~~~~~~~~~~~~~
src/LiveStream.ts:168:16 - error TS2790: The operand of a 'delete' operator must be optional.
168 delete this.bgmInput2
~~~~~~~~~~~~~~
src/LiveStream.ts:169:16 - error TS2790: The operand of a 'delete' operator must be optional.
169 delete this.bgmFile
・ゲーム途中解散
以下の Dockerfile を書いてみたけど,「tsc」が通らない.そもそもなんか依存関係たり無さそうで「npm install」がダメ?
WSL や AWS の Ubuntu なら動くのに何故…
FROM ubuntu:18.04
#FROM node:12
LABEL maintainer="TumoiYorozu"
WORKDIR /etc/apt
RUN sed -i.bak -e "s/http:\/\/archive\.ubuntu\.com/http:\/\/jp\.archive\.ubuntu\.com/g" /etc/apt/sources.list
WORKDIR /
RUN apt update
RUN apt install -y nodejs npm wget git ffmpeg
RUN npm install n -g
RUN /usr/local/bin/n 12.16.2
RUN apt purge -y nodejs npm
RUN npm install -g typescript
RUN mkdir /src
WORKDIR /src/
RUN git clone https://github.com/TumoiYorozu/DiscordWerewolf.ts.git
WORKDIR /src/DiscordWerewolf.ts/
RUN npm install
RUN tsc
RUN sh ./misc_tools/setFreeBGM/set_dova_syndrome_BGMs.sh
初めまして、質問失礼します。
僕は、このゲームでの霊界で、生存者のボイチャを聞きながら、霊界でがやをいれるように、
チャンネル内の音声を別のチャンネルに転送するBOTを探していました。
しかし、見つけたBOTは、マルチストリームに対応していなく、解決策を募集していたので、
自分もこのような機能を単体で実現してほしいこともあり、Questionという形で書かせていただきました。
こちらが、そのBOTです。
僕も、DiscordBotに関しては完全に初心者なので、お力になれない部分もありますが、
ぜひ、仕組みを教えていただけますでしょうか?
長文失礼しました。
初めまして。ライセンスについてご質問させてください。
DiscordWerewolf.tsにライセンスは設定されていますでしょうか?
(DiscordWerewolf.tsを改造したBotを公開することは可能でしょうか?)
お手数ですがご確認お願いいたします。
discordjs/opusのURLが存在しないのでダウンロードができずに失敗します
修正をお願いします
エラー詳細↓
# npm install
npm WARN deprecated @discordjs/[email protected]: no longer supported
npm WARN deprecated @discordjs/[email protected]: no longer supported
npm ERR! code 1
npm ERR! path /DiscordWerewolf.ts/node_modules/@discordjs/opus
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/DiscordWerewolf.ts/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-linux-x64-musl-1.2.2/opus.node --module_name=opus --module_path=/DiscordWerewolf.ts/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-linux-x64-musl-1.2.2 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | linux | x64
npm ERR! node-pre-gyp info check checked for "/DiscordWerewolf.ts/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-linux-x64-musl-1.2.2/opus.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/discordjs/opus/releases/download/v0.8.0/opus-v0.8.0-node-v93-napi-v3-linux-x64-musl-1.2.2.tar.gz
npm ERR! node-pre-gyp ERR! install response status 404 Not Found on https://github.com/discordjs/opus/releases/download/v0.8.0/opus-v0.8.0-node-v93-napi-v3-linux-x64-musl-1.2.2.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not installable for @discordjs/[email protected] and [email protected] (node-v93 ABI, musl) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/discordjs/opus/releases/download/v0.8.0/opus-v0.8.0-node-v93-napi-v3-linux-x64-musl-1.2.2.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info find Python using Python version 3.8.15 found at "/usr/bin/python3"
npm ERR! gyp http GET https://unofficial-builds.nodejs.org/download/release/v16.9.1/node-v16.9.1-headers.tar.gz
npm ERR! gyp http 200 https://unofficial-builds.nodejs.org/download/release/v16.9.1/node-v16.9.1-headers.tar.gz
npm ERR! gyp http GET https://unofficial-builds.nodejs.org/download/release/v16.9.1/SHASUMS256.txt
npm ERR! gyp http 200 https://unofficial-builds.nodejs.org/download/release/v16.9.1/SHASUMS256.txt
npm ERR! (node:276) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use `node --trace-deprecation ...` to show where the warning was created)
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/DiscordWerewolf.ts/node_modules/@discordjs/opus/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/root/.cache/node-gyp/16.9.1/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/16.9.1',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/16.9.1/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/DiscordWerewolf.ts/node_modules/@discordjs/opus',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: not found: make
npm ERR! gyp ERR! stack at getNotFoundError (/usr/local/lib/node_modules/npm/node_modules/which/which.js:10:17)
npm ERR! gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:57:18
npm ERR! gyp ERR! stack at new Promise (<anonymous>)
npm ERR! gyp ERR! stack at step (/usr/local/lib/node_modules/npm/node_modules/which/which.js:54:21)
npm ERR! gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:71:22
npm ERR! gyp ERR! stack at new Promise (<anonymous>)
npm ERR! gyp ERR! stack at subStep (/usr/local/lib/node_modules/npm/node_modules/which/which.js:69:33)
npm ERR! gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/which/which.js:80:22
npm ERR! gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/index.js:42:5
npm ERR! gyp ERR! stack at /usr/local/lib/node_modules/npm/node_modules/isexe/mode.js:8:5
npm ERR! gyp ERR! System Linux 5.10.16.3-microsoft-standard-WSL2
npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/DiscordWerewolf.ts/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-linux-x64-musl-1.2.2/opus.node" "--module_name=opus" "--module_path=/DiscordWerewolf.ts/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-linux-x64-musl-1.2.2" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
npm ERR! gyp ERR! cwd /DiscordWerewolf.ts/node_modules/@discordjs/opus
npm ERR! gyp ERR! node -v v16.9.1
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/DiscordWerewolf.ts/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-linux-x64-musl-1.2.2/opus.node --module_name=opus --module_path=/DiscordWerewolf.ts/node_modules/@discordjs/opus/prebuild/node-v93-napi-v3-linux-x64-musl-1.2.2 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/DiscordWerewolf.ts/node_modules/@discordjs/node-pre-gyp/lib/util/compile.js:85:20)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:394:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1064:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
npm ERR! node-pre-gyp ERR! System Linux 5.10.16.3-microsoft-standard-WSL2
npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/DiscordWerewolf.ts/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /DiscordWerewolf.ts/node_modules/@discordjs/opus
npm ERR! node-pre-gyp ERR! node -v v16.9.1
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.4.4
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-11-12T18_46_00_296Z-debug.log
・音声周り
・権限周り
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.