Skip to content

Commit

Permalink
Init bot v2
Browse files Browse the repository at this point in the history
  • Loading branch information
Dylon Wong committed Oct 26, 2020
1 parent 2345398 commit e6f3782
Show file tree
Hide file tree
Showing 56 changed files with 3,337 additions and 1,683 deletions.
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@
*.mp3
tmp

# Environment
*.env

# Cache
cache/
src/data/cache/
src/data/vidcache/

# Credential
cred/
Expand Down
31 changes: 21 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# bili-bot
# bili-bot v2
Discord bot for playing Bilibili video

A fork project from https://github.com/JyaouShingan/bili-bot

## Installation
### 1. Install `NodeJs` version >= v10

### 2. Install `FFMpeg` library

On macOS:
Expand All @@ -16,6 +17,10 @@ On Debian-Linux:
apt-get install ffmpeg
```

On Windows:

Refer to https://github.com/m-ab-s/media-autobuild_suite

Make sure ffmpeg executable is in system `PATH` environment variable

### 3. Install and run MongoDB
Expand All @@ -27,11 +32,17 @@ brew install mongodb-community
brew services start mongodb-community
```

On Debian-Linux
On Debian-Linux:

Refer to https://docs.mongodb.com/manual/tutorial/install-mongodb-on-debian/

Make sure `mongod` service is running before starting the bot.
On Windows:

Create a new atlas cluster ->
- https://www.mongodb.com/cloud/atlas
- https://www.mongodb.com/products/compass

Make sure `mongodb` service is running before starting the bot.

### 4. Install dependency

Expand All @@ -41,12 +52,12 @@ npm install

## Configuration

Create a json file under root directory named `botconfig.json`:
```json
{
"discordToken": "<YOUR TOKEN HERE>",
"mongoUri": "mongodb://localhost:27017 (or your custom URI)"
}
Create a file under root directory named `.env`:
```dotenv
DiscordToken=your_token
MONGO_URI=mongodb_url
DB_NAME=database_name
YTApiKey=youtubeAPIKey
```

## Run
Expand Down
Binary file added icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e6f3782

Please sign in to comment.