Releases: McAwesome123/fractal-rhomb
Releases · McAwesome123/fractal-rhomb
[0.8.0] - 2024-12-01
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()
- This function also handles user installs because they cannot use
Security
- Updated dependencies in requirements file (most notably aiohttp)
[0.7.0] - 2024-09-29
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 fromhttps://fractalthorns.com/notifications
- Sends a message in specified news channels upon receiving such a notification
- Can be restarted by bot admin users
- Currently handles
- 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
oraetol/word_dictionary.tsv
; Also supportsaetol/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(?)
- Expected particle format:
- Particles and words can be searched using
/aetol search
- Idioms are displayed separately using
/aetol idioms
- Alphabet can be displayed using
/aetol alphabet
- Requires:
- 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
(frombotchannel
) - Subcommands renamed to
set
,clear
, andclearall
(fromadd
,remove
, andremoveall
)
- Command group renamed to
- 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
Fixed
- Sketch links should now properly link to the sketches
[0.6.1] - 2024-09-05
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
Added
- API coroutines for getting sketches
- API coroutine for searching images, records, record lines
Sketch
andMatchResult
dataclassesItemsUngatheredError
andSketchNotFoundError
exceptionsformat_text
toRecordLine
(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
toNSIRP_EMOJI
Removed
- "Taking too long" message for searches
Fixed
- Image contents cache not being saved
[0.5.0] - 2024-08-28
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.*
- Those will need to be passed as a parameter to
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 forfrom_obj()
Fixed
- Setting the
image
parameter tonone
for/image
no longer gives an exception
* not included in the CHANGELOG.md within this release.
[0.4.0] - 2024-08-27
Added
- A few private commands (-say, -status)
- Discord status
[0.3.1] - 2024-08-19
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
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
- However, if unsure,
- 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
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
- Clearing
- 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 cacheFractalthornsAPI.__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 theNone
imageNewsEntry.from_obj()
making itemsNone
if it doesn't exist- A few discord formatting issues