mirror of
https://github.com/chrononeko/chronocat.git
synced 2024-11-21 22:58:10 +00:00
feat(shell): logger: logiriMessageCreated()
adapt fm
This commit is contained in:
parent
60fa49ae01
commit
a52427bd27
@ -6,8 +6,9 @@ import { blue, cyan, grey } from '../../utils/colors'
|
||||
export const logiriMessageCreated = async (data: object) => {
|
||||
const d = data as Event
|
||||
if (d.type !== 'message-created') return
|
||||
const messages = await new LogiriMessager().send(d.message?.content)
|
||||
return messages.map(
|
||||
const rawMessage = await new LogiriMessager().send(d.message?.content)
|
||||
const message = rawMessage.join('').replace(/\r/g, '').replace(/\n/g, ' ')
|
||||
return [message].map(
|
||||
(x) =>
|
||||
`${blue(
|
||||
link(
|
||||
|
Loading…
Reference in New Issue
Block a user