Giter Club home page Giter Club logo

party-parrot-bot's Introduction

Party Parrot Discord Bot

github-party-parrot

A Discord bot to display party parrots on command. It also will insert party parrots where appropriate. Party or die. Uses the discord.py library to implement the bot. Invite link is here.

Party parrots retrieved from the Cult of the Party Parrot. The bot scrapes the site for the name and url of the party parrot on start and embeds the GIF's in the message.

Commands

Command prefix is set as "%"

  • %parrot parrotname: Displays a parrot on command containing the name "parrotname"
  • %list: Lists parrots

Deployment

First, install all the dependencies with pip install -r requirements.txt. Run the server with python run.py. Simple steps to deploy on Ubuntu in the background:

  1. Pull the source code git pull origin master
  2. Kill the current process running (it's the shell process running runbot.sh)
  3. Restart the process in the background nohup ./scripts/runbot.sh &
  4. Ensure the process is running with ps ax | grep runbot.sh

A better alternative to the above is to run the bot as a service. Go to /etc/systemd/system and create a unit file named party-parrot-bot.service that contains the contents:

[Unit]
Description=party parrot bot

[Service]
User=<your user name>
WorkingDirectory=<absolute_path_to_wherever_the_source_code_is>
ExecStart=<absolute_wherever_source_code_is>/<virtual_env_name>/bin/python <absolute_wherever_source_code_is>/run.py
Restart=always

[Install]
WantedBy=multi-user.target

Enable the service with

sudo systemctl enable party-parrot-bot

And start the service with

sudo systemctl start party-parrot-bot

Monitor the logs with

sudo journalctl party-parrot-bot

party-parrot-bot's People

Contributors

broden-wanner avatar

Stargazers

 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.