Skip to content

Error applying config in EventLogger plugin #960

Description

@sbis04

The EventLogger code snippet present on this page shows the config can be applied like this:

import { EventLogger } from 'wechaty-plugin-contrib'
const config = ['login', 'ready', 'message']
wechaty.use(EventLogger(config))

But while adding the EventLogger plugin to a bot, it doesn't take the config like that and produces an error:

EventLogger error

Code snippet of the bot I am trying to build:

import { Wechaty } from 'wechaty'
import { EventLogger } from 'wechaty-plugin-contrib'

const config = ['login', 'ready', 'message']

const bot = new Wechaty({
    name: 'event-logger-bot',
})

bot.use(EventLogger(config))
bot.start()

Let me know how can I apply the config to the EventLogger.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions