-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add discord bot documentation and build
- Loading branch information
1 parent
0c7cfaf
commit 0e7d7e4
Showing
3 changed files
with
86 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 クッキー☆ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters