Commit Graph

8 Commits (experimental)

Author SHA1 Message Date
Kami 58270b1fbe PoE2Trade update
- Vastly improved on rate-limiting tolerance
  - Dynamically fetches and assigns any server-imposed rate-limits.
  - Implemented a rolling queue system for filter checks.
    - This effectively means each filter for all users will run one after the other. Increasing time between checks, but prevents rate-limiting.
- Improved notification message embeds to contain more information in a cleaner format
  - Added "implicit mods" to the stats list for better stats report
- Security implementations
  - PoE2 session token is now encrypted in storage
  - Somewhat sensitive data is now obscufated in settings reply
- Improved on listing pricing display
  - Now says "1 x Exalted Orb" instead of simply "1 exalted"
- Added approximated next check times for filters, viewable in notification messages and filters list
- General minor other improvements to readibility, commands, structure, cache, and functionality

Support for per-user-definable session tokens is in the works.
This will allow users to define their own tokens, which are encrypted for security, to reduce on ratelimits imposed by using the global token.
Once this is implemented, those users will benefit from faster checks, providing earlier listing notifications.
This should reduce the risk of missing valuable listings.
2025-03-30 14:46:23 +02:00
Kami f717ad0f14 PoE 2 Trading Site Implementation
This update includes implementation of Path of Exile 2 trading watchlisting, allowing users to get notified on Discord about new listings within the filter criteria.
- Multiple new commands
  - `!poe2trade`
    - DMs a message containing basic usage and instructions.
  - `!poe2trade add <filter_id> [filter_name]`
    - Adds a trade filter to their watchlist.
    - New matches will be sent to the user in a DM.
  - `!poe2trade remove <filter_id | all>`
    - Removes the specified filter from their watchlist.
    - If filter_id is set to `all`, it will clear all filters from their watchlist.
  - `!poe2trade list`
    - Lists the user's watchlisted filters, along with the filter nickname (if assigned).
  - `!poe2trade pause`
    - Stops watchlisting all their filters. No processing nor notifications are performed.
  - `!poe2trade resume`
    - Resumes the watchlisting of the user.
  - `!poe2trade set <key> <value>`
    - Allows admin/owner to modify settings without restarting the bot.
  - `!poe2trade settings`
    - Allows admin/owner to view current settings.
    - Will be updated in the future to allow non-admin users to view non-sensitive settings.
- Automatic notification of new listings in a neatly-formatted embed message
  - Currently, notification embeds contain: item name, item icon, item level, item stats, listed price, seller name (and account hyperlink), filter information, and instructions on removing the filter from watchlist.
  - Notification messages are condensed to avoid spam as much as possible; multiple new listings (up to 10) will be combined into a single message containing several embeds.
- Respects rate limits to avoid getting the bot locked out.
  - These ratelimits are set by GGG and CloudFlare, and are thus very strict. This shouldn't affect usability much however.
- Several minor QoL features

Still very much in active dev, so availability may fluctuate, and features will change.
Current TODO:
- Smart price-to-stat comparison
  - Determine listing value for the user to avoid being scammed, and easily pick up good deals.
  - Will compare item stats and listing price with other items of the same name, level and quality.
- Direct listing hyperlink
  - Currently, PoE 2's trading site does not support direct item links, so this has to be done by dynamically generate a filter that will only result in the relevant listing, providing easy direct access.
2025-03-26 20:42:16 +01:00
Kami d5581710a7 CustomVC Rework
- autoname implementation
    - Automatic channel naming can be toggled with `!customvc autoname`
    - Autoname status can be verified with `!customvc settings`
    - Autonaming will automatically apply game name as channel name if owner plays a game
    - If owner is not playing a game, channel name will default to `{userdisplayname}'s Channel´
    - Currently, checks are performed every 30s, and changes applied after a 5m cooldown
- Minor fix for the latest logging changes
  - Caller function was not correctly listed in log messages. This has been corrected.
2025-03-13 16:57:23 +01:00
Kami 5023ea9919 Reworked internal logging
- All logging functionality has been moved into the Logger class
  - Initiated globally as globals.logger()
  - Logging format changed from `globals.log("message_str", "LEVEL")` => `logger.level("message_str")`
- Minor changes to Twitch authentication
2025-03-13 14:17:43 +01:00
Kami d1faf7f214 Fixed Twitch bug
- Fixed an issue where Twitch users were not registered correctly due to recent DB changes
- Log-level of unidentified users changed from warning to info
- Minor changes to `!customvc`
  - Renamed `bitrate` -> `audio_bitrate`
  - Added `video_bitrate`
  - Changes some help text
  - Fixed certain subcommands which were broken after recent changes
  - Added `autoname` -> Automatically names the voice chat according to game being played by the owner
    - *Needs addiitonal work to implement all features*
2025-03-07 02:16:47 +01:00
Kami cce0f21ab0 Improved platform logging and Custom VC
- Platform logs associated to a message are now associated with platform-specific IDs
- Fixes for `!customvc`, specifically in relation to commands execution.
  - Optimized logic
  - Fixed limits for certain values like VC users limit
  - Better code integrity: now self-references as a Cog
- Lots of minor other tweaks, adjustments, and improvements
2025-03-06 17:53:54 +01:00
Kami 86ac83f34c Added basic custom VC functionality
- Supports a "VC Lobby" voice channel users can join to auto-create their own voice channel
  - That user is then the channel "owner".
  - Allows defining in-chat settings for each custom voice channel.
  - Empty channels auto-delete after 10s
  - Auto-deletes empty channels on startup
  - Auto-asigns the first user owner of the custom voice channel on startup if no data is retained
- Supports several commands:
  - `!customvc` -> Displays some help text
  - `!customvc name <new_name>` -> Renames the voice channel
  - `!customvc claim` -> Claim ownership of the voice channel if the owner has left
  - `!customvc lock` -> Locks the voice channel, preventing non-moderators from joining
  - `!customvc allow <some_user>` -> Allow a user into the locked voice channel
  - `!customvc deny <some_user>` -> Denies a non-mod user access to the voice channel
  - `!customvc unlock` -> Unlocks the voice channel. Denied users are still denied
  - `!customvc bitrate <kbps>` -> Set the bitrate for the voice channel (Should not be used unless needed)
  - `!customvc op <some_user>` -> Assing someone as co-owner of the voice channel
  - `!customvc settings` -> Display the current voice channel settings, including the owner
  - *It should be noted that moderators has the same access as channel owners for moderation purposes*
2025-03-02 01:52:42 +01:00
Kami 766c3ab690 Commands restructuring
- Reorganized commands into separate files for better fault tolerance and feature expandability
- Added basic dynamic bot status
  - Needs additional work. Currently very basic, planned features include fully dynamic mode with automatic alerts and such.
- Minor other tweaks
2025-02-23 17:00:45 +01:00