Giter Club home page Giter Club logo

robbot's Introduction

Robbot

Build Status

A Discord bot to go along with my website, megumin.love.

Written using discord.js, using opusscript, axios, moment and prism-media packages (plus some standard node ones).

Add the bot to your server: Invite me

Self-hosting usage

(It is assumed you already have a Discord OAuth application and bot account aswell as node.js on version 7.6+ installed)

  • Rename config.example.json in the src/ folder to config.json
  • Populate the owners array in config.json with your ID(s)
  • Adjust other config settings to your liking
  • Run npm install to install all dependencies
  • (Feel free to ignore any "unmet dependency" warnings)
  • Install ffmpeg - if on Windows, add it to your PATH aswell
  • Start the bot using node robbot.js!

Optional: If you've got the bot running on a linux server, consider installing node-opus for better voice performance than opusscript.

(Opusscript used for development on Windows.)

Adding commands

Adding commands to robbot is very easy. The command handler will automatically register any .js file within the commands folder so the only thing you have to do is make your command file, write the code for it (*), and restart the bot.

That's all, now your command is available under the name you gave the js file. Use it with <prefix> <command>. It will also be listed in the help command.

(*) Commands extend the Command class located in structures/ and must at least provide the name property in the constructor aswell as a run() function outside the constructor or errors will happen. See existing commands for usage examples.

Information

  • By default, a command cooldown of 3 seconds is applied and the default prefix is set to robbot,.
  • DiscordBots integration is disabled by default. Activate the command in the config and set your API token to use it. (Not able to activate using the toggle command)
  • To make the bot use PM2 (relevant for power command aswell as disconnect handling), switch the config setting to true. It will then kill the pm2 process on usage of the power command and restart the process on disconnect.

License

Licensed under the MIT License.

Out-of-the-box Commands

Refer to the Wiki Usage page for more in-depth explanations.

Command Effect
blacklist Blacklist a discord guild
cancelSound Kill this guild's voice connection if playSound/randomSound bugged out
counter Display various information regarding the counter of https://megumin.love
eval Evaluate javascript code
help Get usage help
ignore Make robbot ignore a user
info Get various bot-related information
ping Measure the delay between command call and execution
playSound Play a chosen sound from https://megumin.love
randomSound Play random sound from https://megumin.love
reload Reload a command
setAvatar Change robbot's avatar
setGame Change robbot's game
setNickname Change robbot's nickname
setUsername Change robbot's username
power Restart or shutdown robbot
toggle Toggle a command on or off

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.