From 2b282540efb71aea255698388c02a41211d00f2b Mon Sep 17 00:00:00 2001 From: Bruce Date: Thu, 13 Apr 2017 14:54:34 +0000 Subject: [PATCH] Updated airhorn readme file --- examples/airhorn/README.md | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/examples/airhorn/README.md b/examples/airhorn/README.md index 984fd6b..3e9348e 100644 --- a/examples/airhorn/README.md +++ b/examples/airhorn/README.md @@ -1,19 +1,23 @@ -Airhorn Example -==== + +## DiscordGo Airhorn Example This example demonstrates how to utilize DiscordGo to listen to an !airhorn -command in a channel and play a sound to that users current voice channel. +command in a channel and play a sound to that user's current voice channel. + +**Join [Discord Gophers](https://discord.gg/0f1SbxBZjYoCtNPP) +Discord chat channel for support.** ### Build This assumes you already have a working Go environment setup and that DiscordGo is correctly installed on your system. +From within the airhorn example folder, run the below command to compile the +example. + ```sh -go install github.com/bwmarrin/discordgo/examples/airhorn -cd $GOPATH/bin -cp ../src/github.com/bwmarrin/discordgo/examples/airhorn/airhorn.dca . +go build ``` ### Usage @@ -24,7 +28,7 @@ Usage of ./airhorn: Bot Token ``` -The below example shows how to start the bot. +The below example shows how to start the bot from the airhorn example folder. ```sh ./airhorn -t YOUR_BOT_TOKEN @@ -32,11 +36,15 @@ The below example shows how to start the bot. ### Creating sounds -Airhorn bot uses DCA files that are pre-computed files that are easy to send to Discord. +Airhorn bot uses [DCA](https://github.com/bwmarrin/dca) files, which are +pre-computed files that are easy to send to Discord. -If you would like to create your own DCA files, please use either: +If you would like to create your own DCA files, please use: * [dca-rs](https://github.com/nstafie/dca-rs) -* [dca](https://github.com/bwmarrin/dca/tree/master/cmd/dca) + +See the below example of creating a DCA file from a WAV file. This also works +with MP3, FLAC, and many other file formats. Of course, you will need to +[install](https://github.com/nstafie/dca-rs#installation) dca-rs first :) ```sh ./dca-rs -i --raw >