Socket
Socket
Sign inDemoInstall

@airgram-dev/constants

Package Overview
Dependencies
0
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @airgram-dev/constants

This repository contains [TDLib](https://core.telegram.org/tdlib) (1.4.0) types directory.


Version published
Weekly downloads
3
increased by200%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

TDLib constants

This repository contains TDLib (1.4.0) types directory.

Installation

# npm
npm install @airgram/constants

Basic usage

import { UPDATE } from '@airgram/constants'

function handleUpdate (update) {
    switch (update._) {
      case UPDATE.updateAuthorizationState: 
        // ...
        break
        
      case UPDATE.updateNewMessage: 
        // ...
        break
      case UPDATE.updateNewChat: 
        // ...
        break
    }
}

Using in airgram middleware:

import { UPDATE } from '@airgram/constants'
import { Airgram } from 'airgram'

const airgram = new Airgram({
  // config
})

airgram.on(UPDATE.updateUser, async ({ update }) => {
  console.log('[new user]:', update)
})

License

The source code is licensed under GPL v3. License is available here.

Keywords

FAQs

Last updated on 02 Aug 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc