This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('dotenv').config(); | |
const { Client, GatewayIntentBits } = require('discord.js'); | |
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildPresences, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent, , GatewayIntentBits.GuildMembers] }); | |
const twilio = require('twilio')(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN); | |
const friendsChannelId = 'XXXXXX'; | |
const myUserId = 'XXXXXX'; | |
const express = require('express') | |
const app = express(); | |
app.use(express.urlencoded({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"description": "SMS flow to find and contact your local representatives with a given address.", | |
"states": [ | |
{ | |
"name": "Trigger", | |
"type": "trigger", | |
"transitions": [ | |
{ | |
"next": "main_menu", | |
"event": "incomingMessage" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('dotenv').config(); | |
const sgMail = require('@sendgrid/mail'); | |
const sgClient = require('@sendgrid/client'); | |
const express = require('express') | |
const expressFileUpload = require('express-fileupload'); | |
const app = express(); | |
sgMail.setApiKey(process.env.SENDGRID_API_KEY); | |
sgClient.setApiKey(process.env.SENDGRID_API_KEY); | |
app.use(express.urlencoded({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('dotenv').config() | |
const SneaksAPI = require('sneaks-api'); | |
const fs = require("fs"); | |
const schedule = require('node-schedule'); | |
const sneaks = new SneaksAPI(); | |
const sgMail = require('@sendgrid/mail'); | |
sgMail.setApiKey(process.env.SENDGRID_API_KEY); | |
const jsonString = fs.readFileSync("./subscribers.json"); | |
const subscribers = JSON.parse(jsonString); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('dotenv').config(); | |
const OpenAI = require('openai-api'); | |
const openai = new OpenAI(process.env.OPENAI_API_KEY); | |
const { Client, Intents } = require('discord.js'); | |
const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] }); | |
let prompt ='Marv is a chatbot that reluctantly answers questions.\n\ | |
You: How many pounds are in a kilogram?\n\ | |
Marv: This again? There are 2.2 pounds in a kilogram. Please make a note of this.\n\ | |
You: What does HTML stand for?\n\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const request = require('request'); | |
const cheerio = require('cheerio'); | |
const axios = require('axios') | |
const app = express(); | |
app.get('/', function(req, res){ | |
let shoe =req.query.shoe; | |
let url = 'https://stockx.com/api/products/nike-daybreak-undercover-black?includes=market' | |
request(url, function(error, response, html) { |