Code Monkey home page Code Monkey logo

yuri2's Introduction

⚠️ This repository has been archived in favour of the successor yuri69.


~ Yuri v.2 ~

Faster, harder, louder!
The best Discord sound board in whole North Korea!


        Docker Cloud Automated build

Index


Intro

Yuri is the best Discord sound board in whole North Korea, if you believe it or not! And now, even better with v.2 with way better performance, better code structure, easier installation and a brand new web interface! Also, now, Lavalink is completely implemented as Discord voice backend. With the new, open REST and Web Socket API you are now able to create applications hooking up the Yuri back end!

Screen Shots

Discord Front End


Web Interface


Setup

Runtime Requirements

  • Lavalink
    Lavalink is a stand-alone Discord Voice backend which is used by Yuri for playing sounds in Discord voice Channels.
    You need to download the Lavalink.jar and run it with a custom config. An example for this you can find here.
  • pm2 or screen (or something else liek this)
    You will need a software to deamonize the Lavalink and Yuri instance. In this setup tutorial, I will use pm2. You can also use screen or something else you want to use.

How To

  1. Download the precompiled assets or compile them yourself. Then, place the binary with the web folder in the same location somewhere you want.

  2. Download, configure and run Lavalink.

  3. Start the Yuri binary for the first time. Then, an example config will be created where you need to enter your preferences and credentials for the Discord API and Lavalink connection.

  4. Restart the bot using the created config file.


Compiling

Requirements

  1. Clone the repository to your gopath:

    $ git clone https://github.com/zekroTJA/yuri2 --depth 5 --branch master
    
  2. Now you can simply use the make file which will download and install all needed dependencies and compile the binary:

    $ make
    

    Optionally, you can use the ./scripts/build.sh script to ensure dependencies and compile binaries.

  3. Now, grab the binary located in ./bin and the ./web folder and follow the setup steps.


Used 3rd Party Dependencies

Frontend

Dependency Licence
Bootstrap 4 MIT

Backend

Dependency Licence
my fork of bwmarrin/discordgo BSD-3-Clause
foxbot/gavalink ISC
mattn/go-sqlite3 MIT
ghodss/yaml MIT
op/go-logging BSD-3-Clause
gorilla/websocket BSD-2-Caluse

© 2019 zekro Development (Ringo Hoffmann)
zekro.de | contact[at]zekro.de

yuri2's People

Contributors

zekrotja avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

yuri2's Issues

Use of internal package not allowed.

I am trying to compile this bot from your source and I cannot get around this error.


(1/12) Wrote github.com/op/go-logging@v1
(2/12) Wrote github.com/foxbot/gavalink@master
(3/12) Wrote github.com/zekroTJA/ratelimit@master
(4/12) Wrote gopkg.in/[email protected]
(5/12) Wrote github.com/ghodss/[email protected]
(6/12) Wrote github.com/zekroTJA/timedmap@master
(7/12) Wrote github.com/zekroTJA/discordgo@master
(8/12) Wrote github.com/gorilla/[email protected]
(9/12) Wrote github.com/zekroTJA/[email protected]
(10/12) Wrote golang.org/x/crypto@master
(11/12) Wrote golang.org/x/sys@master
(12/12) Wrote github.com/mattn/[email protected]
cmd/yuri/main.go:13:2: use of internal package bot/yuri2/vendor/github.com/zekroTJA/yuri2/internal/database/sqlite not allowed
cmd/yuri/main.go:16:2: use of internal package bot/yuri2/vendor/github.com/zekroTJA/yuri2/internal/inits not allowed
cmd/yuri/main.go:10:2: use of internal package bot/yuri2/vendor/github.com/zekroTJA/yuri2/internal/logger not allowed
cmd/yuri/main.go:11:2: use of internal package bot/yuri2/vendor/github.com/zekroTJA/yuri2/internal/static not allowed

Sorry I am not very good with the Go lang.

make fails

Did not find a working soundboard runnable on linux, so yours is a last resort and it sounds really promising and impressive regarding the sourcecode.

What I've done:

  • Installed go. Version is 1.7.4 which seems a little dated.
  • Set GOPATH and GOROOT environment vars for go.
  • Put the project in $GOPATH/src

When entering make in project folder I get:


package main
        imports github.com/zekroTJA/yuri2/internal/database/sqlite: use of internal package not allowed
package main
	imports github.com/zekroTJA/yuri2/internal/inits: use of internal package not allowed
package main
	imports github.com/zekroTJA/yuri2/internal/logger: use of internal package not allowed
package main
	imports github.com/zekroTJA/yuri2/internal/static: use of internal package not allowed

Is this a known phenomenon in the go land and maybe erridicated in a later version?

Thanks.

Webinterface rest and websocket

Hello again.

As you suggested in issue #8 to update go, my dummy-self couldn't find the time to update Go manually and managed it with this helper. The "undefined: sort.SliceStable" is gone and I possess a nice "yuri2" executable now.

What I've done:

  • I've registered a bot in discord, obtained the client-id and secret.

In application.yaml:

  • server.port: 2333
  • server.address: 127.0.0.1
  • Entered password in lavalink.server.password

In config.yaml:

  • api.client_id and api.client_secret from Bot-registration
  • discord.owner_id in the format USERNAME#NUMBER
  • lavalink.address: localhost:2333
  • lavalink.password: the same as in application.yaml
  • lavalink.sounds_locations configured

Started the Lavalink.jar:
No error.

Started yuri:

  • No error.
  • Found sounds, too
  • Opened ws://localhost:2333
  • Gave an invite link for the bot

I invited yuri2 to my discord. It entered the building.

Compiled the web-folder with ng.

When I started the development-server, the userinterface is shown on localhost:4200 but it fails to connect to rest and websockets-server on port 8080. Is that the wrong port maybe? I changed it meanwhile to 2333, for testing in rest.service.ts and ws.service.ts. Chrome is giving me this:

Bildschirmfoto

This all looks very promising execpt the last step and as soon as I'm able to broadcast the first sound in my server, I make the installation permanent with pm2 (I guess).

I'm also fine without a web-interface, if I could command yuri2 via discord.

Is the latter possible or can you imagine what the root cause of the failing rest and websocket servers is?

Thanks.

YouTube shorts integration

YouTube shorts are currently not playable in yuris YouTube playback feature since YouTube shorts use a different URL.

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.