Code Monkey home page Code Monkey logo

walkman's Introduction

walkman

appx. 70 line discord bot that can enqueue ytdl sources for playing in a voice channel

requires discord.py and yt_dlp, but you can use goo 'ol youtube_dl without any issues (probably)

if you (for whatever reason) want to run this, you should be able to understand the commands yourself from a quick glance at the code

instead, this area will be used for a rant:

discord's current implementation of voice channels is, while possibly suitable in mundane usecases, poorly designed and actively hostile to bots. as passed down form out IRC forefathers, a client gets every incoming message in the same way and sorts it out on their end. similarly, the location a message is sent to is just one parameter for a generic 'send message' command. voice channels, as I understand them, are independent UDP connections, separate from the regular websocket connection. because kidsthesedays can't into sharin their IP addresses, the connection on both ends is to discord server and they limit clients to one voice client per oauth/server. the HUGE music bot providers like FredBoat have to keep track of TONS of different tokens for sharding (because you can't be logged into the same token twice other than when you can) and still need SEPARATE discord applications running effectively separate bots so that multiple channels can listen to different music. the entire implementation is poor when looking at it from the angle of the usual method.

i looked at the architecture designs they give (and made my own gateway client), and the use of webrtc for voice/video is actually really cool. separating gateway and voice allows regular chat communication to be done through websockets while the more latency-important stuff can be webrtc relayed by a central server. the individual arch also allows for what is essentially an always-online experience -- voice servers getting packeted are silently and instanteneously swapped out, dropping only a few packets during the process. it would be cool to have a framework for multiple presences on the same Discord Voice server like you can identify multiple times on a gateway, but i'm significantly less irked now.

it really is a shame that they're in the business of kidnapping your data and dragging it over the border, this infra is awesome.

neway thanks for readin' my blog have a nice day

walkman's People

Contributors

kurisufriend avatar

Watchers

 avatar

walkman's Issues

i/o fails during playback

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.