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

Update CurrentApplicationInfo and add support for editing it #3035

Open
wants to merge 171 commits into
base: next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
9ee3f38
Remove temporary `Vec` usage in the `http` module (#2624, #2646)
GnomedDev Dec 3, 2023
82e3b8a
Remove deprecated items (#2645)
GnomedDev Dec 3, 2023
bfa98b3
Remove more deprecated items (#2651)
GnomedDev Dec 8, 2023
062972b
Remove `*_arc` methods (#2654)
GnomedDev Dec 8, 2023
24f1367
Clean up `ShardManager`/`ShardQueuer`/`ShardRunner` (#2653)
GnomedDev Dec 9, 2023
05c6c19
Put `Message::thread` behind a `Box` (#2658)
GnomedDev Dec 9, 2023
5239d2b
Replace `Vec` and `String` with `FixedArray` and `FixedString` for al…
GnomedDev Dec 10, 2023
9dc055a
Fix truncation when using `FixedString<u8>` where multibyte character…
GnomedDev Dec 14, 2023
6a4b6ce
Encode timestamps in RFC3339 (#2665)
Kerollmops Dec 22, 2023
966a7bf
Switch to `i64` in methods associated with `CreateCommandOption` (#2668)
ARandomDev99 Dec 22, 2023
48774e8
Get rid of the duplicate users cache (#2662)
GnomedDev Dec 28, 2023
bda5a37
Change `Embed::fields` to use `FixedArray` (#2674)
GnomedDev Dec 28, 2023
137bb74
Use `FixedArray` and `FixedString` in model enums (#2675)
GnomedDev Dec 28, 2023
36a9443
Bitpack boolean fields using fancy proc macro (#2673)
GnomedDev Dec 31, 2023
e7f32cd
Use `nonmax::NonMax*` types in `Option`s wherever possible (#2681)
GnomedDev Jan 2, 2024
1a1fc10
Remove unused warning `#[allow(...)]`s (#2682)
GnomedDev Jan 2, 2024
d8076f6
Get rid of `unsafe` (#2686)
GnomedDev Jan 3, 2024
7b056f9
Swap Git dependencies for crates.io published versions (#2685)
GnomedDev Jan 3, 2024
98b58da
Swap Id from `NonZero` to `NonMax` (#2689)
GnomedDev Jan 5, 2024
3b57e18
Rewrite builders to take `Cow`s (#2688)
GnomedDev Jan 6, 2024
757c48d
Store `Request::params` as a slice instead of owning `ArrayVec` (#2694)
GnomedDev Jan 7, 2024
28abad6
Revert `Request::params` back to `Option` (#2695)
mkrasnitski Jan 7, 2024
4d85cba
Remove unnecessary `Vec` in `WsClient` (#2705)
GnomedDev Jan 10, 2024
eb75fab
Feature gate `#[instrument]` macros (#2707)
GnomedDev Jan 10, 2024
eb4c688
Remove `impl Into<Option>` (#2701)
GnomedDev Jan 10, 2024
b3937e7
Get rid of `IntoIterator` generics wherever they are inefficent (#2698)
GnomedDev Jan 10, 2024
0fc6d57
Clean up `Ratelimiter` (#2687)
GnomedDev Jan 10, 2024
132602d
Handle overflow checks in central locations (#2697)
GnomedDev Jan 10, 2024
b0ad59d
Shrink size and clean up `Error` (#2700)
GnomedDev Jan 10, 2024
b6ceae1
Remove manual `#[inline]` attributes (#2702)
GnomedDev Jan 10, 2024
784069b
Remove `Into<*Id>` and `AsRef<str>` (#2704)
GnomedDev Jan 11, 2024
7c71ab4
Remove `Event::Unknown` variant (#2708)
mkrasnitski Jan 12, 2024
8490ad6
Use `NonMax` to signal builder range constraints (#2703)
GnomedDev Jan 14, 2024
637ef2c
Stop using `Value` in error parsing (#2710)
GnomedDev Jan 14, 2024
cf332e4
Fix new clippy lints (#2713)
GnomedDev Jan 14, 2024
9af26a5
Update to `small-fixed-array` v0.2 (#2711)
GnomedDev Jan 14, 2024
d16b50a
Fix `@everyone` role deserialisation (#2716)
GnomedDev Jan 16, 2024
64f9fb4
Fix `GuildChannel` deserialisation with `user_limit` (#2715)
GnomedDev Jan 16, 2024
92a3e52
Fix maximum description length to the correct size (#2718)
Milo123459 Jan 16, 2024
0b8e66d
Remove dashboard example (#2714)
GnomedDev Jan 16, 2024
b480f46
Fix compilation from rebase
arqunis Jan 16, 2024
5bd7375
Remove deprecated `absolute_ratelimits` feature (#2719)
GnomedDev Jan 16, 2024
9badb04
Implement `max_concurrency` support when starting shards (#2661)
mkrasnitski Jan 16, 2024
ea04471
Remove typemap without making everything generic (#2720)
GnomedDev Jan 16, 2024
772d794
Provide `Arc<Data>` instead of `&Data` (#2722)
GnomedDev Jan 17, 2024
c27cfb0
Add `Client::try_data` to fallibly fetch the data type (#2723)
GnomedDev Jan 18, 2024
e409837
Fix voice manager initialisation (#2727)
GnomedDev Jan 21, 2024
888409d
Remove some pedantic lints from the whitelist (#2728)
mkrasnitski Jan 21, 2024
9dc9acf
Reduce unknown events to debug level, again (#2730)
GnomedDev Jan 21, 2024
1fee8d7
Fix compilation from rebase
arqunis Jan 22, 2024
f68d1ca
Fix testing example
mkrasnitski Jan 22, 2024
ec801da
Remove `PartialEq` implementations from all builders (#2734)
mkrasnitski Jan 22, 2024
18bb2b4
Remove various instances of `impl AsRef<T>` (#2736)
GnomedDev Jan 24, 2024
7e2ffa6
Remove `simd-json` support (#2735)
GnomedDev Jan 24, 2024
e59919d
Fix massive code size of `client::dispatch` (#2739)
GnomedDev Jan 25, 2024
94373d0
Fix RoleTags deserialisation after removal of simd-json (#2742)
GnomedDev Jan 26, 2024
c8b65b9
Avoid cloning FullEvent in dispatch code (#2740)
GnomedDev Jan 27, 2024
cba1aad
Remove the builder trait and only take required arguments (#2741)
GnomedDev Jan 27, 2024
e23d2f2
Use Serializer::collect_seq in serialize impls (#2744)
GnomedDev Jan 28, 2024
079dd4f
Convert enum number into wrapper struct to save type sizes (#2746)
GnomedDev Jan 29, 2024
adfc0d5
Use Arc<str> to store the token (#2745)
GnomedDev Jan 29, 2024
93eba0a
Remove standard framework (#2731)
GnomedDev Jan 29, 2024
10e9599
Re-add Secret to bot token (#2748)
GnomedDev Jan 29, 2024
f971e5e
Take Arc<Http> in ClientBuilder::new_with_http (#2749)
GnomedDev Feb 3, 2024
d60e582
Remove duplicate content_safe implementation (#2759)
GnomedDev Feb 9, 2024
430a68c
Simplify the message cache (#2757)
GnomedDev Feb 9, 2024
6573b5b
Upgrade to small-fixed-array 0.4 (#2755)
GnomedDev Feb 9, 2024
e8e827d
Avoid HashMap in ShardQueue (#2750)
GnomedDev Feb 11, 2024
98d1fdf
Switch to a generic type argument for `ClientBuilder::data` (#2765)
vicky5124 Feb 11, 2024
b7885bf
Fix `VoiceServerUpdate::guild_id` being wrapped in `Option` (#2766)
GnomedDev Feb 13, 2024
3bc7e76
Improve MessageBuilder to fit with other builders (#2767)
GnomedDev Feb 15, 2024
eae5c76
Fill message cache with ChannelId::messages and ChannelId::pins (#2768)
GnomedDev Feb 15, 2024
b431bcd
Defer deserialisation of Dispatch to handle errors (#2764)
GnomedDev Feb 16, 2024
8cec91c
Remove `CreateAttachment::id` field (#2771)
mkrasnitski Feb 17, 2024
7a2fd86
Fix compilation from rebase
arqunis Mar 1, 2024
38c8090
Fix remaining clippy warnings
GnomedDev Mar 1, 2024
95cb477
Format unformatted code from rebase
arqunis Mar 1, 2024
843aba4
Remove rebase artifacts in README
arqunis Mar 1, 2024
915a704
Synchronise README example from the `current` branch
arqunis Mar 1, 2024
776c919
Minor adjustments
mkrasnitski Mar 1, 2024
1924acd
Apply Strum derives for FullEvent and Event (#2788)
cheesycod Mar 10, 2024
cc343f0
Remove `Channel::name` (#2787)
GnomedDev Mar 10, 2024
ad19219
Use join_to_string throughout serenity (#2785)
GnomedDev Mar 10, 2024
43e7881
Use ToArrayString for int -> str (#2786)
GnomedDev Mar 10, 2024
5ac1dd7
Rename `unstable_discord_api` to `unstable` and disable it by default…
cheesycod Mar 10, 2024
6dcd935
Remove deprecated Channel::is_nsfw methods (#2792)
GnomedDev Mar 11, 2024
5a3f766
Replace manual Hash/Eq implementation on User/Role (#2793)
GnomedDev Mar 12, 2024
5f4c4a8
Remove useless method wrappers (#2795)
GnomedDev Mar 13, 2024
e6fb09b
Fix unused variable warning from rebase
GnomedDev Mar 13, 2024
4b2feb5
Remove deprecated mapped refs and Cache::channels (#2796)
GnomedDev Mar 13, 2024
94ed223
Use ExtractMap instead of HashMap when possible (#2797)
GnomedDev Mar 17, 2024
e94bbaa
Remove examples and inaccurate docs from HTTP (#2805)
GnomedDev Mar 17, 2024
d0b0b00
Use NonMax in HTTP function signatures (#2803)
GnomedDev Mar 17, 2024
1d79aa4
Fix infinite loop in event deserialisation
arqunis Mar 19, 2024
4c2db6a
Make Guild::shard_id follow additive features (#2813)
GnomedDev Mar 21, 2024
ae23473
Remove deprecated `Member` and `Guild` methods (#2817)
GnomedDev Mar 26, 2024
296d599
Replace `CacheHttp` with `&Http` in more methods (#2818)
GnomedDev Mar 28, 2024
a1cb9f6
Remove `serde_json::Value` from `Http` (#2806)
GnomedDev Mar 28, 2024
b0d83f1
Add audit log reasons to remaining model methods (#2821)
GnomedDev Mar 29, 2024
43ad709
Remove even more impl CacheHttp (#2822)
GnomedDev Mar 29, 2024
f8a9ac4
Remove `fs` feature for `tokio` by default (#2824)
UserIsntAvailable Mar 30, 2024
39afa8d
Update `reqwest` to v0.12 (#2826)
GnomedDev Apr 1, 2024
66a4f0e
Only include `cache::Settings::time_to_live` if temp cache is enabled…
GnomedDev Apr 3, 2024
9f0c48f
Add resume_gateway_url support (#2832)
GnomedDev Apr 6, 2024
6a9bfec
Correct documentation for `UserId::to_user` (#2809)
jamesbt365 Apr 9, 2024
7280bdd
Use CreateAttachment for EditGuild::banner (#2844)
NotNorom Apr 20, 2024
9c2bca3
Fix AuditLogEntry::user_id (#2846)
GnomedDev Apr 20, 2024
67ccedd
Restore match arm for `Error::Gateway` variant (#2847)
mkrasnitski Apr 22, 2024
9fdeb9d
Remove multiple event handler support (#2849)
GnomedDev Apr 24, 2024
9897fe8
Use RwLock for active collectors collection (#2851)
TheCataliasTNT2k Apr 26, 2024
1a54e41
Provide old presence data from the cache on presence update (#2852)
jamesbt365 Apr 28, 2024
a9b1c41
Allow filtering events before they are dispatched (#2853)
TheCataliasTNT2k Apr 28, 2024
86975b8
Remove permission checks (#2855)
jamesbt365 May 1, 2024
bd79df4
Implement ToArrayString for Mention (#2857)
GnomedDev May 7, 2024
a211ac3
Add PartialGuild::greater_member_hierarchy + member_highest_role (#2856)
cheesycod May 8, 2024
85b3887
Remove recently deprecated items
GnomedDev May 23, 2024
09d546d
Update bool_to_bitflags to fix compilation without unstable
GnomedDev May 14, 2024
7df328c
Remove RUSTFLAGS from .cargo/config.toml (#2875)
jamesbt365 May 23, 2024
006b85b
Remove deprecated link_ensured method (#2898)
GnomedDev Jun 10, 2024
d1be666
Add GuildId param to ChannelId::to_channel (#2895)
GnomedDev Jun 16, 2024
ebee498
Clean up `Message::reply` (#2897)
GnomedDev Jun 16, 2024
c2b0deb
Use `ArrayString` in more places via `aformat!` (#2902)
GnomedDev Jun 22, 2024
00f2478
Bump MSRV to Rust 1.79 (#2916)
mkrasnitski Jul 11, 2024
e9ba3f4
Remove deprecated `CreateInteractionResponse::PremiumRequired` varian…
mkrasnitski Aug 5, 2024
fface81
Add `OAuth2Token`, `OAuth2TokenRevocation`, and `OAuth2AuthorizationC…
valentinegb Aug 8, 2024
30a69eb
Allow setting both normal and raw event handlers (#2933)
tazz4843 Aug 16, 2024
223940c
Merge `client` feature/module into `gateway` (#2947)
mkrasnitski Aug 22, 2024
02ad3bf
Remove methods on `ClientBulder` that don't serve a purpose (#2953)
mkrasnitski Aug 23, 2024
d3cda17
Fix and make `edit_role_position` plural (#2954)
mkrasnitski Aug 23, 2024
1b2fe03
Fix model functions using `SerializeIter` (#2955)
GnomedDev Aug 26, 2024
c710029
Remove `InternalEventHandler` (#2952)
mkrasnitski Aug 26, 2024
2894051
Truncate cache if `max_messages` is set to a lower value at runtime (…
ivinjabraham Aug 30, 2024
116e1e2
Add enum for JSON error codes in `DiscordJsonError` (#2964)
ivinjabraham Sep 1, 2024
869df37
Update to DashMap 6 (#2961)
GnomedDev Sep 9, 2024
fe8dc99
Fix unused warnings when compiling without certain features (#2970)
mkrasnitski Sep 13, 2024
bf697cc
Fix public doctests that are marked `ignore` (#2976)
mkrasnitski Sep 20, 2024
286d68e
Allow embeds to be optional in followup messages (#2968)
TapGhoul Oct 7, 2024
b7f0147
Swap `Vec<T>` for `Cow<[T]>` in `CreateActionRow::Buttons` (#2985)
GnomedDev Oct 7, 2024
68aed50
Remove more `json!` usage (#2986)
GnomedDev Oct 7, 2024
ab88857
Replace outdated secrecy library with own impl (#2997)
GnomedDev Oct 21, 2024
b21ce69
Check for lints which change public API (#2999)
GnomedDev Oct 21, 2024
4e435d2
Stop using serde_json::Value in AutocompleteChoice::value (#3000)
GnomedDev Oct 21, 2024
89b668e
feat: Make FullEvent serializable (#3010)
cheesycod Oct 31, 2024
53bfaa9
Add `Context::data_ref` (#3017)
GnomedDev Nov 6, 2024
0969988
Delete passthrough methods (#3023)
GnomedDev Nov 11, 2024
19c89d1
Swap CreateAttachment::data to Bytes (#3016)
GnomedDev Nov 11, 2024
8afb869
Add `EditCommand` builder (#3028)
mkrasnitski Nov 12, 2024
12e6374
Remove deprecated GuildChannel::permissions_for_user (#3033)
GnomedDev Nov 13, 2024
4558ab2
Improve some docs (#3027)
mkrasnitski Nov 13, 2024
b70b905
Add config for the shard start wait time (#3031)
cheesycod Nov 13, 2024
a2b30f3
Remove Option around Interaction::app_permissions (#3034)
GnomedDev Nov 13, 2024
d99e4ad
Remove deprecated permissions methods (#3042)
GnomedDev Nov 16, 2024
32ebae2
Update `tokio-tungstenite` dependency to 0.24 (#3048)
DPlayer234 Nov 18, 2024
3324515
Perform some misc TODO cleanups (#3050)
GnomedDev Nov 18, 2024
e00bdc3
Transport compression support (#3036)
fgardt Nov 18, 2024
b93c1b5
Get rid of redundant status argument in Http::wind (#3049)
GnomedDev Nov 18, 2024
ca54db7
Perform some minor cleanups (#3051)
mkrasnitski Nov 19, 2024
019d24d
Improve token semantics and clean up gateway feature gates (#3052)
mkrasnitski Nov 22, 2024
7c19234
Add Token to serenity::all (#3054)
GnomedDev Nov 22, 2024
b6abcc1
Use correct token prefix after parsing
arqunis Nov 23, 2024
87f6039
Add guild_id to ReactionRemoveAll (#3058)
jamesbt365 Nov 25, 2024
885bd06
Bump the discriminant of audit_log::Action to u16 (#3062)
GnomedDev Nov 25, 2024
6286c18
Fix transport compression feature & add CI tests (#3067)
fgardt Nov 26, 2024
2ba1184
Factor out collector methods on models into traits (#3055)
mkrasnitski Nov 27, 2024
26fc4b2
Remove unused `json.rs` file (#3071)
mkrasnitski Dec 2, 2024
f7daa0f
Fix clippy warning on next (#3078)
mkrasnitski Dec 8, 2024
7e90b9d
Add a function for parsing a channel ID from a channel URL (#3075)
TheCataliasTNT2k Dec 8, 2024
18d9582
Fix clippy warning (#3081)
mkrasnitski Dec 9, 2024
3e26b47
add support for edit_current_application endpoint
ivinjabraham Nov 13, 2024
a74aa1c
update current application object struct
ivinjabraham Nov 15, 2024
1b63edf
add builder for edit_current_application_info endpoint
ivinjabraham Nov 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .cargo/config.toml

This file was deleted.

2 changes: 0 additions & 2 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
ci:
- .github/**/*
command_attr:
- command_attr/**/*
examples:
- examples/**/*
builder:
Expand Down
62 changes: 29 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: CI
on: [push, pull_request]

env:
rust_min: 1.74.0
rust_nightly: nightly-2024-03-09
rust_min: 1.82.0
rust_nightly: nightly-2024-11-01

jobs:
test:
Expand All @@ -26,7 +26,9 @@ jobs:
- no cache
- no gateway
- unstable Discord API features
- simd-json
- zlib compression
- zstd compression
- zlib and zstd compression

include:
- name: beta
Expand All @@ -38,22 +40,26 @@ jobs:
- name: no default features
features: " "
- name: no cache
features: builder client framework gateway model http standard_framework utils rustls_backend
- name: simd-json
features: default_no_backend rustls_backend simd_json
features: framework rustls_backend
- name: no gateway
features: model http rustls_backend
features: model rustls_backend
- name: chrono
features: chrono
- name: unstable API + typesize
features: default unstable_discord_api typesize
features: default unstable typesize
dont-test: true
- name: builder without model
features: builder
dont-test: true
- name: unstable Discord API (no default features)
features: unstable_discord_api
features: unstable
dont-test: true
- name: zlib compression
features: default transport_compression_zlib
- name: zstd compression
features: default transport_compression_zstd
- name: zlib and zstd compression
features: default transport_compression_zlib transport_compression_zstd

steps:
- name: Checkout sources
Expand Down Expand Up @@ -131,9 +137,6 @@ jobs:
- name: Cache
uses: Swatinem/rust-cache@v2

- name: Remove cargo build config
run: rm .cargo/config.toml

- name: Build
run: cargo build

Expand Down Expand Up @@ -210,8 +213,7 @@ jobs:

- name: Build docs
run: |
cargo doc --no-deps --features collector,voice,unstable_discord_api
cargo doc --no-deps -p command_attr
cargo doc --no-deps --features full,unstable
env:
RUSTDOCFLAGS: -D rustdoc::broken_intra_doc_links

Expand Down Expand Up @@ -241,32 +243,26 @@ jobs:
- name: 'Check example 4'
run: cargo check -p e04_message_builder
- name: 'Check example 5'
run: cargo check -p e05_command_framework
run: cargo check -p e05_sample_bot_structure
- name: 'Check example 6'
run: cargo check -p e06_sample_bot_structure
run: cargo check -p e06_env_logging
- name: 'Check example 7'
run: cargo check -p e07_env_logging
run: cargo check -p e07_shard_manager
- name: 'Check example 8'
run: cargo check -p e08_shard_manager
- name: 'Check example 9'
run: cargo check -p e09_create_message_builder
run: cargo check -p e08_create_message_builder
- name: 'Check example 09'
run: cargo check -p e09_collectors
- name: 'Check example 10'
run: cargo check -p e10_collectors
run: cargo check -p e10_gateway_intents
- name: 'Check example 11'
run: cargo check -p e11_gateway_intents
run: cargo check -p e11_global_data
- name: 'Check example 12'
run: cargo check -p e12_global_data
run: cargo check -p e12_parallel_loops
- name: 'Check example 13'
run: cargo check -p e13_parallel_loops
run: cargo check -p e13_sqlite_database
- name: 'Check example 14'
run: cargo check -p e14_slash_commands
run: cargo check -p e14_message_components
- name: 'Check example 15'
run: cargo check -p e15_simple_dashboard
run: cargo check -p e15_webhook
- name: 'Check example 16'
run: cargo check -p e16_sqlite_database
- name: 'Check example 17'
run: cargo check -p e17_message_components
- name: 'Check example 18'
run: cargo check -p e18_webhook
- name: 'Check example 19'
run: cargo check -p e19_interactions_endpoint
run: cargo check -p e16_interactions_endpoint
1 change: 0 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ jobs:
RUSTDOCFLAGS: --cfg docsrs -D warnings
run: |
cargo doc --no-deps --features full
cargo doc --no-deps -p command_attr

- name: Prepare docs
shell: bash -e -O extglob {0}
Expand Down
7 changes: 3 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,9 @@ your code.

## Unsafe

Code that defines or uses `unsafe` functions must be reasoned with comments.
`unsafe` code can pose a potential for undefined behaviour related bugs and other
kinds of bugs to sprout if misused, weakening security. If you commit code containing
`unsafe`, you should confirm that its usage is necessary and correct.
Unsafe code is forbidden, and safe alternatives must be found. This can be mitigated by using
a third party crate to offload the burden of justifying the unsafe code, or finding a safe
alternative.

# Comment / Documentation style

Expand Down
85 changes: 41 additions & 44 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,49 +24,51 @@ repository = "https://github.com/serenity-rs/serenity.git"
keywords = ["discord", "api"]
license = "ISC"
edition = "2021"
rust-version = "1.74"
rust-version = "1.82"

[dependencies]
# Required dependencies
bitflags = "2.4.2"
serde_json = "1.0.108"
async-trait = "0.1.74"
tracing = { version = "0.1.40", features = ["log"] }
serde = { version = "1.0.192", features = ["derive"] }
serde = { version = "1.0.192", features = ["derive", "rc"] }
url = { version = "2.4.1", features = ["serde"] }
tokio = { version = "1.34.0", features = ["fs", "macros", "rt", "sync", "time", "io-util"] }
tokio = { version = "1.34.0", features = ["macros", "rt", "sync", "time", "io-util"] }
futures = { version = "0.3.29", default-features = false, features = ["std"] }
dep_time = { version = "0.3.36", package = "time", features = ["formatting", "parsing", "serde-well-known"] }
base64 = { version = "0.22.0" }
secrecy = { version = "0.8.0", features = ["serde"] }
zeroize = { version = "1.7" } # Not used in serenity, but bumps the minimal version from secrecy
arrayvec = { version = "0.7.4", features = ["serde"] }
serde_cow = { version = "0.1.0" }
small-fixed-array = { version = "0.4", features = ["serde"] }
bool_to_bitflags = { version = "0.1.2" }
nonmax = { version = "0.5.5", features = ["serde"] }
strum = { version = "0.26", features = ["derive"] }
to-arraystring = "0.2.0"
extract_map = { version = "0.1.0", features = ["serde", "iter_mut"] }
aformat = "0.1.3"
bytes = "1.5.0"
# Optional dependencies
fxhash = { version = "0.2.1", optional = true }
simd-json = { version = "0.13.4", optional = true }
uwl = { version = "0.6.0", optional = true }
levenshtein = { version = "1.0.5", optional = true }
chrono = { version = "0.4.31", default-features = false, features = ["clock", "serde"], optional = true }
flate2 = { version = "1.0.28", optional = true }
reqwest = { version = "0.11.22", default-features = false, features = ["multipart", "stream"], optional = true }
static_assertions = { version = "1.1.0", optional = true }
tokio-tungstenite = { version = "0.21.0", optional = true }
typemap_rev = { version = "0.3.0", optional = true }
bytes = { version = "1.5.0", optional = true }
zstd-safe = { version = "7.2.1", optional = true }
reqwest = { version = "0.12.2", default-features = false, features = ["multipart", "stream", "json"], optional = true }
tokio-tungstenite = { version = "0.24.0", features = ["url"], optional = true }
percent-encoding = { version = "2.3.0", optional = true }
mini-moka = { version = "0.10.2", optional = true }
mime_guess = { version = "2.0.4", optional = true }
dashmap = { version = "5.5.3", features = ["serde"], optional = true }
parking_lot = { version = "0.12.1", optional = true }
dashmap = { version = "6.1.0", features = ["serde"], optional = true }
parking_lot = { version = "0.12.1"}
ed25519-dalek = { version = "2.0.0", optional = true }
typesize = { version = "0.1.2", optional = true, features = ["url", "time", "serde_json", "secrecy", "dashmap", "parking_lot", "details"] }
typesize = { version = "0.1.6", optional = true, features = ["url", "time", "serde_json", "secrecy", "parking_lot", "nonmax", "extract_map_01"] }
# serde feature only allows for serialisation,
# Serenity workspace crates
command_attr = { version = "0.5.3", path = "./command_attr", optional = true }
serenity-voice-model = { version = "0.2.0", path = "./voice-model", optional = true }

[dev-dependencies.http_crate]
version = "0.2.11"
version = "1.1.0"
package = "http"

[features]
Expand All @@ -76,49 +78,44 @@ default_native_tls = ["default_no_backend", "native_tls_backend"]

# Serenity requires a backend, this picks all default features without a backend.
default_no_backend = [
"builder",
"cache",
"chrono",
"client",
"framework",
"gateway",
"model",
"http",
"standard_framework",
"utils",
"transport_compression_zlib",
"transport_compression_zstd",
]

# Enables builder structs to configure Discord HTTP requests. Without this feature, you have to
# construct JSON manually at some places.
builder = []
builder = ["tokio/fs"]
# Enables the cache, which stores the data received from Discord gateway to provide access to
# complete guild data, channels, users and more without needing HTTP requests.
cache = ["fxhash", "dashmap", "parking_lot"]
cache = ["fxhash", "dashmap"]
# Enables collectors, a utility feature that lets you await interaction events in code with
# zero setup, without needing to setup an InteractionCreate event listener.
collector = ["gateway", "model"]
# Wraps the gateway and http functionality into a single interface
# TODO: should this require "gateway"?
client = ["http", "typemap_rev"]
collector = ["gateway"]
# Enables the Framework trait which is an abstraction for old-style text commands.
framework = ["client", "model", "utils"]
framework = ["gateway"]
# Enables gateway support, which allows bots to listen for Discord events.
gateway = ["flate2"]
gateway = ["model", "flate2"]
# Enables HTTP, which enables bots to execute actions on Discord.
http = ["mime_guess", "percent-encoding"]
http = ["dashmap", "mime_guess", "percent-encoding"]
# Enables wrapper methods around HTTP requests on model types.
# Requires "builder" to configure the requests and "http" to execute them.
# Note: the model type definitions themselves are always active, regardless of this feature.
# TODO: remove dependeny on utils feature
model = ["builder", "http", "utils"]
voice_model = ["serenity-voice-model"]
standard_framework = ["framework", "uwl", "levenshtein", "command_attr", "static_assertions", "parking_lot"]
# Enables zlib-stream transport compression of incoming gateway events.
transport_compression_zlib = ["flate2", "gateway"]
# Enables zstd-stream transport compression of incoming gateway events.
transport_compression_zstd = ["zstd-safe", "gateway"]
# Enables support for Discord API functionality that's not stable yet, as well as serenity APIs that
# are allowed to change even in semver non-breaking updates.
unstable_discord_api = []
unstable = []
# Enables some utility functions that can be useful for bot creators.
utils = []
voice = ["client", "model"]
voice = ["gateway"]
# Enables unstable tokio features to give explicit names to internally spawned tokio tasks
tokio_task_builder = ["tokio/tracing"]
interactions_endpoint = ["ed25519-dalek"]
Expand All @@ -127,33 +124,33 @@ chrono = ["dep:chrono", "typesize?/chrono"]

# This enables all parts of the serenity codebase
# (Note: all feature-gated APIs to be documented should have their features listed here!)
full = ["default", "collector", "unstable_discord_api", "voice", "voice_model", "interactions_endpoint"]

# Enables simd accelerated parsing.
simd_json = ["simd-json", "typesize?/simd_json"]
#
# Unstable functionality should be gated under the `unstable` feature.
full = ["default", "collector", "voice", "voice_model", "interactions_endpoint"]

# Enables temporary caching in functions that retrieve data via the HTTP API.
temp_cache = ["cache", "mini-moka", "typesize?/mini_moka"]

# Removed feature (https://github.com/serenity-rs/serenity/pull/2246)
absolute_ratelimits = []
typesize = ["dep:typesize", "dashmap/typesize", "small-fixed-array/typesize", "bool_to_bitflags/typesize"]

# Enables compile-time heavy instrument macros from tracing
tracing_instrument = ["tracing/attributes"]

# Backends to pick from:
# - Rustls Backends
rustls_backend = [
"reqwest/rustls-tls",
"tokio-tungstenite/rustls-tls-webpki-roots",
"bytes",
]

# - Native TLS Backends
native_tls_backend = [
"reqwest/native-tls",
"tokio-tungstenite/native-tls",
"bytes",
]


[package.metadata.docs.rs]
features = ["full"]
rustdoc-args = ["--cfg", "docsrs"]

Loading
Loading