Each file in ./resources
expects a github webhook in the repositories secrets in the format WEBHOOK_FILE_NAME
.
Deploying the webhook messages is done manually via workflow dispatch.
The provided tags are the resource names in discord channel format and separated by the ,
character.
Example: rules, useful-servers
The repository requires the WEBHOOK_AVATAR
and WEBHOOK_NAME
repository secrets which control the webhooks avatar and name respectively for all deployed webhook resources.
- Fork & clone the repository, and make sure you're on the main branch
- Run
npm install
- Code your heart out!
- Run
npm run lint
to run ESLint - Run
npm run build
to transpile into JavaScript and ensure no type errors remain - Submit a pull request (Make sure you follow the conventional commit format)
- Add the file into
./resources
(The file name should be derived from the channel the webhook will post to for added verbosity. The channelfoo-bar
becomesFOO_BAR.md
) - Each new paragraph (double newline character) will be posted in a new message. Try to use as few messages as possible (the limit is 2000 characters per message) to avoid rate limiting. You can add a spacer and simulate a new message with
_ _
- Channel names and other escape sequences should have the format
%FOO_BAR%
and need to be added to the mappingreplacePatterns
in./src/index.ts
- Add a Webhook requirement to
./.github/workflows/deploy.yml
. The repository secret should be prefixed withWEBHOOK_
for added verbosity. The entry for our example isFOO_BAR: ${{ secrets.WEBHOOK_FOO_BAR }}