GithubHelp home page GithubHelp logo

gravebot / gravebot Goto Github PK

View Code? Open in Web Editor NEW
262.0 31.0 148.0 14.98 MB

An awesome bot for Discord

License: MIT License

JavaScript 92.13% Batchfile 0.01% CSS 5.09% Shell 0.11% HTML 2.12% Dockerfile 0.53%
discord bot javascript leagueoflegends overwatch dota2

gravebot's Introduction

Gravebot

Build Status Build Status Coverage Status Translations Discord

Project on hiatus. https://dustinblackman.com/posts/2019/05/hiatus-from-open-source/

About

A fantastic, helpful, and fun Discord chat and music bot! Gravebot comes with a bunch of cool and powerful commands for both Discord and games!

How to use

Invitation

Deprecated, see here for self hosting.

The easiest way to set this bot up on your server is to invite it to your Discord server. It is currently hosted 24/7 and will always get the newest features first.

In order to do that, just click here and choose a server. You need to have Manage Server permission on that server. You may remove some of the permissions if you wish, but be warned it may break current and upcoming features.

If you want to give the bot a first try, you may do that in the Gravebot's Lair Discord server.

If you have any questions, feedback, or want to request features, you may also do that by leaving a message in Gravebot's Lair, using the !feedback command, private messaging Gravestorm or Zalik, as well as opening an issue on Github.

Commands

Help:

  • !help fun - List of fun commands
  • !help useful - List of useful commands
  • !help info - List of information commands
  • !help games - List of game commands
  • !help other - List of other commands
  • !help all - List all available commands in private chat
  • !memelist - List of meme names for the !meme command
  • !setlanguage - Set all help text to respond in a specified language

Fun:

  • !8ball question - Answers the question
  • !animals - Get various animal pictures
  • !cat bomb count - Bombs chat with adorable cats
  • !pug bomb count - Bombs chat with adorable pugs
  • !snake bomb count - Bombs chat with adorable snakes
  • !chat text - Chats with you
  • !coin - Flips a coin
  • !comics - Get a random comic from a bunch of different artists
  • !decide something or something... - Decides between given words
  • !drama number - Responds with a drama image, if no number is written, a random one
  • !emoji number - Responds with an emoji copypasta, if no number is written, a random one
  • !meme meme name "top text" "bottom text" - Creates a meme with the given meme name and text
  • !quote number - Responds with a quote, if no number is written, a random one
  • !robohash - Get robot and monster images
  • !monster - Get your personal monster
  • !robot - Get your personal robot
  • !robothead - Get your personal robot head
  • !roll times sides - Rolls the dice a number of times with a number of sides, see !random for advanced generators
  • !translate - Translate text in funny ways
  • !leet sentence - 1337ifies the sentence
  • !snoop sentence - Snoopifies tha sentence
  • !yoda sentence - Yodaifies the sentence

Useful:

  • !ddg search terms - Search the web, can also calculate and convert. Search other websites by appending its shortening (e.g. !ddg !yt Hello) See https://duckduckgo.com/bang for a list
  • !gif gif tags - Gets a gif from Giphy or Popkey matching the given tags. Use !giphy or !popkey to search the specific site
  • !join - Shows a link that can be used to invite the bot to your server
  • !paste text - Creates a paste on Pastebin and returns the url
  • !random - Generate truly random numbers and strings
  • !fraction amount decimal places replace(optional) - Generate a number of random real numbers between 0 and 1 with set decimal places, write replace at the end to disable duplicates (e.g. !fraction 1 5 replace)
  • !gaussian amount mean deviation significant digits - Generate a number of random numbers from a Gaussian distribution (e.g. !gaussian 1 50 10 5)
  • !integer amount min max replace(optional) - Generate a number of random integers between min and max, write replace at the end to disable duplicates (e.g. !integer 2 1 50 replace)
  • !string amount length charset(optional) replace(optional) - Generate a number of random strings of a given length, can also input your own charset (default is the alphabet), as well as write replace at the end to disable duplicates (e.g. !string 1 10 abc123 replace)
  • !unshorten url - Unshortens a shortened link
  • !urban search terms - Returns the summary of the first matching search result from Urban Dictionary
  • !videocall Optional @username - Start a one click video call or screenshare directly on Appear.in. Mention users to make it private
  • !wiki search terms - Returns the summary of the first matching search result from Wikipedia
  • !wolfram query - Query Wolfram Alpha for almost anything
  • !youtube video tags - Gets a video from Youtube matching the given tags

