Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lon9/discord-generalized-sound-bot
Generalized sound bot on Discord
https://github.com/lon9/discord-generalized-sound-bot
bot discord discord-bot docker golang nuxt sound vue
Last synced: 5 days ago
JSON representation
Generalized sound bot on Discord
- Host: GitHub
- URL: https://github.com/lon9/discord-generalized-sound-bot
- Owner: lon9
- Created: 2018-07-18T08:21:46.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T15:15:57.000Z (almost 2 years ago)
- Last Synced: 2024-06-22T16:57:59.238Z (5 months ago)
- Topics: bot, discord, discord-bot, docker, golang, nuxt, sound, vue
- Language: Go
- Homepage:
- Size: 3.61 MB
- Stars: 4
- Watchers: 3
- Forks: 3
- Open Issues: 35
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Discord Generalized Sound Bot
Discord Generalized Sound Bot is a bot that can play sounds on your Discord server.
[![Build Status](https://travis-ci.org/lon9/discord-generalized-sound-bot.svg?branch=master)](https://travis-ci.org/lon9/discord-generalized-sound-bot)
## Features
* Playing a sound on your Discord server.
* You can add sounds with web interface.
* You can search sounds on the web.
* No limit of the number of sounds.## Usage
1. Create config files
`.env`
```shell
BACKEND_URL=http://localhost:3000
BACKEND_VIRTUAL_HOST=backend.example.com
BACKEND_LETSENCRYPT_HOST=backend.example.com
BACKEND_LETSENCRYPT_EMAIL=example.com
ADMIN_VIRTUAL_HOST=admin.example.com
ADMIN_LETSENCRYPT_HOST=admin.example.com
ADMIN_LETSENCRYPT_EMAIL=example.com
WEB_VIRTUAL_HOST=example.com
WEB_LETSENCRYPT_HOST=example.com
WEB_LETSENCRYPT_EMAIL=example.com
ADMIN_TITLE=Admin title here
WEB_TITLE=Web title here
WEB_DESCRIPTION=Description
WEB_OG_DESCRIPTION=Og description
WEB_OG_URL=Og url
WEB_OG_IMAGE=Og image
WEB_TWITTER_CARD=summary_large_image
````backend/config/environment/production.yaml`
```yaml
db:
url: "data/production/sounds.db"
server:
port: "3000"
cors:
- "http://example.com"
- "http://admin.example.com"
data:
path: "data/production"
prefix: "sounds_dca"
auth:
secret: "secret"
username: "admin"
password: "Hashed password"
```You can make password using genpass
```shell
docker build -t genpass genpass/
docker run --rm -it genpass genpass
````bot/config.yml`
```yaml
botToken: abcde [Discord bot token]
dbUrl: /sounds_dca/sounds.db [Where the sounds.db is]
botPrefix: $ [Bot command prefix]
botHelp: Help message [Bot help message]
botPlaying: Playing something [Bot status]
botNotFound: Sound not found [The message when sound not found]
soundDir: /
name: ExampleBot [Bot name]
applicationId: 1234567 [Discord application id]
soundCacheSize: 100 [The number of cached sounds]
maxQueueSize: 6 [The size of queue per guild]
env: development [Environment]
logChannelId: 1234567 [Channel ID you want to send log on the channel]
```1. `docker-compose up -d`
### addsound module
You can use `addsound` module to initialize database from a directory structure.
Check out addsound [directory](https://github.com/lon9/discord-generalized-sound-bot/tree/master/addsound)
## Development
I'm maintaining backend with test.
```shell
docker-compose -f docker-compose-test.yml run --rm backend-test
```### Dependencies
backend depends on FFmpeg with opus and libvorbis
### TODO
- [x] Making a bot.
- [x] Making a web site to search sound name.
- [x] Making a admin site to add sounds.
- [x] Add Docker things.
- [x] Implement session sharding.
- [x] Implement a command to search sounds.