Giter Club home page Giter Club logo

umass-stem-discord-bot's Introduction

UMass STEM Discord Bot

Discord bot designed for the UMass STEM Discord server for meme generation, image manipulation, coronavirus stats, and other server functions.

Bot Prefix

Start a command with $ to use the bot

Add to your server

Invite bot to server

Commands

  • get [role]
    • The bot gives the specified role to the user
  • remove [role]
    • The bot removes the specified role from the user (if they have it)
  • getlist
    • Prints out an organized list of roles available with the get command
  • myroles [optional: @user]
    • Prints out the calling user's (or mentioned user's) roles organized by category
  • stats [role]
    • Outputs the member count and percentage of total server members for the specified role.

  • members
    • Outputs the current number of members in the server
  • leaderboard [optional: #channel]
    • Displays the top 10 most active users on the server (or mentioned channel) measured by quantity of messages
  • covid [optional: state]
    • Displays the number of cases and deaths related to COVID19 in the specified state, if no state given displays the top 15 states by cases in the U.S
  • covidp
    • Displays the number of cases, and deaths related to COVID19 in the top 15 U.S states. Sorted by percentage of the state infected.
  • covidumass
    • Displays the number of COVID19 cases confirmed by UMass Amherst.
  • help
    • Displays the available Role and General commands
  • memehelp
    • Displays the available Meme and Image Filter commands

Note: If no argument specified for draw, ify, and zoom commands the bot will use the last image outputted by the bot.

  • mdraw [image/image link/text/nothing]
    • The bot responds with an image of marius drawing whatever image or text is passed as the argument
  • tdraw [image/image link/text/nothing]
    • The bot responds with an image of tim drawing whatever image or text is passed as the argument
  • ldraw [image/image link/text/nothing]
    • The bot responds with an image of lan drawing whatever image or text is passed as the argument
  • landraw [image/image link/text/nothing]
    • The bot responds with a different image of lan drawing whatever image or text is passed as the argument
  • shelpoint [image/image link/text/nothing]
    • The bot responds with an image of Dan Sheldon pointing at whatever image or text is passed as the argument
  • bdraw [image/image link/text/nothing]
    • The bot responds with an image of barrington drawing whatever image or text is passed as the argument

Example of the $bdraw [text] generator

bdraw example

  • barrify [image/image link/nothing]
    • The bot uses computer vision to put the barr emote on peoples faces in the inputed image

Example of the $barrify [image/image link] meme generator

barrify example

  • surprisedpikachu [image/image link/nothing]
    • Similar to barrify the bot responds with the inputed image with surprised pikachu over identified faces
  • marify [image/image link/nothing]
    • Similar to barrify the bot responds with the inputed image with marius's face over the identified faces
  • timify [image/image link/nothing]
    • Similar to barrify the bot responds with the inputed image with tim's face over the indentified faces
  • liamify [image/image link/nothing]
    • Similar to barrify the bot responds with the inputed image with liam's face over the indentified faces
  • zoombarr [image/image link/nothing]
    • Pastes an image of barr from Zoom onto the given image in the top right corner
  • zoommar [image/image link/nothing]
    • Pastes an image of marius from Zoom onto the given image in the top right corner
  • zoomarun [image/image link/nothing]
    • Pastes an image of arun from Zoom onto the given image in the top right corner
  • okay [image/image link]
    • The bot turns the given image into a video with marius saying okay as the background noise
  • meme ["top" "bottom" image]
    • The bot responds with the inputed image with the specifed text on it in typical meme format
  • erase
    • Deletes the most recent m/bdraw or barrify generated by the bot

  • intensify [factor image]
    • The bot responds with the inputed image exposed to the specified factor
  • noise [image]
    • The bot outputs the inputed image with a noise filter applied
  • pixelate [factor image]
    • The bot outputs the inputed image after pixelating it by a given factor, make sure to use a larger factor to see results on high-res images
  • mirror [axis image]
    • The bot mirrors the image on the given axis (X or Y), and outputs the result
  • saturate [factor image]
    • The bot saturates the given image by the given factor
  • highlightEdges [image]
    • The bot responds with the inputed image with the highlighted edges filter
  • customEdgeHighlight [red green blue image]
    • The bot responds with the inputed image with the custom highlighted edges filter

  • remove missing housing and major role
    • bot removes the missing housing and major role if someone has set both a housing and major role

How to contribute

  1. Fork repo
  2. Install required dependencies
    • pip install -r requirements.txt
  3. Write additional implementations
  4. Create a bot on the Discord Developer Portal
  5. Add your bot's token to your computer's environmental variables
    • key: 'BOT_TOKEN'
    • value: 'YOUR BOT TOKEN'
  6. Invite your bot to a private test server
  7. Test added bot commands
  8. Once working, create a pull request

Dependencies

To install the dependencies, in the root folder, run: pip install -r requirements.txt

umass-stem-discord-bot's People

Contributors

aardeyamz avatar coffincw avatar dependabot[bot] avatar stegor115 avatar tomking avatar tsarfox avatar v-neigh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

umass-stem-discord-bot's Issues

Use online database for leaderboard

Needed to prevent issues with testing the bot and committing to the repo. Could also make the bot refresh the leaderboard every time its built while hosted.

AttributeError bug 'NoneType' object has no attribute 'id' when attempting to use the $get command

Ignoring exception in command get:
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.6/site-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "src/umassstembot/bot.py", line 485, in get_role
if ctx.guild.id == 387465995176116224:
AttributeError: 'NoneType' object has no attribute 'id'

The above exception was the direct cause of the following exception: 

Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.6/site-packages/discord/ext/commands/bot.py", line 903, in invoke
await ctx.command.invoke(ctx)
File "/app/.heroku/python/lib/python3.6/site-packages/discord/ext/commands/core.py", line 859, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/app/.heroku/python/lib/python3.6/site-packages/discord/ext/commands/core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc 
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'id'

Add $covid [state]

Add command which when given the U.S state outputs the number of coronavirus cases and deaths.

$role statistics

$role statistics where a command like:
"$role cs" would return how many students have the role of "cs"

Add $ctoday

Shows events taking place today.

Could also be adjusted in the future to accept a calendar name argument when multiple calendars are implemented.

Draw aliases cause issues with draw output.

Due to the differing lengths of aliases having them with the draw commands causes issues with the outputs. Without changing the command to require " the aliases must be removed.

Add $cet [argument]

In order to change the time/date of a specified event

format:

$cet "Rocket League Tournament" "4:00pm" "2020-5-27" "180"

Date and duration are optional arguments

Lack of Currency

I am appalled by the lack of currency (specifically in the form of Caleb-bucks) on this discord bot. Please add a currency with a fixed exchange rate of 1-Caleb to 1-Pancake.

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.