🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@vk-io/hear

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vk-io/hear

Hear for the library vk-io

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
59
-53.91%
Maintainers
1
Weekly downloads
 
Created
Source

VK-IO Hear

NPM version Build Status NPM downloads Code quality

VK-IO Hear - Simple implementation of the hears ⚙️

Installation

Node.js 12.0.0 or newer is required

Yarn

Recommended

yarn add @vk-io/hear

NPM

npm i @vk-io/hear

Example usage

import { VK, MessageContext } from 'vk-io';

import { HearManager } from '@vk-io/hear';

const vk = new VK({
	token: process.env.TOKEN
});

const hearManager = new HearManager<MessageContext>();

vk.updates.on('message_new', hearManager.middleware);

hearManager.hear(/^hello$/, async (context) => {
	await context.send('Hello!');
});

vk.updates.start().catch(console.error);

Keywords

vk

FAQs

Package last updated on 18 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts