Skip to content

tktcorporation/discord-links-transfer-bot

Repository files navigation

discord-links-transfer-bot

Test

Prerequirements

  • Docker, docker-compose
  • Discord Bot Token

Get Started

Env Vars

  1. cp -p .envrc.sample .envrc and set variables.
  2. Install direnv.
  3. direnv allow

Run

  1. Invite your bot to your server.
  2. docker-compose run app
  3. Post ~join in your server.
  4. The bot talk in voice chat.

Develop

  1. docker-compose run app /bin/bash

Test

RUST_BACKTRACE=1 cargo test

Linter, Formatter

  • Lint
cargo clippy --all
  • Format
cargo fmt --all
Task Runner

act can use as a task runner in this project.
But, it takes longer than cargo commands.

# lint, format(check), test
act
# deploy to heroku
act release

Deploying to Heroku

Prerequirements

  • Heroku Account

Deploy

docker-compose run heroku /bin/bash
heroku create <APP_NAME>
heroku login
apk add docker
heroku container:login
heroku container:push app -a <APP_NAME>
heroku container:release app -a <APP_NAME>
heroku ps:scale app=1 -a <APP_NAME>

To invite sample bot

https://discord.com/api/oauth2/authorize?client_id=866822680485429259&permissions=2147822672&scope=bot

LICENCE

MIT

About

#random でリンク検知したら自動的に #links に転送したい

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published