Information:

  • !avatar username - Responds with your avatar, unless a username is specified
  • !channelinfo channelname - Gives information about this channel, unless a channelname is specified
  • !feedback text - Give feedback and report bugs about the bot
  • !ping - Pong! Check Gravebot's pulse
  • !serverinfo servername - Gives information about this server, unless a servername is specified
  • !servers - Lists how many servers, channels and users the bot is connected to
  • !uptime - Shows how long the bot has been online
  • !userinfo username - Gives information about this user, unless a username is specified
  • !version - Get information on the latest version of Gravebot

Games:

Dota2

  • !dota2 - Help
  • !dota2 best position - Get the top 10 Heroes for a specific position
  • !dota2 build hero-name - Get the most popular build for a Hero
  • !dota2 counters hero-name - Get the top 10 counters for a Hero
  • !dota2 impact - Get the top 10 Heroes with the biggest impact
  • !dota2 items hero-name - Get the top 10 most used items for a Hero

League of Legends

  • !lol - Help
  • !lol bans - Get the top 10 most common bans
  • !lol best position - Get the top 10 best Champions for a Position
  • !lol counters champ-name position - Get the top 10 counters for a Champion and Position
  • !lol items champ-name position - Get the highest win item sets for a Champion and Position
  • !lol match region summoner-name - Get the name, rank, Champion, winrate and total games for all players of a current match
  • !lol skills champ-name position - Get the highest win skills for a Champion and Position
  • !lol status - Get the LoL Game and Client server status for all regions

Overwatch

  • !ow - Help
  • !ow averages region battletag - Player average stats
  • !ow eliminations region battletag - Heroes with the most eliminations per life
  • !ow games won region battletag - Heroes with the most wins
  • !ow kill streak region battletag - Heroes with the highest kill streak
  • !ow multikill region battletag - Heroes with the most multikills
  • !ow objective kills region battletag - Heroes with the most objective kills
  • !ow time played region battletag - Heroes most played
  • !ow weapon accuracy region battletag - Heroes weapon accuracy percentage
  • !ow win percent region battletag - Heroes with the highest win percentage

Other:

  • !ayylmao
  • !chillinmyb
  • !endall
  • !feelsbadman
  • !feelsgoodman
  • !jpeg
  • !kappa
  • !kappaHD
  • !skeltal
  • !starwars4
  • !starwars5

Windows:

