Skip to content

Releases: McAwesome123/fractal-rhomb

[0.8.0] - 2024-12-01

30 Nov 23:31
ef63353
Compare
Choose a tag to compare

Added

  • An info command for Aetol
  • Changing the status now saves it
  • The ability for the bot to work when user installed

Changed

  • All the if not ctx.response.is_done(): ... else: ... message sends are now handled by a dedicated function instead of copy pasting the same code everywhere
    • This function also handles user installs because they cannot use ctx.send()

Security

  • Updated dependencies in requirements file (most notably aiohttp)

[0.7.0] - 2024-09-29

29 Sep 02:48
72925c6
Compare
Choose a tag to compare

Special thanks to BerylRose (@pierce-smith1) for adding the SSE client, as well as the relevant server logic to fractalthorns!

Added

  • aiohttp-sse-client2 (0.3.0) and RapidFuzz (3.10.0) as dependencies
    • RapidFuzz requires Visual C++ 2019 (:cvheadache:)
  • SSE notification listening (Special Thanks: BerylRose/pierce-smith1)
    • Currently handles news_update notifications from https://fractalthorns.com/notifications
    • Sends a message in specified news channels upon receiving such a notification
    • Can be restarted by bot admin users
  • User agent can have {VERSION_SHORT}, {VERSION_LONG}, or {VERSION_FULL} to serve as a placeholder for the current version
  • Ability to load an Aetol dictionary
    • Requires: aetol/particle_dictionary.tsv or aetol/word_dictionary.tsv; Also supports aetol/idiom_dictionary.tsv
      • Expected particle format: name, meaning, as verb, as noun, notes, category
      • Expected word format: name, meaning, as verb, as noun, formation, category
      • Expected idiom format: name, meaning
      • Dictionaries not included at this time(?)
    • Particles and words can be searched using /aetol search
    • Idioms are displayed separately using /aetol idioms
    • Alphabet can be displayed using /aetol alphabet
  • Bot admin command to save and reload bot data

Changed

  • Reworked bot channel commands to also work for other channel types (currently news)
    • Command group renamed to channel (from botchannel)
    • Subcommands renamed to set, clear, and clearall (from add, remove, and removeall)
  • All "bot admin" or otherwise restricted commands now use the BOT_ADMIN_USERS environment variable
  • All mentions of the version are now sourced from src.fractalrhomb_globals
  • Default user agent now includes the short version
  • Bot data should be slightly easier to read

Fixed

  • Channel parameter description on /channel commands
  • Logging now has proper formatting rather than using f-strings

[0.6.2] - 2024-09-22

22 Sep 06:09
eda9b2b
Compare
Choose a tag to compare

Fixed

  • Sketch links should now properly link to the sketches

[0.6.1] - 2024-09-05

05 Sep 17:10
e7329a1
Compare
Choose a tag to compare

Fixed

  • Description of /search records and /search text
  • Description of the limit parameter of /search records and /search text

[0.6.0] - 2024-09-04

04 Sep 21:40
f4f82f0
Compare
Choose a tag to compare

Added

  • API coroutines for getting sketches
  • API coroutine for searching images, records, record lines
  • Sketch and MatchResult dataclasses
  • ItemsUngatheredError and SketchNotFoundError exceptions
  • format_text to RecordLine (removes random whitespace)
  • Commands for getting sketches
  • Commands for a random image, record, record line
  • Commands for searching images, records, record lines

Changed

  • Increased required message length for warning for chapters
  • Purge commands are now a single command
  • Lowered cache duration and purge cooldown for full record contents
  • Renamed NSIRP_EMOJIS to NSIRP_EMOJI

Removed

  • "Taking too long" message for searches

Fixed

  • Image contents cache not being saved

[0.5.0] - 2024-08-28

28 Aug 05:04
6780a0c
Compare
Choose a tag to compare

Added

  • Image and record related requests now include links to the images and records
    • Those will need to be passed as a parameter to from_obj()
    • Deleting .apicache is recommended as the old cache will cause errors when loading.*

Changed

  • Emojis are now used through environment variables (because they won't be the same for every bot)
  • from_obj() methods no longer require adding arbitrary keys to the objects; those keys have been turned into parameters for from_obj()

Fixed

  • Setting the image parameter to none for /image no longer gives an exception

* not included in the CHANGELOG.md within this release.

[0.4.0] - 2024-08-27

27 Aug 05:19
c25777a
Compare
Choose a tag to compare

Added

  • A few private commands (-say, -status)
  • Discord status

[0.3.1] - 2024-08-19

19 Aug 07:03
57af7ca
Compare
Choose a tag to compare

Fixed

  • The bot should no longer make a very high amount of concurrent requests, leading the server to think it's getting DDOSed (limited concurrent connections to 6 per host)
  • The bot's standard exception handler should now work with exception groups correctly
  • Corrected what exceptions are caught for the standard exception handler

[0.3.0] - 2024-08-17

17 Aug 21:40
0ead206
Compare
Choose a tag to compare

Added

  • Logging for the fractalthorns API handler (mostly info logs regarding cache access (not part of the discord logger; require -rv to be logged))
  • FractalthornsAPI.save_all_caches() method
  • Some protection against redundant cache saves

Changed

  • File IO is now done with Aiofiles
  • Requests are now done with Aiohttp
  • All related functions (and some others) are now async and must be awaited
  • All functions that make requests now expect an aiohttp.ClientSession as the first parameter and return an async request context manager
  • FractalthornsAPI.get_cached_items() now returns a direct copy of the cache with an added expiry time rather than just the stored items
  • Search results can now be grouped by records
  • API cache save and load are no longer private methods
  • Saving cache to disk is no longer the API handler's responsibility (to avoid saving to disk 50 times for one request)
  • Functions that use API should call FractalthornsAPI.save_cache() for the respective cache(s)
    • However, if unsure, FractalthornsAPI.save_all_caches() should be fine to use
  • Timeout for requests increased to 30s (to prevent high amounts of parallel async requests from timing out)
  • Cache folder renamed to .apicache (from __apicache__)

Removed

  • Requests (2.32.3) dependency

Fixed

  • Domain search results should no longer spit out entire records for a single search result.
  • Root logger should now log properly

Security

  • Updated aiohttp to 3.10.3

[0.2.0] - 2024-08-13

13 Aug 13:47
ce3efcd
Compare
Choose a tag to compare

Added

  • Discord bot functionality
    • Includes the following fractalthorns slash commands: /news, /image, /description, /all_images, /chapter, /record, /record_text, /domain_search
    • As well as some miscellaneous slash commands: /license, /purge, /botchannel
  • DISCORD_BOT_TOKEN to .env file (and setup)
  • Retrieving cached items (FractalthornsAPI.get_cached_items())
  • A CacheFetchError if the above fails
  • Title to ImageDescription objects

Changed

  • Replaced Discord.py (2.4.0) with Py-cord (2.6.0)
  • NEWS_ITEMS value is now "news" instead of "news items"
    • Clearing /__apicache__ is recommended to avoid errors
    • Although it might fix itself eventually
  • Cache metadata is now saved whenever any other cache type is saved
  • Certain other cache save/load details
  • Search results cache dict keys are now tuple[str, Literal]
  • FractalthornsAPI.__get_all_images() now purges the images cache
  • FractalthornsAPI.__get_full_episodic() now purges the chapters and records caches

Fixed

  • Return type hinting for FractalthornsAPI.get_single_image()
  • FractalthornsAPI.__get_all_images() no longer returns the None image
  • NewsEntry.from_obj() making items None if it doesn't exist
  • A few discord formatting issues