Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev #569

Merged
merged 83 commits into from
Oct 16, 2023
Merged

dev #569

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
c347c0b
Prepare for rewrite
abitofevrything Mar 18, 2023
4ea4f78
Implement basic HTTP functionality, caching, managers, base types & u…
abitofevrything Mar 20, 2023
c9e6f44
Change formatting to 160 line length
abitofevrything Mar 20, 2023
df1c5c5
Add instructions for adding HTTP models/endpoints to the rewrite
abitofevrything Mar 20, 2023
a448cf4
Add missing exports
abitofevrything Mar 20, 2023
d26a956
Rename SnowflakeEntityImpl to SnowflakeEntityMixin
abitofevrything Mar 20, 2023
733a19f
Add tests
abitofevrything Mar 22, 2023
7937ca0
Fix initialization error in test & unused imports
abitofevrything Mar 22, 2023
a706916
Merge remote-tracking branch 'origin/dev' into rewrite
abitofevrything Mar 22, 2023
cd5ddbd
Rewrite http channels API (#469)
abitofevrything May 4, 2023
7709271
Rewrite http webhook api (#478)
abitofevrything May 4, 2023
b1e945a
Rewrite http application api (#477)
abitofevrything May 4, 2023
b394a39
Rewrite http voice api (#479)
abitofevrything May 4, 2023
f75f9e1
Rewrite http guild api (#482)
abitofevrything May 30, 2023
e000935
Rewrite gateway API (#484)
abitofevrything Jun 10, 2023
0594052
Add PartialTextChannel (#485)
abitofevrything Jun 10, 2023
eb325f3
Rewrite stage instance http api (#486)
abitofevrything Jun 10, 2023
6b10ccc
Rerwrite scheduled event HTTP API (#487)
abitofevrything Jun 10, 2023
ee2167a
Rewrite auto moderation api (#489)
abitofevrything Jun 11, 2023
9f17acb
Rewrite guild template http api (#488)
abitofevrything Jun 11, 2023
d0b29d6
Rewrite application role connection metadata api (#490)
abitofevrything Jun 11, 2023
f113486
Cache per client (#493)
abitofevrything Jun 14, 2023
fe68c4f
Avoid hardcoding maxOffset in _FlagIterator (#495)
abitofevrything Jun 15, 2023
5dcc2ca
Rewrite plugins (#496)
abitofevrything Jun 19, 2023
8dbb046
Rewrite http invites api (#480)
Rapougnac Jun 19, 2023
cdd7407
Rewrite audit logs http api (#492)
abitofevrything Jun 20, 2023
baa3dd1
Rewrite http emojis api (#491)
Rapougnac Jun 20, 2023
abf7321
Only parse message update message as a partial message (#502)
abitofevrything Jun 22, 2023
958ce1e
Correctly register error handler in IgnoreExceptions (#501)
abitofevrything Jun 22, 2023
ad711f0
Todos (#498)
abitofevrything Jun 23, 2023
c05f1c1
Add getters to get a partial object from an ID where possible. (#500)
abitofevrything Jun 23, 2023
cca38c8
Change PartialTextChannel to return TextChannel when fetching (#503)
abitofevrything Jun 26, 2023
babcabf
Update infrastructure & metadata (#505)
abitofevrything Jun 30, 2023
a561438
rewrite: Implement Stickers (#499)
l7ssha Jul 2, 2023
5029d3e
Release 6.0.0-dev.1 (#506)
abitofevrything Jul 3, 2023
f83aa06
Handle batch rate limits correctly (#507)
abitofevrything Jul 3, 2023
5ab2e15
Rewrite cdn (#508)
abitofevrything Jul 3, 2023
6ebc790
fix: throwing error on null description (#509)
Rapougnac Jul 4, 2023
05c021c
Improve CDN rewrite (#511)
abitofevrything Jul 4, 2023
1533c76
Fix typo: chanel -> channel (#514)
abitofevrything Aug 4, 2023
8989abc
Correctly export ActivityBuilder (#513)
abitofevrything Aug 4, 2023
ebbf2a9
Add more bitwise operators on `Flags` (#510)
Rapougnac Aug 4, 2023
b3e4812
Rewrite interactions (#512)
abitofevrything Aug 4, 2023
0e96354
Improve cache clearing (#518)
abitofevrything Aug 19, 2023
fd56dbc
Add latency tracking features to rewrite (#517)
abitofevrything Aug 19, 2023
4ad3c76
Don't stringify classes without ToStringHelper (#520)
abitofevrything Aug 21, 2023
b4ea059
Add allPermissions getter (#522)
abitofevrything Aug 22, 2023
bce7eaa
Fix message update parsing (#521)
abitofevrything Aug 22, 2023
1a46a93
Clean up interaction response code; move isEphemeral from MessageBuil…
abitofevrything Aug 22, 2023
ea262a4
Add back a way for users to create ephemeral interaction followups (#…
abitofevrything Aug 24, 2023
7b414b8
Make all builders mutable (#524)
abitofevrything Aug 24, 2023
28e6ab1
Add EmbedBuilder (#525)
abitofevrything Aug 24, 2023
f4936c8
Release 6.0.0-dev.2 (#526)
abitofevrything Aug 24, 2023
e4f62ab
Fix sending text emoji in SelectMenuOptionBuilder (#528)
abitofevrything Aug 25, 2023
2b99feb
Add CommandOptionMentionable type (#527)
abitofevrything Aug 25, 2023
0108748
Add errors to handle interaction responses (#529)
abitofevrything Aug 26, 2023
d5fd47d
Add helper constructors to some builders (#531)
abitofevrything Aug 27, 2023
0a41de7
Add new NyxxOAuth2 client for authentication via OAuth2
abitofevrything Sep 1, 2023
f265ecb
Fix parsing members received in interaction resolved_data (#530)
abitofevrything Sep 3, 2023
76209f8
Add onRateLimit stream to HttpHandler (#532)
abitofevrything Sep 3, 2023
9d79001
Use more precise emoji type in reaction events (#533)
abitofevrything Sep 10, 2023
cca3200
Merge pull request #534 from nyxx-discord/rewrite
l7ssha Sep 10, 2023
e2cd7b4
Improve plugin interface (#545)
abitofevrything Sep 16, 2023
bfbe4e5
Make filename required in AttachmentBuilder (#546)
abitofevrything Sep 16, 2023
e30a8ea
Fix assertion in DiscordColor (#550)
abitofevrything Sep 16, 2023
cf5c17d
Allow users to specify stdout and stderr in Logging plugin (#549)
abitofevrything Sep 16, 2023
18bafed
Add caching of current user (#551)
abitofevrything Sep 16, 2023
7410c78
Bug/parse role mentions (#552)
abitofevrything Sep 16, 2023
e1d7679
Make attachment implement CdnAsset (#547)
abitofevrything Sep 16, 2023
344b86c
Release 6.0.0-dev.3 (#553)
abitofevrything Sep 16, 2023
d130e4c
Various message component bug fixes (#535)
jr1221 Sep 20, 2023
3630696
chore: add missing state field in ActivityBuilder (#556)
priyanuj-gogoi Sep 20, 2023
650ee17
fix: required activities field is not being sent in presence update p…
priyanuj-gogoi Sep 20, 2023
3402435
Remove string casts for `Snowflake.parse` (#559)
Rapougnac Sep 21, 2023
dbe07ac
Add conventions about branches (#560)
Rapougnac Sep 21, 2023
c31514b
fix: invalid client voice state update, export NyxxPluginState (#561)
priyanuj-gogoi Sep 25, 2023
141e444
Implement newly documented features since the start of the rewrite. (…
abitofevrything Sep 30, 2023
17dfca5
Update mentions field in message update event to be nullable (#564)
abitofevrything Oct 2, 2023
32507f3
Improve plugin interface and errors (#565)
abitofevrything Oct 16, 2023
0a70138
Release 6.0.0 (#566)
abitofevrything Oct 16, 2023
a594137
Merge remote-tracking branch 'origin/main' into chore/resolve-main-co…
abitofevrything Oct 16, 2023
18bca4a
Merge pull request #567 from nyxx-discord/chore/resolve-main-conflicts
l7ssha Oct 16, 2023
4ec02a3
Merge pull request #568 from nyxx-discord/next
l7ssha Oct 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: deploy dev docs
name: Deploy dev docs to nyxx.l7ssha.xyz

on:
push:
Expand Down
59 changes: 4 additions & 55 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
@@ -1,69 +1,18 @@
name: unit tests
name: Integration tests

on:
push:
branches-ignore:
- main

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
steps:
- name: Setup Dart Action
uses: dart-lang/setup-dart@v1

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

- name: Cache
uses: actions/cache@v2
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-pubspec-

- name: Install dependencies
run: dart pub get

- name: Analyze project source
run: dart analyze

format:
name: Format
runs-on: ubuntu-latest
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
steps:
- name: Setup Dart Action
uses: dart-lang/setup-dart@v1

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

- name: Cache
uses: actions/cache@v2
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-pubspec-

- name: Install dependencies
run: dart pub get

- name: Format
run: dart format --set-exit-if-changed -l 160 ./lib

tests:
needs: [ format, analyze ]
name: Tests
name: Run integration tests
runs-on: ubuntu-latest
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
TEST_TEXT_CHANNEL: ${{ secrets.TEST_TEXT_CHANNEL }}
TEST_GUILD: ${{ secrets.TEST_GUILD }}
steps:
- name: Setup Dart Action
uses: dart-lang/setup-dart@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: publish
name: Publish nyxx to pub.dev

on:
push:
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: unit tests
name: Run unit tests

on:
push:
Expand All @@ -8,10 +8,8 @@ on:

jobs:
analyze:
name: Analyze
name: Analyze project source
runs-on: ubuntu-latest
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
steps:
- name: Setup Dart Action
uses: dart-lang/setup-dart@v1
Expand All @@ -34,10 +32,8 @@ jobs:
run: dart analyze

format:
name: Format
name: Check project formatting
runs-on: ubuntu-latest
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
steps:
- name: Setup Dart Action
uses: dart-lang/setup-dart@v1
Expand All @@ -61,10 +57,12 @@ jobs:

tests:
needs: [ format, analyze ]
name: Tests
name: Unit tests
runs-on: ubuntu-latest
env:
TEST_TOKEN: ${{ secrets.TEST_TOKEN }}
TEST_TEXT_CHANNEL: ${{ secrets.TEST_TEXT_CHANNEL }}
TEST_GUILD: ${{ secrets.TEST_GUILD }}
steps:
- name: Setup Dart Action
uses: dart-lang/setup-dart@v1
Expand Down
59 changes: 39 additions & 20 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,29 +1,53 @@
local/
.atom/
# See https://www.dartlang.org/guides/libraries/private-files

# Files and directories created by pub
.dart_tool/
.packages
build/
pubspec.lock

# Pubspec overrides for local testing
pubspec_overrides.yaml

# Directory created by dartdoc
doc/api/

# dotenv environment variables file
.env*

# Avoid committing generated Javascript files:
*.dart.js
*.info.json # Produced by the --dump-info flag.
*.js # When generated by dart2js. Don't specify *.js if your
# project includes source files written in JavaScript.
*.js_
*.js.deps
*.js.map

.flutter-plugins
.flutter-plugins-dependencies

# IDE configuration folders
.vscode/
.atom/
.idea/
*.iml

# Test output and coverage
log.txt
coverage/

local/
index.html
docs/
.buildlog
.packages
.project
.pub
**/build
**/packages
*.dart.js
*.part.js
*.js.deps
*.js.map
*.info.json
doc/api/
pubspec.lock
*.iml
.idea
*~
*#
.#*
.dart_tool/
/README.html
/log.txt
/nyxx.wiki/
/test/private.dart
/publish_docs.sh
Expand All @@ -32,8 +56,3 @@ pubspec.lock
private-*.dart
test-*.dart
[Rr]pc*
**/doc/api/**
**/coverage/**
coverage.json
lcov.info
.vscode/
40 changes: 0 additions & 40 deletions .pubignore

This file was deleted.

63 changes: 63 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,66 @@
## 6.0.0
__16.10.2023__

- rewrite: The entire library has been rewritten from the ground up. No pre-`6.0.0` code is compatible.
To explore the rewrite, check out [the API documentation](https://pub.dev/documentation/nyxx) or the [documentation website](https://nyxx.l7ssha.xyz).
For help migrating, use the [migration tool](https://github.com/abitofevrything/nyxx-migration-script) or join [our Discord server](https://discord.gg/nyxx) for additional help.

#### Changes since 6.0.0-dev.3
- bug: Fix `ModalBuilder` having the incorrect data type.
- feat: Add the new `state` field to `ActivityBuilder`.
- bug: Fix `activities` not being sent in the presence update payload.
- bug: Fix casts when parsing `Snowflake`s triggering errors when using ETF.
- bug: Fix incorrect payload preventing the client from muting/deafening itself.
- bug: Correctly export `NyxxPluginState`.
- feat: Implement all new features since the start of the rewrite (including premium subscriptions).
- bug: Fix incorrect parsing of `MessageUpdateEvent`s.
- feat: Add `logger` to plugins and make `name` inferred from `runtimeType` by default.

## 6.0.0-dev.3
__16.09.2023__

- rewrite: Interaction responses now throw errors instead of using assertions.
- rewrite: Improved plugin interface with support for plugin state and a simpler API.
- feat: Added constructors to most builders with multiple configurations.
- feat: Added support for authenticating via OAuth2.
- feat: Added `HttpHandler.onRateLimit` for tracking client rate limiting.
- feat: Parse emoji in reaction events.
- feat: Allow specifying `stdout` and `stderr` in `Logging`.
- feat: Add `NyxxRest.user` to get the current user.
- feat: `Attachment` now implements `CdnAsset` for easier fetching.
- bug: Fixed emoji in SelectMenuBuilder not being sent correctly.
- bug: Fixed parsing members in interaction data.
- bug: `DiscordColor` did not allow a value of `0xffffff` (white).
- bug: Fixed parsing role mentions as role objects in messages.


## 6.0.0-dev.2
__24.08.2023__

- rewrite: Changed `MessageBuilder.embeds` and `MessageUpdateBuilder.embeds` to use a new `EmbedBuilder` instead of `Embed` objects.
- rewrite: Changed all builders to be mutable.
- rewrite: Implement the interactions & message components API.
- rewrite: `ActivityBuilder` is now exported.
- rewrite: Fixed some typos: `ChannelManager.parseForumChanel` -> `ChannelManager.parseForumChannel` and `chanel` -> `channel` in the docs for `VoiceChannel.videoQualityMode`.
- rewrite: Added wrappers around CDN endpoints and assets.
- feat: Added `Permissions.allPermissions`, the set of permission flags with all permissions.
- feat: Added `HttpHandler.latency`, `HttpHandler.realLatency`, `Gateway.latency` and `Shard.latency` for tracking the client's latency.
- feat: `Flags` now has the `~` and the `^` operators.
- feat: Added `HttpHandler.onRequest` and `HttpHandler.onResponse` streams for tracking HTTP requests and responses.
- bug: Fixed `MessageUpdateEvent`s causing a parsing error.
- bug: Fixed classes creating uncaught async errors when `toString()` was invoked on them.
- bug: Empty caches are no longer stored.
- bug: Fixed stickers causing a parsing error.
- bug: Fixed rate limits not applying correctly when multiple requests were queued.
- bug: Fixed `applyGlobalRatelimit` in `HttpRequest` not doing anything.

## 6.0.0-dev.1
__03.07.2023__

- rewrite: The entire library has been rewritten from the ground up. No pre-`6.0.0-dev.1` code is compatible.
Join our Discord server for updates concerning the migration path and help upgrading.
For now, check out the new examples and play around with the rewrite to get a feel for it.

## 5.1.1
__11.08.2023__

Expand Down
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ All issues marked with 'help-needed' badge are free to be picked up by any membe
Pull requests should be descriptive about changes that are made.
If adding new functionality or modifying existing, documentation should be added/modified to reflect changes.

When submitting a pull request, please, always create a new branch with the following format; `[scope]/name`.
`[scope]` must be the type of changes your PR alter. E.g, when adding a new feature, it must be `feat/`, for a bugfix, `bug/` or `fix/`, etc..

Do not push your changes on the three main branches, it can messes up with rebases.

## Coding style

We attempt to conform [Effective Dart Coding Style](https://dart.dev/guides/language/effective-dart/style) where possible.
Expand Down
Loading
Loading