Warning: Windows may have issues, even if all steps are done, sadly, we are not able to find the right dependencies for it (mostly regarding League of Legends and Wolfram commands), if you are familiar with coding, you can try messing around, either finding the right dependencies, or disabling the commands. If you are not familiar with coding, I would advise you to try out Linux, just install it alongside Windows and give it like 20GB of space, it will be plenty and you will have a good experience. Feel free to ask for help regarding installation in Gravebot's Lair, just keep this in mind.

  • Install Node.js v4.8.3
  • Install Python v2.7.13
  • Install Microsoft Visual Studio C++ Express
  • Install node-gyp (open the command prompt and write npm install -g node-gyp)
  • Install libxml2 and add it to your PATH (note that this may not work and some extra tinkering may be needed, if you find a better way of installing it, please share it)
  • If you are unable to install it, you may remove the wolfram-alpha dependency line from package.json and delete wolfram.js in the Gravebot/src/commands/useful folder. That is the only command that uses libxml2.
  • Install and run Redis
  • Download Gravebot (open the command prompt and write git clone https://github.com/Gravebot/Gravebot.git or if you don't have/want to use git, download the ZIP by clicking the green Download button at the top right of this page)
  • Rename config.js.example to config.js in the Gravebot directory and fill in the required information. Note that only variables with the *Required* comment are needed, everything else is optional
  • cd to the Gravebot directory and run npm install to install the Node dependencies
  • Run npm start in the Gravebot directory to start the bot

Linux:

  • Install Node.js v4.8.3
  • Install ffmpeg, gcc, git, libxml2 and python (open the terminal and write sudo apt-get install build-essential python git libxml2-dev ffmpeg libfontconfig1)
  • Install node-gyp (open the terminal and write sudo npm install -g node-gyp)
  • Install and run Redis
  • Download Gravebot (open the terminal and write git clone https://github.com/Gravebot/Gravebot.git or if you don't have/want to use git, download the ZIP by clicking the green Download button at the top right of this page)
  • Rename config.js.example to config.js in the Gravebot directory and fill in the required information. Note that only variables with the *Required* comment are needed, everything else is optional
  • cd to the Gravebot directory and run npm install to install the Node dependencies
  • Run npm start in the Gravebot directory to start the bot

Mac:

  • Install Node.js v4.8.3
  • Install Python v2.7.13
  • Install node-gyp (open the terminal and write sudo npm install -g node-gyp)
  • Install and run Redis
  • Download Gravebot (open the terminal and write git clone https://github.com/Gravebot/Gravebot.git or if you don't have/want to use git, download the ZIP by clicking the green Download button at the top right of this page)
  • Rename config.js.example to config.js in the Gravebot directory and fill in the required information. Note that only variables with the *Required* comment are needed, everything else is optional
  • cd to the Gravebot directory and run npm install to install the Node dependencies
  • Run npm start in the Gravebot directory to start the bot

Deployment

Heroku

Gravebot comes setup and ready for Heroku.

  1. Setup your configuration in Heroku's app settings, environment variables.
  2. Setup the buildpacks in Heroku's app settings by clicking Add buildpack and selecting NodeJS, as well as adding the following buildpack for music commands https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git
  3. Push the source code.

Docker

Master branch is built and pushed to our Docker image. You can pull the latest from here.

Updating

Updating Gravebot is like any other Node.js app. Just run git pull && npm install in the Gravebot folder via the terminal if you're on Linux or the command prompt if you're on Windows. You may also download the ZIP, configure it and run npm install again.


Feature Requests

Have a feature in mind? We'd love to hear about it. Feel free to open an issue and let us know.

Contribute

Want to contribute to Gravebot? That's great! Be sure to check out the CONTRIBUTE.md doc for more information on how.

Contributors

gravebot's People

Contributors

ajmeese7 avatar dustinblackman avatar etp12 avatar gravestorm avatar paradox521 avatar phunstyle avatar robvankeilegom avatar starwort avatar tobitenno avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gravebot's Issues

Complete Test Suite

Complete test suite so all functions have tests.

Final Tasks:

  • Add tasks for missing misc commands
  • Verify all help commands return strings
  • Add tests for alias' or compare alias' to actual commands
  • Youtube tests

Game Invitations

Overview

Add support for users to submit text or link invitations for other users to join a game.

Technical Details

TODO

Google Translate

Translate text from one language to another using the Google Translate API.

LoL Match Info

  • Get ranks/champ stats for current game.

Use Discord username as default if not specified. User must specify region.

Error Log: babel-node index.js

Greetings,

My apologies if you're not actually taking error logs, since this is a new repo I was unsure if my error was self inflicted or a matter you could help with.

I've tried both launching this on Windows and Linux and unfortunately cannot get it to load. My deepest apologies if I'm being a dumbass and have missed something simple.

0 info it worked if it ends with ok
1 verbose cli [ '/home/feeona/.nvm/versions/node/v5.0.0/bin/node',
1 verbose cli   '/home/feeona/.nvm/versions/node/v5.0.0/bin/npm',
1 verbose cli   'start' ]
2 info using [email protected]
3 info using [email protected]
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle [email protected]~prestart: [email protected]
6 silly lifecycle [email protected]~prestart: no script for prestart, continuing
7 info lifecycle [email protected]~start: [email protected]
8 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true
9 verbose lifecycle [email protected]~start: PATH: /home/feeona/.nvm/versions/node/v5.0.0/lib/node_modules/npm/bin/node-gyp-bin:/home/feeona/Downloads/Gravebot-master/node_modules/.bin:/home/feeona/.nvm/versions/node/v5.0.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
10 verbose lifecycle [email protected]~start: CWD: /home/feeona/Downloads/Gravebot-master
11 silly lifecycle [email protected]~start: Args: [ '-c', 'babel-node index.js' ]
12 silly lifecycle [email protected]~start: Returned: code: 1  signal: null
13 info lifecycle [email protected]~start: Failed to exec start script
14 verbose stack Error: [email protected] start: `babel-node index.js`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (/home/feeona/.nvm/versions/node/v5.0.0/lib/node_modules/npm/lib/utils/lifecycle.js:233:16)
14 verbose stack     at emitTwo (events.js:87:13)
14 verbose stack     at EventEmitter.emit (events.js:172:7)
14 verbose stack     at ChildProcess.<anonymous> (/home/feeona/.nvm/versions/node/v5.0.0/lib/node_modules/npm/lib/utils/spawn.js:24:14)
14 verbose stack     at emitTwo (events.js:87:13)
14 verbose stack     at ChildProcess.emit (events.js:172:7)
14 verbose stack     at maybeClose (internal/child_process.js:818:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
15 verbose pkgid [email protected]
16 verbose cwd /home/feeona/Downloads/Gravebot-master
17 error Linux 3.19.0-25-generic
18 error argv "/home/feeona/.nvm/versions/node/v5.0.0/bin/node" "/home/feeona/.nvm/versions/node/v5.0.0/bin/npm" "start"
19 error node v5.0.0
20 error npm  v3.3.6
21 error code ELIFECYCLE
22 error [email protected] start: `babel-node index.js`
22 error Exit status 1
23 error Failed at the [email protected] start script 'babel-node index.js'.
23 error This is most likely a problem with the gravebot package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     babel-node index.js
23 error You can get their info via:
23 error     npm owner ls gravebot
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

Docker Image

Created automated docker image using Travis. Add docs and link to image.

Datadog

Add datadog for maintenance and crash tracking

Looking to add a quick image command! :D

Hey friendos,

My buds and I on our server were hoping to have a command to end arguments, something like !endall linking to the attached image. Think we could get that?

Much love!

endall

!! Command

!! text Would prefix the users last message plus add whatever on the end. This is useful for if you forget to write something for a command. Make sure the previous command is trimmed first.

!lol counters ekko
!! mid

No Skeltal

This bot needs a !skeltal command for spooking chat channels.
skeltal

Command Suggestions

Invite people to play game
Start a vote with [topic]
Search anime/manga [MyAnimeList or AniList] provide info for anime/link to it when queried.
Do the same for video games.
Provide weather by zipcode or City,State
Prune X - Prune last X messages
Prune @user X - Prune last X messages from @user
Cleverbot - In the vain of meme commands, might as well let it message cleverbot
Reddit search - Let it search reddit, or a specific subreddit and reply with search link and best hit
!dictionary - Like urban dictionary but for dictionary.com
Catpost - Random catpost
rule34 - Searches rule34
e621 - Same but for e621
paheal - Same but for paheal
deviantart - Allow users to store and share deviantArt account (Store yours by ID, let others use deviantArt to get your link)
Marquee text
whowas/whois - Similar to IRC but with the relevant info obtainable from Discord
Bait - Random 'bait' image as response

There's a lot of room for specific game related bots, as I'm sure you're aware with the LoL implementation but I think unless you use modules of some sort that will get heavy too fast.

Generate images of text for specifc commands

Some commands like !lol items text formatting kind of sucks, and Discord is too limited to add actual items images in a nice formatting.

Possibly creating an image with nice formatting using node-gd or something similar could be a nice option.

Another idea could be a webpage screenshot using webdriverio or horseman with phantomjs. PhantomJS could be queued based and would just always be running waiting for requests. The express server would have to limit requests to only accept from localhost.

Video Game Search

Overview

Query video game wikis/websites for information

Technical Details

TODO

Bot Say Commands

Add say commands so the bot responds to a user with specific commands.

!say message - Repeat sentence
~no - Say no to user
~please- Say please to user

Limitations and restrictions needs to be discussed to prevent abuse.

Reddit

  • Random subreddit
  • Random post from subreddit
  • Search

Mod Features

Add mod features to the bot. The idea is the bot would confirm the permissions a user has in a channel as well as it's own before executing the command.

  • !mute
  • !unmute
  • !kick
  • !ban
  • !topic - Change chat topic
  • !setrole
  • !removerole
  • !disablecommand - To disable specific commands on server
  • !setgame - Set the game being played

More advanced:

  • Prune x amount of message from a user (or in general)?
  • Mute someone from voice for x amount of minutes.
  • Mute someone from chat for x amount of minutes.

Casino

Commands related to casinos are coming soon (slot machines, blackjack, bingo, etc.) for all of the addicts out there. 😉

Vote

Overview

Give users the ability to vote on a topic.

Technical Details

  • Respond when vote count changes
  • Add timeout for when vote ends

Getting more done in GitHub with ZenHub

Hola! @Gravestorm has created a ZenHub account for the Gravestorm organization. ZenHub is the leading team collaboration and project management solution built for GitHub.


How do I use ZenHub?

To get set up with ZenHub, all you have to do is download the browser extension and log in with your GitHub account. Once you do, you’ll get access to ZenHub’s complete feature-set immediately.

What can ZenHub do?

ZenHub adds a series of enhancements directly inside the GitHub UI:

  • Real-time, customizable task boards for GitHub issues;
  • Burndown charts, estimates, and velocity tracking based on GitHub Milestones;
  • Personal to-do lists and task prioritization;
  • “+1” button for GitHub issues and comments;
  • Drag-and-drop file sharing;
  • Time-saving shortcuts like a quick repo switcher.

Add ZenHub to GitHub

Still curious? See more ZenHub features or read user reviews. This issue was written by your friendly ZenHub bot, posted by request from @Gravestorm.

ZenHub Board

Crash on !roll with very large values

Rolling a large number of dice results in a crash. Tested by rolling !roll 999999999999 99999999999999

It seems large enough values just crash it. Bot becomes unresponsive and then it's uptime counter resets. Tested using the version you invite to your server.

Return "Statistical Rating" for !lol counter command

Currently the command returns results based on win rate. However, I believe champion.gg's statistical rating is much more useful as it takes into account other things like damage dealt and game length.

Another command that I think would be useful is !lol bans to return the most frequently banned champions.

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.