owobot/plugins/chat_player.js

18 lines
449 B
JavaScript
Executable file

module.exports = {
load: (b) => {
b.on("chat_unparsed", data => {
if(data.type == "player" || data.type == "profileless"){
if(data.parsed) return
b.emit('chat', {
json: data.json,
type: data.type,
subtype: `generic_${data.type}`,
uuid: data.uuid,
message: data.message,
nickname: data.nickname,
username: data.username
})
}
})
}
}