Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kseen715/not-a-bot

Musical Discord bot
https://github.com/kseen715/not-a-bot

Last synced: 8 days ago
JSON representation

Musical Discord bot

Awesome Lists containing this project

README

        

# N-A-B



&

## Description
This is musical Discord bot.

### Features
- `ping` - check connection to the server
- `radio [name]` - play direct radio stream from the lib
- `radiolist` - show lib of radiostations
- `stop` - stop whatever plays now
- `prune [count]` - delete [count] messages (admin only)
- `prunetime [time (XXdXXhXXmXXs)]` - delete messages that was sent in [time] period (admin only)
- `play` - (WIP) play audio from YT video

## Usage

### Docker-compose:

```
version: '3.8'
services:
not-a-bot:
image: kseen/not-a-bot:latest
container_name: not-a-bot
restart: unless-stopped
environment:
TOKEN: ""
PREFIX: "', '-' and etc.>"
```

### Raw python:

Install [FFmpeg](https://ffmpeg.org/download.html).

```
python3 pip install -r requirements.txt
```

Then create `.env` file with fields as:

```
TOKEN=
PREFIX=', '-' and etc.>
```

Now you're ready to run app:

```
python3 main.py
```

### Python venv:

Install [FFmpeg](https://ffmpeg.org/download.html).

#### On Linux:

Create venv:
```
python3 -m venv venv
```

Activate venv:
```
venv\Scripts\activate
```

Update pip module inside of the venv (I use [pypa](https://github.com/pypa/get-pip) script):
```
curl -s https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python get-pip.py && rm get-pip.py
```

Install all dependencies:
```
pip install -r requirements.txt --no-cache-dir --quiet
```

Run app:
```
python main.py
```

#### On Windows:

For the first run use `venv-setup.ps1`. It will create new venv and setup all needed stuff. Or to use already created run venv, use script `venv-run.ps1`. After that just run:
```
python main.py
```