v0.5.0

v0.3.0 Release Notes

Released


v0.2.1 -> v0.3.0

Summary


Rounds out the Discord attachment IO contract symmetrically with Telegram: SendFiles uploads 1–10 attachments in a single ChannelMessageSendComplex call (no split between single and album like Telegram needs), while Save downloads any user-supplied attachment to disk via UUID-named files with a 25 MiB cap, atomic write, and defensive Size-vs-actual-bytes double check. discord.Input now exposes Attachments []*discordgo.MessageAttachment as a first-class field so handlers can iterate without reaching into Raw.
翻譯把 Discord 的附件 IO 契約補對稱:SendFiles 一次上傳 1-10 個附件,走單一 ChannelMessageSendComplex(Discord 原生支援多附件,不需 telegram 的 single/album 分流);Save 把使用者送進來的 attachment 落地,filename 走 UUID、25 MiB cap、atomic write,並做 Size 欄位與實際讀取雙重核對防欺騙。discord.Input 新增 Attachments []*discordgo.MessageAttachment 一級欄位,handler 不必再翻 Raw 才能拿到附件清單。

Changes


FEAT

  • Add Discord SendFiles for 1-10 attachments and Save for downloads (@pardnchiu) [97aba0d]

翻譯
  • 新增 Discord SendFiles,單次上傳 1-10 個附件
  • 新增 Discord Save,把使用者上傳的 attachment 下載到本地 path(25 MiB cap)
  • discord.Input 暴露 Attachments []*discordgo.MessageAttachment 一級欄位


Scope


  • discord/sendFiles.go — FEAT(新檔;SendFiles(ctx, channelID, replyTo, paths, caption...) 1-10 attachment 入口)
  • discord/save.go — FEAT(新檔;Save(ctx, att, dir) 25 MiB cap、UUID + ext、go-pkg/filesystem atomic write)
  • discord/send.go — UPDATE(Input 新增 Attachments 欄位)
  • discord/dispatch.go — UPDATE(從 m.Attachments 填入 Input.Attachments)
  • cmd/dc/main.go — ADD(file / files 子命令;bot 子命令在 Reply handler 加 Save 到 ./tmp 測試流程)
  • .gitignore — UPDATE(忽略 tmp/)



Generated by SKILL