Git Product home page Git Product logo

golang-bots's Introduction

Slack and Discord Golang Bots

The following bots were written in Golang and run from the same main.go file. They run simultaneously since both have features of connecting to the servers without interfering with each other.

Purpose

To be able to fetch json information from all shopify sites for specifically asked products. Given a site, product id, and a size, it will return an auto checkout link within a couple seconds for the user to checkout. Given a site and product id, it will return different sizes that are available for that specific product. This is helpful when the user isn’t specifically looking for a product in one size but would like to know what sizes are available.

Hosting

The bots are hosted and deployed on Docker and as a droplet on DigitalOcean.

How it works

When given a site, productId, and size, all three are validated to confirm correct working urls. Then, the bots browse through the json file of that site, find a productId that matches with the user id input, confirm the product is available as well as the size is correct, and use the name, price, size, and id to generate an auto checkout link. This information gets used to create the message to be sent to the discord server or the slack server. The same thing happens with finding the sizes; however, no checkout link is provided, only a link to preview the product. If a product is not found, a message will display for the user letting them know that the product they are looking for was not found. Slack handles all commands as slash commands while discord looks for the specific command in the user’s input.

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.