Giter Club home page Giter Club logo

discord-bot's Introduction

Discord Bot

Instructions

  • Create a simple discord bot that would reply hey to your hi.

  • Add functionality to allow a user to search on google through discord. If the user types !google nodejs, reply with top 5 links that you would get when you search nodejs on google.com

  • Implement functionality to search through your search history. If a user uses !google to search for "nodejs" "apple games" "game of thrones", and after these searches, if user types !recent game, your bot should reply with "apple games" and "game of thrones"

  • Make user search history persistent. Use any storage system to store your searches, so even when you kill your nodejs server and start again, your search history is maintained.

Steps to run bot:

  1. Create and activate virtual environment - python3 -m venv bot_env source bot_env/bin/activate
  2. Install dependencies - pip install -r requirements.txt
  3. Create .env file and add the contents using sample_env.txt file.
  4. Create your discord bot by visiting developers console
  5. Copy the bot token and add to .env file.
  6. Create your Postgres Database and enter credentials in .env file
  7. Create the table 'Search_History'_ importing sql query from bot.sql
  8. Create custom search engine using Google Search API and insert the developer and search engine ID in .env file.
  9. Run the app - python3 demobot.py

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.