Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
l7ssha committed Nov 4, 2021
2 parents dd11d00 + 1ea7a85 commit d5131a2
Show file tree
Hide file tree
Showing 253 changed files with 382 additions and 7,830 deletions.
10 changes: 2 additions & 8 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ jobs:
deploy-docs:
runs-on: ubuntu-latest

strategy:
matrix:
package: [ "nyxx", "nyxx_commander", "nyxx_extensions", "nyxx_interactions", "nyxx_lavalink" ]

steps:
- name: Cache
uses: actions/cache@v2
Expand All @@ -29,19 +25,17 @@ jobs:
uses: actions/[email protected]

- name: Install dependencies
working-directory: ./${{ matrix.package }}
run: dart pub get

- name: Generate docs
working-directory: ./${{ matrix.package }}
run: dartdoc

- name: Deploy nyxx dev docs
uses: easingthemes/[email protected]
env:
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_SSH_SERVER_KEY }}
ARGS: "-rltDzvO"
SOURCE: "${{ matrix.package }}/doc/api/"
SOURCE: "doc/api/"
REMOTE_HOST: ${{ secrets.DEPLOY_REMOTE_HOST }}
REMOTE_USER: ${{ secrets.DEPLOY_REMOTE_USER }}
TARGET: "${{ secrets.DEPLOY_REMOTE_TARGET }}/dartdocs/${{ matrix.package }}/"
TARGET: "${{ secrets.DEPLOY_REMOTE_TARGET }}/dartdocs/nyxx"
43 changes: 2 additions & 41 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,54 +27,15 @@ jobs:
uses: actions/[email protected]

- name: Install dependencies
working-directory: ./nyxx
run: dart pub get

- name: Analyze project source
working-directory: ./nyxx
run: dart analyze

- name: Compile tests
working-directory: ./nyxx/test
working-directory: ./test
run: dart2native travis.dart

- name: Run tests
working-directory: ./nyxx/test
working-directory: ./test
run: ./travis.exe

test-commander:
name: Tests commander package
needs: [test-nyxx]
runs-on: ubuntu-latest
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
steps:
- name: Cache
uses: actions/cache@v2
with:
path: ~/.pub_cache
key: ${{ runner.os }}

- name: Setup Dart Action
uses: cedx/[email protected]
with:
release-channel: stable

- name: Checkout
uses: actions/[email protected]

- name: Install dependencies
working-directory: ./nyxx_commander
run: dart pub get

- name: Analyze project source
working-directory: ./nyxx_commander
run: dart analyze

- name: Compile tests
working-directory: ./nyxx_commander/test
run: dart2native commander-test.dart

- name: Run tests
working-directory: ./nyxx_commander/test
run: ./commander-test.exe
31 changes: 0 additions & 31 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
cp README.md ./nyxx/README.md
cp -f LICENSE ./nyxx/LICENSE
- name: 'publish nyxx package to pub.dev'
id: publish
uses: k-paxian/dart-package-publisher@master
Expand All @@ -21,34 +18,6 @@ jobs:
force: true
suppressBuildRunner: true
credentialJson: ${{ secrets.CREDENTIAL_JSON }}
relativePath: nyxx
- name: 'Commit release tag'
if: steps.publish.outputs.success
uses: hole19/git-tag-action@master
env:
TAG: ${{steps.publish.outputs.package}}-${{steps.publish.outputs.localVersion}}
GITHUB_TOKEN: ${{ secrets.TAG_RELEASE_TOKEN }}

subpackages_publish:
needs: [nyxx_publish]
runs-on: ubuntu-latest

strategy:
matrix:
package: ["nyxx_commander", "nyxx_extensions", "nyxx_interactions", "nyxx_lavalink"]

steps:
- uses: actions/checkout@v2
- run: cp -f LICENSE ./${{ matrix.package }}/LICENSE
- name: 'publish ${{ matrix.package }} to pub.dev'
id: publish
uses: k-paxian/dart-package-publisher@master
with:
skipTests: true
force: true
suppressBuildRunner: true
credentialJson: ${{ secrets.CREDENTIAL_JSON }}
relativePath: ${{ matrix.package }}
- name: 'Commit release tag'
if: steps.publish.outputs.success
uses: hole19/git-tag-action@master
Expand Down
73 changes: 0 additions & 73 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,83 +28,10 @@ jobs:
uses: actions/[email protected]

