Skip to content

botify 1.6 LTS

Latest
Compare
Choose a tag to compare
@robinfriedli robinfriedli released this 13 Oct 16:38
· 12 commits to releases/v1.6 since this release

botify 1 LTS

This long-term-support version of botify 1.6 marks the end of development for botify 1 while development shifts to botify 2 featuring a new web client and improved queue management.
As an LTS release this version will continue to receive bug fixes even after botify 2 is released.

update 1.6.LTS.21 28/02/2021

  • Implemented rate limiting for command submissions
    • Commands can no longer be submitted more frequently than 4 times in 5 seconds with a timout of 1 second when acquiring the permission. If it cannot be acquired or if the execution queue is full the command is not executed and a 15 second timeout is raised.
  • Updated dependencies
    • Updated several dependencies.

update 1.6.LTS.20 26/01/2021

  • Handle audio event in separate thread
    • When using jda-nas all audio events are handled by the same thread that populates the native buffer, meaning when one playback finishes a track and loads the next track it blocks populating the native buffer for all playbacks. This is not an issue without jda-nas because in that case the events are handled by the audio connection thread of the specific guild.
  • Check additional permissions when sending message
    • Check MESSAGE_EMBED_LINKS when sending embeds and MESSAGE_ATTACH_FILES when attaching files.
  • YouTubeService#populateList: fix completing last item
    • The last item was never completed due to incorrect index comparison.

update 1.6.LTS.19 17/01/2021

  • Change default launch option to running as jar
    • Use maven-shade-plugin to enable building shaded jar with all dependencies and adjust launch script to use jar as launch option and add HEAP_SIZE property to specify the -Xmx flag.
  • Add property to adjust or disable native buffer duration
    • Add NATIVE_AUDIO_BUFFER property to enable adjusting the duration of the native buffer used by jda-nas. Also allows to disable jda-nas by setting the value to 0.
  • Other improvements
    • Various minor improvements.

update 1.6.LTS.18 11/01/2021

  • Use jda-nas to enable native audio streaming
    • jda-nas enables using native code to buffer and stream audio to reduce stuttering caused by garbage collection activity if supported by the current platform.

update 1.6.LTS.17 08/01/2021

  • Improved queue widget
    • The queue widget now edits its message on reset rather than deleting and resending.
  • Improved login command
    • The output of the login command was improved and the link is deleted after usage to signal that it cannot be used anymore.

update 1.6.LTS.16 31/10/2020

  • Improved command parsing
    • Improve how arguments and the argument prefix is handled. If an argument prefix is followed by whitespace or is the last character of the command input it is treated as command input or as part of the argument value of the current inline argument definition.
    • Show better error message when encountering a malformed argument definition with an empty argument identifier.
    • Treat the character '=' as part of the argument value if already recording the value.
      • Previous encountering '=' would simply set isRecordingValue to true, which means it is essentially ignored if isRecordingValue is already true.
    • Throw an IllegalEscapeCharacterException if the CommandParser is in escaped mode when terminating, i.e. the last character was the escape character.
      • Previously the escape character would essentially do nothing in that case, which is more confusing to the user than the clear error message they now receive.
    • ArgumentPrefixProperty: validate that the argument prefix is not a reserved meta character as this could lead to unexpected behavior.
  • other improvements and fixes

update 1.6.LTS.15 29/10/2020

  • Improved Spotify to YouTube redirection
    • The algorithm to find the best YouTube video for a given Spotify track has been improved. Note that you might not notice an improvement right away as the old results are still stored and will get updated gradually over the coming month.
  • Improved track loading error messages
    • Error messages shown when failing to load a track now reliably show the correct track when the queue has already skipped to the next track.
  • Update YouTube API quota cost calculation
    • Update how the bot calculates YouTube API quota usage based on the changed quota costs.
  • Various fixes, stability improvements and important dependency updates.

update 1.6.LTS.13 10/02/2020

  • added last_used attribute to SpotifyRedirectIndex and adjust RefreshSpotifyRedirectIndicesTask to only regenerate indices that have been used within the last two weeks, else the index is deleted in order to reduce requests

update 1.6.LTS.11 08/01/2020

  • added support for adding IPv6 blocks for IP rotation when executing certain requests

update 1.6.LTS.4 14/11/2019

  • introduce automatic YouTube API quota management
    • calculate the approximate YouTube API quota cost for each request
    • when the quota usage reaches a certain percentage of the total
      daily quota limit specified in settings.properties, botify will
      switch to using lavaplayer to parse the html response instead of
      using the youtube API wherever possible
    • create CurrentYouTubeQuotaUsage entity with a single row that
      monitors the current quota usage
    • create cron job to reset the quota usage every day at midnight PST,
      which is when YouTube resets the quota
    • create startup task to reset the quota usage if it hasn't been
      updated or reset today, i.e. if the bot was offline when the cron job
      was supposed to run
  • introduce JDA sharding
    • as the production system approaches 2500 guilds JDA requires to split
      the load across multiple shards with separate WebSocket connections
      or Discord will refuse to connect
    • use the ShardManager instead of a single JDA instance
    • the PropertiesLoadingService has been updated with extra convenience
      methods
  • adjust some EmbedMessages to conform to the Discord design update

backend improvements

  • added liquibase framework to run custom change sets on startup for schema changes that are not executed by hibernate hbm2ddl
  • added entity validation through JPA annotations and created the EntityValidationInterceptor to validate entities during a transaction and send validation error messages to discord
  • rework ISnowflakeMap to improve performance and thread safety
    • never iterate over the entry set but access the id map of the ISnowflakeEntrySet directly
  • introduce VersionManager to streamline version management
  • other minor fixes and improvements
    • YouTubeService#populateList: check if the PlaylistItems size does not exceed the amount of HollowYouTubeVideos generated for the playlist in case the playlist grew between checking its size and loading its videos to avoid and IndexOutOfBounds
    • CleanDbCommand: count guilds for which there is still a GuildContext cached as active; in case the guild returns before the GuildContext is cleared the GuildContext should not refer to a deleted GuildSpecification
    • ChartsCommand: skip Playables that are not available anymore
    • VoiceChannelListener#noOtherMembersLeft: ignore bots in the voice channel since leave and join events for bots are ignored