Package fetcher is a bot messenger which gather npm packages by uploading either a json file (package.json) or a picture representing package.json. To continue...

Overview

package-fetcher

Ce projet contient un boilerplate pour un bot messenger et l'executable Windows ngrok qui va permettre de créer un tunnel https pour connecter l'application et le bot messenger. ** Le package principal "better-bootbot" présentait des erreurs donc installez un fork sur mon repo git

1 - Configurer facebook

  • Créer un compte développeur facebook
  • Aller dans la section "apps"
  • Créer une application, sélectionnez "Aucun" dans type d'application et donnez-lui un nom
  • Lorsque l'application est créée, cliquez sur "Configurer" dans la case "Messenger"
  • Scrollez pour voir la partie Token d'accès
  • Créez une page ou appuyez sur Ajouter ou supprimer des Pages et sélectionnez la page

2 - Configurer les variables d'environnement et ngrok

  • Appuyez ensuite sur "Générer un token" puis copier ce token dans un fichier .env que vous allez créer dans le répertoire de l'application Node sous FB_ACCESS_TOKEN
  • Allez dans l'onglet "Paramètres" et "Général", ensuite affichez la clé secrète et copiez-la dans votre fichier .env sous FB_APP_SECRET
  • Spécifier ensuite n'importe quoi sous FB_VERIFY_TOKEN (bot, test, psone, ...), elle sera ensuite utiliser pour connecter l'application et le bot.
  • Lancer la commande npm install ou yarn install
  • Lancer la commande yarn add https://github.com/Lynxgsm/better-bootbot.git ou npm i --save https://github.com/Lynxgsm/better-bootbot.git pour installer le package better-bootbot de mon répertoire
  • Copier ngrok dans le dossier "dist" dans un répertoire de votre choix
  • Ajouter ngrok dans votre variable d'environnement sous PATH
  • Faites ensuite node index.js, cela va démarrer le bot

3 - Connecter le bot et l'application

  • Revenir sur le site developers.facebook et revenez dans l'onglet Messenger>Paramètres
  • Localisez le bouton Appeler l'URL de rappel. Ici vous allez renseignez le FB_VERIFY_TOKEN que vous avez spécifié et l'URL du bot. Evidemment, facebook n'accepte que les liens sécurisés d'où la nécéssité d'utiliser ngrok
  • Le bot étant démarré sur le port que vous voulez (à spécifier dans votre fichier .env), lancez la commande ngrok http ${PORT} où PORT ici est la valeur de votre port. Cela va démarrer une instance https relié à votre application.
  • Renseignez ensuite cet URL dans l'URL de rappel et votre FB_VERIFY_TOKEN dans la case Vérifier le jeton

4 - Déploiement

/A rédiger/

5 - TO DO

  • Decider si on peut utiliser directement l'upload du fichier package.json ou si l'on doit prendre une image du package.json que l'on va transcrire en texte
  • Créer un dossier pour chaque package utilisé par un utilisateur
  • Créer un fichier zip pour les packages voulus
  • Facebook limite la taille maximale des fichiers que l'on peut envoyer sur Messenger à 25MB. Il faudrait un système permettant de splitter les packages dans le cas où cela dépasse cette limite.

Notes

curl https://graph.facebook.com/v2.12/me/messenger_profile?access_token= { "persistent_menu": [ { "locale": "default", "composer_input_disabled": false } ] }

You might also like...

This is an app that will service the ASD community to help them communicate what they want. The individual can be either verbal or non-verbal.

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

Jun 28, 2022

Generate release notes from git commit history either commit range or tag range.

Generate release notes from git commit history either commit range or tag range.

Would you like to support me? Release Notes Generate release notes from git commit history either commit range or tag range. App Store Template Change

Oct 8, 2022

A Big Picture, Thesaurus, and Taxonomy of Modern JavaScript Web Development

A Big Picture, Thesaurus, and Taxonomy of Modern JavaScript Web Development

Spellbook of Modern Web Dev A Big Picture, Thesaurus, and Taxonomy of Modern JavaScript Web Development This document originated from a bunch of most

Dec 31, 2022

The vision is for NFTs as unique pages of a PICTURE~BOOK

The vision is for NFTs as unique pages of a PICTURE~BOOK. Where every component is an NFT. Not just the PAGE. Also the TITLE PAGE as a PROMO. The SNDTRACK. So we need a STRUCTURE for this, and a CONTRACT.

Mar 13, 2022

Re-uploading Trybe Wallet

💸 Welcome to Trybe Wallet! Trybe Wallet is a project I did at Trybe, which is a programing school. In order to test my knowledge of Redux, I also lea

Apr 12, 2022

A desktop app handling image uploading and text transfering.

A desktop app handling image uploading and text transfering.

Transmitter Introduction 一款利用Github repository实现图床+文本传输的桌面应用 框架:Vite+React+Electron Tutorial release 创建Github token:https://docs.github.com/en/authent

Mar 24, 2022

Yet another library for generating NFT artwork, uploading NFT assets and metadata to IPFS, deploying NFT smart contracts, and minting NFT collections

eznft Yet another library for generating NFT artwork, uploading NFT assets and metadata to IPFS, deploying NFT smart contracts, and minting NFT collec

Sep 21, 2022

🌸 API for storing anime picture collection in Discord server

🌸 API for storing anime picture collection in Discord server

Waifuseum Waifuseum (Museum Waifu) is a simple REST API for storing and managing anime picture collection. This project use combinaton of ExpressJS, D

Jul 24, 2022

🌸 API for storing anime picture collection in Discord server

🌸 API for storing anime picture collection in Discord server

Waifuseum Waifuseum (Museum Waifu) is a simple REST API for storing and managing anime picture collection. This project use combinaton of ExpressJS, D

Jun 28, 2022
Owner
AILI Fida Aliotti Christino
Idea materializer; mobile, web app developer. Learning every day to become better.
AILI Fida Aliotti Christino
some hackz for gather.town

Gather Cheats Chrome Extensions that can let you become a hero in gather.town Demo you can watch demo video from here Install open chrome and access c

MachineHunter 8 Nov 3, 2022
Allows you to build fetcher function by URL at compile-time.

fetch.macro Allows you to build fetcher function by URL at compile-time. Usage Simply install and configure babel-plugin-macros and then use fetch.mac

RiN 18 Nov 7, 2022
npm i uuid, npm i nodemon, npm i commander

goit-nodejs-hw-01 Получаем и выводим весь список контактов в виде таблицы (console.table) node index.js --action list Получаем контакт по id node inde

Oksana Banshchykova 3 Jul 5, 2022
This is a simple file uploading system made up using node & express

FileUploader A simple file-upload application made using Node.js and Express. Local Setup Install the Dependencies Using npm npm install Usage Starti

Kallyan Singha 21 Nov 2, 2022
Demonstration of how you build full-stack, typed, NPM packages, the right way

NPM Packages - The Right way This repository aims to demonstrate how to build NPM packages the right way. my-package should import the shared code, bu

VulcanJS 61 Nov 27, 2022
Get packages from a monorepo (pnpm, yarn, npm, lerna)

?? You can help the author become a full-time open-source maintainer by sponsoring him on GitHub. @egoist/get-packages Get packages from a monorepo (p

EGOIST 45 Jun 1, 2022
The high-impact (popular) packages of npm

npm-high-impact The high-impact (popular) packages of npm. Contents What is this? When should I use this? Install Use API npmHighImpact npmTopDependen

Titus 26 Dec 21, 2022
Solidity starter combining foundry and hardhat because both are great and I can't live without either...

Combination Pizza Hut & Taco Bell Foundry && HardHat starter template. Motivation I like them both. With this set-up we get: Unit tests written in sol

Cache Monet 32 Aug 23, 2022
HackFest is a 36-hour long hackathon wherein you have to put on your hacker hats and build anything that falls in either or both the domain of full-stack web development

HackFest is a 36-hour long hackathon wherein you have to put on your hacker hats and build anything that falls in either or both the domain of full-stack web development (the stack we learn in full-stack web developer roadmap on codedamn).

Shivam Kumar 2 Jun 6, 2022