Giter Club home page Giter Club logo

googlemeetapi's Introduction

GoogleMeetAPI

A Javascript package for interacting with a Google Meet, using Puppeteer.

Features

I have not written documentation for this package, but here is a quick list of some things that can be done with this package.

Quick List of Features

  • Sending Messages
  • Reading and Handling Messages
  • Handling Member Joins and Leaves
  • Toggling Microphone and Video

Main Functions

client.sendMessage();

client.chatEnabled();

client.toggleMic();

client.toggleVideo();

Events

client.on('message', () => {});

client.on('memberJoin', () => {});

client.on('memberLeave', () => {});

Install

npm install @shaunbharat/google-meet-api

Usage

examples/start.js

const { Meet } = require('../meet');
const client = new Meet();

config = { meetingLink: 'https://meet.google.com/xyz-wxyz-xyz', email: '', pw: '' };

async function command(client, message) {
    if (message.content.startsWith("!quote")) {
        await client.sendMessage(`${message.author} said, "${message.content.replace("!quote ", "")}" at ${message.time}`);
    }

}

(async () => {

    await client.once('ready', async () => {
        console.log('ready');
    })

    await client.login(config);

    await client.on('message', async (message) => {
        command(client, message);
    })

    await client.on('memberJoin', async (member) => {
        await client.sendMessage(`Welcome, ${member.name}!`);
    })

    await client.on('memberLeave', async (member) => {
        await client.sendMessage(`Goodbye, ${member.name}!`);
    })

})()

/*
 Async/await syntax is required if you need to execute specific actions with Puppeteer or don't want to be limited to only the events already implemented.
*/

// If errors like "Node is detached" get thrown, restarting almost always fixes most errors

License

Copyright © 2022 Shaun Bharat.

This project is licensed with the MIT license.

googlemeetapi's People

Contributors

shaunbharat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.