Skip to content

Commit

Permalink
add discord bot documentation and build
Browse files Browse the repository at this point in the history
  • Loading branch information
iamtakingiteasy committed May 14, 2022
1 parent 0c7cfaf commit 0e7d7e4
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/go-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,27 @@ jobs:
disable_packaging: true
overwrite: true
build_flags: "-tags forceposix"
release-jaroid-matrix:
name: Release Go Binary
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
goos: [linux, windows, darwin]
goarch: ["386", amd64]
exclude:
- goarch: "386"
goos: darwin
steps:
- uses: actions/checkout@v2
- uses: eientei/[email protected]
with:
github_token: ${{ secrets.github_token }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
goversion: "https://dl.google.com/go/go1.17.1.linux-amd64.tar.gz"
project_path: "./cmd/jaroid"
binary_name: "jaroid"
disable_packaging: true
overwrite: true
build_flags: "-tags forceposix"
58 changes: 58 additions & 0 deletions README.jaroid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
This dsicord bot downloads videos from [nicovideo.jp](https://www.nicovideo.jp/),
provides color roles, role reactions and proxied pins

USAGE
---
Set up a discord application with bot associated https://discord.com/developers/docs/intro ; note the discord bot token.

Run as `./jaroid -c config.yml`

Bot implementation requires a redis server to store persistent configuration and queues

Config
---

Example structure

```yaml
private:
token: "<discord bot token>"
prefix: "!"
redis:
address: "127.0.0.1:6379"
password: ""
db: 0
nicovideo:
directory: "/home/somewhere/public/nicovideo"
public: "http://example.com/nicovideo"
period: "24h"
auth:
username: ""
password: ""
```
`!nico.download` will place files in `nicovideo.directory` and post a link using `nicovideo.public` as base, hence directory
should be served by some HTTP server.

Example nginx configuration:
```
server {
server_name example.com;
listen 80;
root /home/somewhere/public/nicovideo;
location / {
autoindex on;
}
}
```

Setting up a feed
---

```
!nico.feed <name> <period> <channelID> <search filter>
```
e.g. !nico.feed cookie 1h 1234567890 クッキー☆
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ Components:
- [jaroidfedipost](README.jaroidfedipost.md)

CLI utility for posting nicovideo uploads

- [jaroid](README.jaroid.md)

Discord bot providing same nicovideo download, API search and feeds, alongside with more conventional colored/reaction roles and proxied message pinning.

0 comments on commit 0e7d7e4

Please sign in to comment.