davidzeng0 / yasha Goto Github PK
View Code? Open in Web Editor NEWAudio Player Interface for Discord.js. Future development moved to https://github.com/davidzeng0/ying-client-node
License: MIT License
Audio Player Interface for Discord.js. Future development moved to https://github.com/davidzeng0/ying-client-node
License: MIT License
Hello,
I have a sound pad bot that plays a lot of audio files directly from disk to reduce load times. Is it possible to implement local files support or is there already a way to do it?
Thank you!
After a few days of playing audio files, it seems like the memory isn't getting released back to the system at all. The rss value increases over time and never goes down.
Things I tried while debugging:
This also seems to be happening with EarTensifier bot as the rss is 2x the heapUsed which is a lot compared to the initial boot values.
hello , once i try to get Duration it send -Infinity
and at getTime it sends Infinity
as you can see here : https://prnt.sc/h6waoX1XHOZa
i used sample code in main github repo
apple music is not working
Since some days, an IO Error occurs while playing songs from YouTube.
/app # node test.js
[Error: I/O error]
Test script:
const { Client, GatewayIntentBits } = require('discord.js');
const { TrackPlayer, VoiceConnection, Source } = require('yasha');
(async () => {
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.GuildModeration,
GatewayIntentBits.GuildMembers,
],
});
await client.login('DISCORD_BOT_TOKEN');
const channel = await client.channels.fetch('VOICE_CHANNEL_ID');
var player = new TrackPlayer();
player.on("error", console.error);
var track = await Source.resolve('https://www.youtube.com/watch?v=dQw4w9WgXcQ');
var connection = await VoiceConnection.connect(channel);
var subscription = connection.subscribe(player);
player.play(track);
player.start();
})()
I'm testing this on WSL2 with Debian unstable inside a Docker container, this worked fine for several months. This is my Dockerfile:
FROM alpine:3.18 AS protoc-js
WORKDIR /tmp
RUN echo "@edge-testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& apk add --no-cache \
bazel5@edge-testing \
build-base \
git \
&& git clone --branch v3.21.2 https://github.com/protocolbuffers/protobuf-javascript \
&& cd protobuf-javascript \
&& bazel build plugin_files \
&& install -o root -g root -m 0755 bazel-bin/generator/protoc-gen-js -t /tmp
FROM node:20.3-alpine AS base
RUN mkdir /app
WORKDIR /app
################################################################################
FROM base AS development
COPY --from=protoc-js /tmp/protoc-gen-js /usr/local/bin
ENV PYTHONUNBUFFERED=1
RUN apk add --no-cache --virtual .build-deps pango-dev jpeg-dev build-base cairo-dev giflib-dev python3 libsodium-dev libtool cmake g++ gcc ffmpeg-dev make git autoconf automake opus-dev libuv-dev protoc msttcorefonts-installer \
&& ln -sf python3 /usr/bin/python \
&& python3 -m ensurepip \
&& pip3 install --no-cache --upgrade pip setuptools
USER node
Log with strace: https://pastebin.com/szVcRfaF
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.