Skip to content
/ FshyBot Public

Meet 2B / Everyone's favourite videogame waifu, now in the form of a Discord.js S̷l̷a̷v̷e̷ Bot.

Notifications You must be signed in to change notification settings

Fshy/FshyBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2b1 2b2 2b3

Discord AppVeyor David David

Commands

General
!help                     - Displays all available commands
!ping                     - Displays response time to server
!diag                     - Displays bot diagnostics and channel permissions
!say <text>               - Repeat the given text in a neat RichEmbed message
!logs <number>            - Posts the most recent VoiceChannel logs (User Join/Move/Disconnect)
!invite                   - Generates a link to invite 2B to your server
Admin
Requires user to have a role titled "Admin"
!setprefix <newprefix>    - Sets the prefix that the bot listens to
Music
When requesting a song, reaction controls are available under the bot response message.
[▶] Play/Pause [⬛] Stop [🔁] Replay Song [X] Leave channel

!play <search/link>       - Searches and plays a given song
!playlist <link> <shuffle>- Queues a given YouTube playlist; Pass 'shuffle' as 2nd param to randomize
!stop                     - Stops the current song
!pause                    - Pauses playback of the current song
!resume                   - Resumes playback of the current song
!clear                    - Clears the current playlist queue
!join                     - Joins the user's VoiceChannel
!leave                    - Stops any playback and leaves the channel
!stream <url>             - Plays a given audio stream, or file from direct URL
!radio                    - Displays some available preprogrammed radio streams
!np                       - Displays Now Playing info for radio streams
Games
!pubg <username> <region> - PLAYERUNKNOWN'S BATTLEGROUNDS stats lookup (Regions:na/sa/eu/as/sea/oc)
!hs <card name>           - Performs a search and returns basic hearthstone card information 
Anime/NSFW
!smug                     - Posts a random smug reaction image
!2B <nsfw>                - Uploads a random 2B image, or a NSFW version if supplied as a parameter

!tags <search term>       - Searches Danbooru for possible related search tags
!sfw <tag>                - Uploads a random SFW image from Danbooru, for up to two search tags
!nsfw <tag>               - Uploads a random NSFW image from Danbooru, for up to two search tags

Multiple tags are separated by a / symbol, Example: !sfw kancolle/thighhighs
Web APIs
!insta <username>         - Uploads the most recent instagram post from a given user
!crypto <coin> <amount>   - Displays current cryptocurrency price or calculated value (optional)
!r <subreddit>            - Uploads a random image from a given subreddit
Misc
!calc <expression>        - Evaluates a given expression
!roll <sides> <num>       - Rolls an n-sided die, m times and displays the result
Chatbot
2B answers her callsign in response to the user
Examples:
  Fshy: 2B How are you?
  2B:   Great! how about you?

  Fshy: 2B What's the time?
  2B:   It is 1:00 A.M.

Installation

Prerequisites

Windows:
#Install Microsoft Build Tools
npm install --global --production windows-build-tools
Ubuntu/Linux:
#Install Node/npm
$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
$ sudo apt-get install -y nodejs

#Install python2.7 and ffmpeg
$ sudo apt-get install -y python2.7 ffmpeg

#Install required build tools (make, gcc)
$ sudo apt-get install -y build-essential

#Configure python for node-gyp
$ npm config set python python2.7

Build

$ git clone https://github.com/Fshy/FshyBot
$ cd FshyBot
$ npm install
$ chmod 0775 app.js

Rename config_example.json to config.json and add your user token/API keys to suit.


Running

With a working config file in place, we're ready to start the script from the terminal/command prompt.

#Launch bot
$ node app.js

It's recommended however, to run scripts using a process manager such as PM2. This ensures your bot automatically restarts in case of a crash. This also allows us to use the !update command to fetch new builds.

#Install pm2
$ npm install pm2 -g

#Launch using pm2
$ pm2 start app.js --name "2B"

# Configure pm2 to launch on startup
$ pm2 startup
$ pm2 save

About

Meet 2B / Everyone's favourite videogame waifu, now in the form of a Discord.js S̷l̷a̷v̷e̷ Bot.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published