import type { SixtySClient } from '../client.js'; export default async function (client: SixtySClient, args: { type?: string }) { const params: Record | undefined = args.type ? { c: args.type } : undefined; const data = await client.fetch('/hitokoto', params); const text = data.hitokoto || data.content || (typeof data === 'string' ? data : ''); const lines = ['πŸ’¬ 一言', '', `γ€Œ${text}」`]; if (data.from || data.source || data.from_who || data.author) { const author = data.from_who || data.author || ''; const source = data.from || data.source || ''; lines.push(`β€”β€”${author}${source ? `γ€Š${source}》` : ''}`); } return lines.join('\n'); }