Skip to content

Release 2.0.3

Latest

Choose a tag to compare

@github-actions github-actions released this 06 Oct 16:00

ver 2.0.3
refactor: use template to simplify handle destruction

  • Add HandleDestructor template for type-safe object destruction
  • Use type aliases for compatibility with existing code
  • Remove redundant OnHandleDestroy implementations
  • Remove some useless property methods
    
    feat: enhance ready and resumed event callbacks
  • Add on_resumed callback support via SetResumedCallback
  • Extend on_ready callback with additional parameters:
  • session_id: WebSocket session ID
  • shard_id: Shard ID for sharded bots
  • guild_count: Number of guilds the bot is in
  • guild_ids: Comma-separated string of guild IDs
  • guild_id_count: Number of guild IDs
  • Provide DiscordReadyCallback and DiscordResumedCallback typeset definitions
    
    feat: implement shutdown callback and improve bot stability
  • Add shutdown callback via SetShutdownCallback
  • Implement graceful WebSocket closure via SendClosePacket
  • Introduce autoFreeHandles parameter to some event callbacks
  • Enhance Start/Stop methods with improved error handling
  • Implement DiscordRole and DiscordInvite object support
    
    feat: add webhook management functionality
  • Implement DiscordGuild.GetWebhooks for retrieving guild webhooks
  • Implement DiscordChannel.GetWebhooks for retrieving channel webhooks
  • Add static method DiscordWebhook.GetGuildWebhooks
  • Provide both instance and static methods for flexibility
    
    feat: add bulk message deletion
  • Implement Discord.DeleteMessageBulk for efficient multi-message deletion
  • Support deleting 2-100 messages in a single API call
  • Add validation for message count constraints
  • More efficient than deleting messages individually
    
    fix: terminate called without an active exception crash
  • Fixed crash in specific server environments when bot is unloaded/stopped
    while still in the initialization phase
  • Improve error handling during bot lifecycle transitions