This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Plays music in a Discord voice channel, using the "eris" NodeJS Discord wrapper. | |
// Requires ffmpeg (https://github.com/abalabahaha/eris/issues/470). | |
const ytdl = require('ytdl-core') | |
const VOICE_CHANNEL_ID = "VOICE_CHANNEL_ID_HERE" | |
const YOUTUBE_VIDEO = "http://www.youtube.com/watch?v=5qap5aO4i9A" | |
function joinAndPlay() { | |
bot.joinVoiceChannel(VOICE_CHANNEL_ID).catch((err) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var emojiToRole = { | |
'❤️': '730969029392597014', | |
'🧡': '550097270906028042', | |
'💛': '730970455158292582', | |
'💚': '730970493527654531', | |
'💙': '526038406182993941', | |
'💜': '541054776440520744', | |
'🖤': '730970538335404033', | |
'🤍': '730982363605237800', | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
// 2D Sound Zone. | |
// Recommended AudioSource settings: Spatial Blend: 3D. Doppler Level, Spread and reverb zone mix set to 0. | |
// AudioSource will move as close to the player as possible, but will stay within the collider. | |
// Only works with only one Collider2D component. | |
// https://gist.github.com/aDu/d57b923c96f242e28fe029f3980c5123 | |
public class SoundZone : MonoBehaviour |