Giter Site home page Giter Site logo

dysrhythmic / remedy Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 19 KB

An Elixir Discord bot made with Nostrum for playing audio from various sources (e.g. HTTP streams, local files, YouTube, Twitch, etc.) in voice channels.

License: MIT License

Elixir 94.38% Dockerfile 5.16% Shell 0.46%

remedy's Introduction

Remedy

An Elixir Discord bot made with Nostrum for playing audio from various sources in voice channels.

Setup

When run in a dev environment, the app expects a bot token to be provided in a .env file in the following format: DISCORD_BOT_TOKEN="TOKEN_HERE". You can add your bot token to the .env.example file and rename it to .env.

Next you just need to build the Docker image and run it. Use docker build -f Dockerfile.dev . to build the image in a dev environment where it is receiving the bot token from the .env file. Once built, run it with docker run -it IMAGE_ID_HERE. Since the Dockerfile.dev file builds the image with a default command to run the app in an iex session, the -it arguments should be used in the docker run command to keep the container open so you can interact with it. If this behavior is undesirable then you can change the line CMD ["iex", "-S", "mix"] of the Dockerfile.dev file to be CMD ["mix", "run", "--no-halt"] instead.

If the bot isn't responding to message commands, ensure privileged gateway intents are enabled for the application in your Discord developer portal.

Usage

The bot expects commands to be given via message events rather than slash commands. Commands it listens for are:

  • !ping - Responds with "pong".
  • !summon - Will find the voice channel the user sending the command is in and joins the channel.
  • !leave - Will leave the voice channel it is connected to.
  • !play URL_HERE - Will attempt to play the audio from the given URL. The URL can be any that ffmpeg can read. E.g. !play music/my favorite song.mp3 will play the file my favorite song.mp3 if it exists at that path, and !play http://streams.ilovemusic.de/iloveradio10.mp3 will attempt to play the audio from that HTTP stream.
  • !stream URL_HERE - Will attempt to stream the audio from the given livestream URL using streamlink. E.g. !stream twitch.tv/day9tv will attempt to stream the audio from Day9tv's Twitch channel.
  • !stop - Will stop playback.
  • !pause - Will pause the playback.
  • !resume - Will resume the playback.

License

MIT

remedy's People

Contributors

dysrhythmic avatar

Watchers

 avatar

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.