- name: Install dependencies
working-directory: ./nyxx
run: dart pub get

- name: Analyze project source
working-directory: ./nyxx
run: dart analyze

- name: Unit tests
working-directory: ./nyxx
run: dart test test/unit.dart

analyze-subpackages:
needs: [ test-nyxx ]
runs-on: ubuntu-latest
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}

strategy:
matrix:
package: [ "nyxx_commander", "nyxx_lavalink" ]

steps:
- name: Cache
uses: actions/cache@v2
with:
path: ~/.pub_cache
key: ${{ runner.os }}

- name: Setup Dart Action
uses: cedx/[email protected]
with:
release-channel: stable

- name: Checkout
uses: actions/[email protected]

- name: Install dependencies
working-directory: ./${{ matrix.package }}
run: dart pub get

- name: Analyze project source
working-directory: ./${{ matrix.package }}
run: dart analyze

test-subpackages:
needs: [ test-nyxx ]
runs-on: ubuntu-latest
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}

strategy:
matrix:
package: [ "nyxx_extensions", "nyxx_interactions" ]

steps:
- name: Cache
uses: actions/cache@v2
with:
path: ~/.pub_cache
key: ${{ runner.os }}

- name: Setup Dart Action
uses: cedx/[email protected]
with:
release-channel: stable

- name: Checkout
uses: actions/[email protected]

- name: Install dependencies
working-directory: ./${{ matrix.package }}
run: dart pub get

- name: Analyze project source
working-directory: ./${{ matrix.package }}
run: dart analyze

- name: Unit tests
working-directory: ./${{ matrix.package }}
run: dart test test/unit.dart
File renamed without changes.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# nyxx

[![Discord Shield](https://discordapp.com/api/guilds/846136758470443069/widget.png?style=shield)](https://discord.gg/m3tNPpwmRg)
[![pub](https://img.shields.io/pub/v/nyxx.svg)](https://pub.dartlang.org/packages/nyxx)
[![documentation](https://img.shields.io/badge/Documentation-nyxx-yellow.svg)](https://www.dartdocs.org/documentation/nyxx/latest/)
[![documentation](https://img.shields.io/badge/Documentation-nyxx.commander-yellow.svg)](https://www.dartdocs.org/documentation/nyxx.commander/latest/)
Expand Down Expand Up @@ -34,7 +33,7 @@ void main() {
bot.onMessageReceived.listen((event) {
if (event.message.content == "!ping") {
event.message.channel.sendMessage(MessageBuilder.content("Pong!"));
event.message.channel.getFromCache()?.sendMessage(content: "Pong!");
}
});
}
Expand Down Expand Up @@ -62,17 +61,17 @@ void main() {
final bot = Nyxx("TOKEN", GatewayIntents.allUnprivileged);
Commander(bot, prefix: "!!!")
..registerCommand("ping", (context, message) => context.reply(MessageBuilder.content("Pong!")));
..registerCommand("ping", (context, message) => context.reply(content: "Pong!"));
}
```

## More examples

Nyxx examples can be found [here](https://github.com/l7ssha/nyxx/tree/dev/nyxx/example).

Commander examples can be found [here](https://github.com/l7ssha/nyxx/tree/dev/nyxx_commander/example)
Commander examples can be found [here](https://github.com/l7ssha/nyxx/tree/dev/nyxx.commander/example)

Slash commands (interactions) examples can be found [here](https://github.com/l7ssha/nyxx/tree/dev/nyxx_interactions/example)
Slash commands (interactions) examples can be found [here](https://github.com/l7ssha/nyxx/tree/dev/nyxx.interactions/example)

### Example bots
- [Running on Dart](https://github.com/l7ssha/running_on_dart)
Expand Down Expand Up @@ -101,6 +100,6 @@ Wiki documentation are designed to match the latest Nyxx release.

Read [contributing document](https://github.com/l7ssha/nyxx/blob/development/CONTRIBUTING.md)

## Credits
## Credits

* [Hackzzila's](https://github.com/Hackzzila) for [nyx](https://github.com/Hackzzila/nyx).
* [Hackzzila's](https://github.com/Hackzzila) for [nyx](https://github.com/Hackzzila/nyx).
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit d5131a2

Please sign in to comment.