Git Product home page Git Product logo

turtlecoin-market-linker's Introduction

turtlecoin-market-linker

A simple bot to look for any market talk-related keywords, after which it chooses randomly from and prints a pre-set message.

Usage

py market-bot.py

Connecting it to Discord

  • Go here to make a bot.

  • Give your bot a name, and then click Create App.

  • Scroll down to Create a Bot User and click that.

  • Click Yes, do it!

  • Copy your bot token by clicking click to reveal in the APP BOT USERsection.

  • Copy config.json.sample to config.json.

  • Replace "your token goes here" with this token, in config.json (keep the ").

  • Don't reveal this token to anyone!

  • Next you need to get the Channel ID you want the bot to run in.

  • In Discord, follow these steps-

    1. Click on User Settings(small gear icon to right of name in the bottom left)

    2. Click on Appearance

    3. Enable Developer Mode.

  • Right click on the Discord channel you want the bot to work in, and press Copy ID.

  • Open up market-bot.py, and replace the value of message.channel.id with the ID you just copied(again, keep the ").

  • Scroll up and click Generate OAuth2 URL

  • Choose bot under SCOPES

  • Select the permissions you want the bot to have under Bot Permissions

  • When done, click COPY next to the link generated

  • Open said link and choose the server you wish to add the bot to. You must have Manage Server permissions.

Deploying on Heroku

I use it personally and recommend as on signing up you get free "Dynos"(credits) worth ~$40 for free, with the only verification being a valid e-mail address, which renews monthly. Setting it up is relatively easy-

  • open Command Prompts/terminal and type pip freeze
    • then copy/paste everything shown into a file called requirements.txt, like in my repo
  • in a file runtime.txt specify the python version to use. Assuming you used the latest version, check and enter the value after making sure it is supported by Heroku here. See my file for the format
  • then make a file Procfile(no extension, check for caps) and specify how to run the program, like python market-bot.py. Check mine if you're unsure
  • Once done, make an account in Heroku(screw the get started guide) and make a new application
  • Go to Deploy and scroll down
    • Download Heroku CLI
    • If you don't have Git installed yet, then do so(through the Heroku installer.)
      • For the rest of the tutorial, enter all commands through the terminal/command prompts
      • If you do then cancel the installation of Git and run Git CLI when the CLI installs
    • Login to your Heroku account using heroku login
    • Clone and cd to your repository using the commands given
    • Make any changes you want to locally, then run the commands given to push them to Heroku and deploy them
  • If it deploys successfully, then it should-
    • work in your server without having to run the script locally, and
    • show the message you defined to print on startup in the logs section of Heroku (More -> View Logs)

Thanks

Big thanks to @ZedPea, he helped a lot with the bot.

turtlecoin-market-linker's People

Contributors

chrisedebo avatar jtnw avatar sajo8 avatar zpalmtree avatar

Watchers

 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.