Releases: guacamoledragon/throw-voice
1.2.0
UPDATE
This release is using an outdated version of JDA and people have experienced connection issues. I haven't had the time to release a new version since then, but if you're brave use this build. I haven't tested it, but it should work.
If you want a turnkey solution, check out PawaLite
It's finally here!
I've been working slowly but steadily to close out all the outstanding issues that were open. There's still more work to do but this is probably a good checkpoint.
At a high level, these were the most dramatic changes since the last release:
Added
- Remove Guilds that haven't been active in 30 days (configurable)
- Add Minio as the storage layer
- Bot will upload to Discord if recording is less than 8MB (Discord's limit)
Changed
- Switched from TravisCI to CircleCI
- Bot accepts commands from other bots
- This allows users to script the bot
- Renamed some commands:
- (auto)join
->
(auto)record - (auto)leave
->
(auto)stop
- (auto)join
Removed
- No more alerts, therefore the command the
!alerts
command is gone - Direct dependency on BackBlaze B2
- No default aliases out of the box
Fixed
!autoSave
now saves after User is afk for 2mins- Respect
!saveLocation
and output to the set channel - Bot shouldn't act on it's messages, caused infinite loop with
!help
- Fix
!autoleave
and!autostop
1.1.2
I apologize for the inconvenience, something must've changed with Discord and/or JDA(the Java Discord library) that caused the bot to stop working, but this has forced me to release a new version of the bot with this fix.
The big thing in this release is that autoJoin
is now working!
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog
and this project adheres to Semantic Versioning.
Added
PR | Comments |
---|---|
#53 | Rollbar Logging Improvements |
#60 | Add license scan report and status |
Changed
PR | Comments |
---|---|
#59 | Decreased Logging Frequency |
Fixed
PR | Comments |
---|---|
#57 | Fixed AutoJoin |
#57 | Fixed insufficient permissions issue, bot would report incorrect status |
#61 | Add workaround for bot not recording |
1.0.0
Finally!
I've been working on this release for quite some time. I came upon this codebase
because I needed a bot that could record audio from a channel for a podcast. At
the moment this was the only bot that could do that, but then I realized that it
was no longer maintained. Not to speak ill of the original developers, but the
code as is wasn't maintainable and had several (still has) bugs, so I decided to
port the entire codebase to Kotlin. I made the port because Java is not my
language of choice and it forced me to read and understand all the code that I
decided to inherit. There's still work to do but at this current state, the bot
is stable.
The original goal was to allow anyone cloning this repository to be able to self-
host the bot. I'm currently hosting a public version of this bot at https://www.pawabot.site
but in the case that I'm no longer able to maintain this bot, I'll try to keep the
self-hosting docs up to date so that anyone can have recording capabilities if they
so desire.
TL;DR
For those who do not want to read the changelog, here's a basic summary of all changes:
- Removed
miab
andecho
commands - Recordings are stored outside of Discord, increasing recording limit
- Improved docs to allow others to self-host via Docker or JRE 9
- AutoJoin and AutoLeave temporarily disabled
Changelog
Added
- #1: Maven Support
- #2: Heroku Support (this is borked at the moment)
- #3: Docker Support
- #19: Foreign Key support in SQLite
- #21: Add findOrCreate for Channels
- #28: Logging by the way of Rollbar
- #39: Ability to specify data directory for database and interim recordings
- #40: Add logo
- #47: Add docker-compose.yml
Changed
- #37: Save recordings outside of Discord, which increases recording limit from 8MB to 100MB
- #48: Documentation
Removed
- #7: Remove the need for settings.json instead we're using SQLite
- #41: No more Java (except for one file using for Rollbar)
- #50: Temporarily remove AutoJoin and AutoLeave
Fixed
Clip Recording
Fixed
!clip
is back after being removed in the previous release. For more information about this see #15
TODO
- Don't store recordings in Discord
- Cleanup
CombinedAudioRecorderHandler
- Specify data directory for recordings and database
Reactive Voice Recording
This release overhauls the recording portion of the bot. There were some drastic changes, here's what the old bot did:
- Allocate a buffer of memory prior to recording anything
- Store RAW PCM bytes into buffer
- Out of the entire buffer, only keep about ~8mb of data, then encode to MP3
This has issues because it wastes memory instead we're now doing this:
- Read enough RAW PCM bytes to fill a small buffer
- Encode buffer to MP3
- Store only 8mb of encoded bytes to disk
This is done leveraging RxJava and square/tape
.
Fixed
- Bugs when switching between voice channels, NPEs would get thrown
- Max recording size was about 8mb-ish, now it's exactly 8mb.
- If
!save
was issued, user could not continue to issue the!save
command OutOfMemoryError
no longer happen when recording has started, need more testing but could not provoke in rudimentary testing.
Added
- Dependencies
square/tape
rxjava2
- Updated
kotlin-stdlib:1.2.10
exposed:0.9.1
JDA:3.3.1_303
Removed
!echo
,!miab
, and!clip
commands are now gone. Unless they are wanted by the community, I'm going to say that the main use ofthrow-voice
is to record.Audio{Receive|Send}Listener
are both gone, not needed since Receive got replaced with a better implementation and Send was used byecho
andmiab
.
TODO
- Don't store recordings in Discord
- Cleanup
CombinedAudioRecorderHandler
- Specify data directory for recordings and database
Audio Recording Issues
This release mostly fixes a few issues with recording. Overall, the way recorded data is stored is super confusing. For now we'll be limiting the length of the recordings to ensure that we can at least get some voice data. The road to good recordings is going to be interesting.
Fixed
- Closing the audio connection would cause a ThreadInterruptedException
- Source: discord-jda/JDA#485 (comment)
- If recording was larger than 8MB, the upload would never happen (or say anything). For now, limiting recordings to 8 minutes, which is about the ~7mb which puts us below the Discord upload limit.
Added
- Dockerfile now includes labels for better metadata that MicroBadger can use
- Added
pawa
badge to README.md
TODO
- Don't store recordings in Discord
Database
The initial cut of this codebase was very MVP'ish, it worked, but there were some rough edges. A lot of NPE's would be thrown and it's pretty hard to track them all down, so in this release I focused on porting a lot of the bot commands to Kotlin and in the process explore the paths taken by the codebase in efforts to log and alleviate some of these exceptions being thrown. Additionally, the global settings were being kept in a file, settings.json
, but that limits what you can do, so instead I added a SQLite database to place that. This increased the complexity a bit, but I believe that in the long run it should make it easier to update/add new things.
TL;DR
- Port bot commands to Kotlin (not full port)
- Remove
settings.json
in favour ofsettings.db
(SQLite) - Add logging
Please see deployment section in README.md or visit http://pawabot.site to try this out.
Discord Voice Hotfix
The Discord Voice API changed and the bot wouldn't record. Using a bot before this version will not work.
Self Hosted Release
This is a version of the DiscordEcho bot that can be self-hosted. Additionally, a Heroku ez-button was created for this release.
Deployment instructions copied from README.md
-
Create a Discord Application. You'll need to have both the
Client ID and App Bot User's Token available to configure the bot. -
Download the latest release of
the bot, you're looking forthrow-voice-<version>.jar
. -
Install Java 8
-
Set the following environment variables:
PORT
: Port on which the bot will run it's HTTP server on, strictly speaking not necessary,
but it's convenient.CLIENT_ID
: Your Discord App Client IDBOT_TOKEN
: Your Discord App's App Bot User Token (what a mouthfull!)
-
Start the bot by running:
java -jar throw-voice-<version>.jar
-
Navigate to
http://localhost:<PORT>
to add the bot to your Guild.