bitfl0wer
050be7b142
Add modify guild member profile route
2023-08-25 17:11:00 +02:00
bitfl0wer
29e0b0e90c
Add modify_current_member route
2023-08-25 16:54:41 +02:00
bitfl0wer
b1c352957e
Add modify_member route
2023-08-25 16:47:28 +02:00
bitfl0wer
ae0ca42b7a
Add some more routes
2023-08-25 01:35:57 +02:00
bitfl0wer
87fcf2edf1
Remove unneeded function
2023-08-25 01:35:49 +02:00
bitfl0wer
9cb8b29487
Merge branch 'main' into guild-routes
2023-08-25 01:11:28 +02:00
bitfl0wer
6106bdf1cb
Start refactoring ChorusRequest to ChorusRequest::new()
2023-08-25 00:02:26 +02:00
bitfl0wer
dd20cb6d9b
start adding auditlogreason to routes that take it
2023-08-24 22:30:13 +02:00
bitfl0wer
0cb2bb6883
Create ChorusRequest-builder function
2023-08-24 22:29:26 +02:00
bitfl0wer
f33016fae5
Change UserMeta to ChorusUser
2023-08-24 21:46:02 +02:00
bitfl0wer
c4a06de564
Merge branch 'main' into guild-routes
2023-08-24 21:41:22 +02:00
bitfl0wer
51ba271a63
Change `UserMeta` to `ChorusUser`
2023-08-24 21:09:23 +02:00
bitfl0wer
1505ce9c67
Change `UserMeta` to `ChorusUser`
2023-08-24 21:06:28 +02:00
bitfl0wer
5324116b0f
add get guild preview route
2023-08-24 21:05:39 +02:00
bitfl0wer
895dea3780
Add get user guilds endpoint
2023-08-23 00:08:43 +02:00
bitfl0wer
3006a6d860
Fix clippy lint
2023-08-22 22:40:36 +02:00
bitfl0wer
d6de981254
Add acknowledge_pinned endpoint
2023-08-22 22:34:37 +02:00
bitfl0wer
10109211a6
add delete and bulk_delete endpoints
2023-08-22 22:32:48 +02:00
bitfl0wer
e8a02e57f8
Add Modify Message endpoint
2023-08-22 22:27:09 +02:00
bitfl0wer
c9562457d2
Add Hide from guild feed endpoint
2023-08-22 22:16:07 +02:00
bitfl0wer
41bac67d67
Add crosspost endpoint
2023-08-22 22:10:12 +02:00
bitfl0wer
c11ab6f727
Add message acknowledge endpoint
2023-08-22 22:06:19 +02:00
bitfl0wer
2352034b82
Create Greet Message
2023-08-22 21:55:24 +02:00
bitfl0wer
3947b04183
Add message: get
2023-08-22 21:27:31 +02:00
bitfl0wer
8cf1f84d73
Closes #269 , #268 , #270
2023-08-22 20:09:44 +02:00
bitfl0wer
9302fbd42a
Correctify search_message
...
Fixes Search Messages #258
2023-08-22 19:23:27 +02:00
bitfl0wer
ad0d4752f7
Move search_messages to Channel impl
2023-08-22 17:56:13 +02:00
bitfl0wer
a22c4c901e
Implement Default for MessageSearchQuery
2023-08-22 17:55:53 +02:00
bitfl0wer
dfde96d791
Make channel_type in ChannelCreateSchema of type enum "ChannelType"
2023-08-22 17:55:29 +02:00
bitfl0wer
19335bf83b
Add some missing derives
2023-08-22 14:01:17 +02:00
bitfl0wer
1696cc610d
Add MessageSearchEndpoint Enum and MessageSearchQuery schema struct
2023-08-22 14:01:03 +02:00
bitfl0wer
8143514b6b
Add search() and search_messages()
2023-08-22 14:00:39 +02:00
bitfl0wer
c542714f96
Modify Guild Channel Positions
...
Fixes #229
2023-08-22 01:11:22 +02:00
bitfl0wer
a606a31645
Fix deserialize error
2023-08-20 23:24:30 +02:00
bitfl0wer
21b89107a2
Add Guild::modify();
2023-08-20 23:13:34 +02:00
bitfl0wer
79fd36abb4
Complete GuildModifySchema
2023-08-20 22:52:06 +02:00
bitfl0wer
21e396c8b6
Add GuildModifySchema
2023-08-20 22:46:58 +02:00
bitfl0wer
8b09d52ac8
Add Types
2023-08-20 22:46:44 +02:00
bitfl0wer
7b24fb5cde
Add create_ban
...
Closes "Create Guild Ban #299"
2023-08-20 18:49:10 +02:00
bitfl0wer
d27d7d9796
Create GuildBanCreateSchema, clean up GuildCreateSchema
2023-08-20 18:48:07 +02:00
bitfl0wer
1ad8055406
Start implementing some UpdateMessages
2023-08-19 01:13:07 +02:00
bitfl0wer
d7bd96d039
Handle id().is_none() cases
2023-08-18 23:40:01 +02:00
bitfl0wer
86b1149565
Make id(&self) return Option<Snowflake>
2023-08-18 23:34:00 +02:00
bitfl0wer
1144b77fbb
Fix typo
2023-08-18 21:29:34 +02:00
bitfl0wer
4c5a2ca515
Remove prints
2023-08-18 20:20:58 +02:00
bitfl0wer
d085e763d5
Add Arc<RwLock<T>>
2023-08-18 20:20:53 +02:00
bitfl0wer
a8094da49a
Add Todo to every event which needs UpdateMessage
2023-08-18 20:20:25 +02:00
kozabrada123
c9cd936628
Minor gateway updates ( #188 )
...
* Fix TYPING_START not existing
* Fix spacebar READY deserialization error
2023-08-18 14:27:39 +02:00
kozabrada123
9ff3fc3efa
Add content type specification
2023-08-18 11:41:06 +02:00
bitfl0wer
0ed417dae6
Change type of Channel::last_pin_timestamp
2023-08-17 22:45:42 +02:00
bitfl0wer
9cdc807651
Change bearer_auth to header("Authorization"
2023-08-17 22:26:07 +02:00
bitfl0wer
f047802350
Remove comment
2023-08-17 18:26:34 +02:00
bitfl0wer
ad4404fb43
Remove prints
2023-08-17 18:26:14 +02:00
bitfl0wer
b768d0f444
Call watch_whole either way
2023-08-17 18:26:06 +02:00
bitfl0wer
ebe307aa33
Remove debug prints
2023-08-16 22:04:43 +02:00
bitfl0wer
ef7261adf9
I think i found out why shit no work
2023-08-16 22:04:36 +02:00
bitfl0wer
99bdf819a8
Make store pub(crate), other adjustments
2023-08-16 22:04:07 +02:00
bitfl0wer
b1d8e40ddd
Make trait Debug
2023-08-16 21:26:27 +02:00
bitfl0wer
cc44e77bcc
Remove tokio watch channels
2023-08-16 21:26:19 +02:00
bitfl0wer
7147ac5daf
Rename update to modify
2023-08-16 14:05:51 +02:00
bitfl0wer
9559b15b8a
Make Role Clone
2023-08-16 14:05:44 +02:00
bitfl0wer
8a925631ee
Add GuildRoleCreate and -Update
2023-08-16 14:05:37 +02:00
bitfl0wer
eac86b18cd
Rename functions, add observe_and_into_inner
2023-08-16 01:11:26 +02:00
bitfl0wer
497fd56ab0
Revert "Give `GatewayHandle` and `Gateway` common trait to call `watch_whole()` or observe() from a `Gateway`"
...
This reverts commit 8e2e0d137d
.
2023-08-16 00:21:18 +02:00
bitfl0wer
8e2e0d137d
Give `GatewayHandle` and `Gateway` common trait to call `watch_whole()` or observe() from a `Gateway`
2023-08-16 00:18:32 +02:00
bitfl0wer
7fdbe38843
Add back set_json. No idea when it disappeared?
2023-08-15 22:19:47 +02:00
bitfl0wer
9dc86615a4
Merge branch 'feature/update-message-all-events' into enhancement/improved-auto-updating-structs
2023-08-15 20:53:56 +02:00
bitfl0wer
475d285715
Add `Composite` derive to all entities which require it
2023-08-15 20:19:52 +02:00
bitfl0wer
170b3ca8bd
Add `Composite<T>` bound to automatically call `watch_whole()` on caller object.
2023-08-15 20:19:16 +02:00
bitfl0wer
546f925e06
Remove `Send` bound
2023-08-15 20:18:11 +02:00
bitfl0wer
86e8edde27
Make trait pub
2023-08-15 17:54:36 +02:00
bitfl0wer
a1a99aff8d
Add Composite to some types
2023-08-15 17:38:53 +02:00
bitfl0wer
d30542c783
Implement trait methods
2023-08-15 16:58:20 +02:00
bitfl0wer
69c8b8d076
Try out new macro
2023-08-15 16:58:06 +02:00
bitfl0wer
ec20258abe
Add observe_and_get method
2023-08-15 16:57:54 +02:00
bitfl0wer
f9b9efffa4
todo
2023-08-15 12:14:03 +02:00
bitfl0wer
05baec3820
derive Updateable for Guild
2023-08-14 17:18:53 +02:00
bitfl0wer
ab21dbb90a
Add Composite trait
2023-08-14 17:18:44 +02:00
bitfl0wer
71b1839250
Remove unused import
2023-08-14 00:04:58 +02:00
bitfl0wer
68868e7d35
Remove stupid comment from me
2023-08-14 00:04:53 +02:00
bitfl0wer
f0f47315a1
Rename get to get_user
2023-08-14 00:02:30 +02:00
bitfl0wer
888a86903b
Change UserMeta::get() to take self instead of Self
2023-08-14 00:02:03 +02:00
bitfl0wer
9ce575944c
Change UpdateMessage<T> to write into RwLock
2023-08-13 16:46:57 +02:00
bitfl0wer
8ca4ba6e50
Change observe() again, pass Arc<RwLock<T>> into message.update(), Add comment explaining closure
2023-08-13 16:46:21 +02:00
bitfl0wer
f5d74c57a4
Remove channel_id argument from modify. WHY WAS IT THERE TO BEGIN WITH LOL
2023-08-13 15:54:25 +02:00
bitfl0wer
041ee223c3
Moddify observe to still store T internally
2023-08-13 15:52:16 +02:00
fowb
bca1092dd0
Add fixme comment
2023-08-12 22:40:07 +02:00
fowb
d28f19d8ca
Change observe() to take Arc<RwLock<T>>
2023-08-12 19:47:11 +02:00
fowb
b672dd221c
Change Mutex<T> to RwLock<T>
2023-08-12 19:31:31 +02:00
kozabrada123
5faee2cbd1
Fix trailing /s ( #180 )
2023-08-12 16:48:33 +02:00
kozabrada123
855a4278df
Minor snowflake updates ( #179 )
...
* Make snowflake fully public
* Simple into for snowflake
2023-08-07 20:34:58 +02:00
bitfl0wer
207e67396a
Fix unwrap panic on trying to access rate limits
2023-08-07 14:56:10 +02:00
kozabrada123
6d5a1ad295
Minor improvements to message events ( #177 )
2023-08-07 14:15:23 +02:00
bitfl0wer
b2a3294b5d
update mutex to rwlock
2023-08-04 20:08:49 +02:00
bitfl0wer
38a97fc37a
Change Arc<Mutex<T>> components to Arc<RwLock<T>>
2023-08-04 17:57:03 +02:00
bitfl0wer
1eb581c049
Add note about Gateway: store
2023-08-04 16:54:56 +02:00
bitfl0wer
9fe55559c7
Add note about GatewayHandle: `store`
2023-08-04 16:54:03 +02:00
bitfl0wer
1154cc98a1
Make message mut
2023-08-04 16:46:22 +02:00
bitfl0wer
043aaf5e59
Add clone bound to T
2023-08-04 16:46:15 +02:00
bitfl0wer
adb5b47bbd
Fix channel.rs
2023-08-04 16:41:57 +02:00
bitfl0wer
9fec38142c
Add update_object
2023-08-04 16:41:51 +02:00
kozabrada123
4d0f27a668
Re-add derives to structs where possible
2023-08-04 15:33:46 +02:00
bitfl0wer
578b4c2fa9
Integrate component behaviour everywhere
2023-08-04 11:19:23 +02:00
bitfl0wer
96213aaf24
Make components be Arc<Mutex<T>>
2023-08-02 23:08:53 +02:00
bitfl0wer
2bfdf4e3e9
Add PartialEq, Eq, Hash to Enums
2023-08-02 20:23:50 +02:00
bitfl0wer
5d66ad83f2
Start component-izing entities, remove PartialEq wherever needed (because PartialEq isn't implemented for Mutex)
2023-08-02 20:18:16 +02:00
kozabrada123
6cbde1a04b
Fix missing references to the best of my ability
2023-07-31 10:28:18 +02:00
kozabrada123
9f39943b15
Goof
2023-07-31 10:07:56 +02:00
kozabrada123
4e4e279333
Docs
2023-07-31 10:01:25 +02:00
kozabrada123
abb3c7e0e6
Merge branch 'main' into fix/doc-improvements
2023-07-31 09:13:33 +02:00
Flori
18faea5aad
Remove newline
2023-07-30 20:35:02 +02:00
Vivien
6ec26feffb
update of reaction struct
2023-07-30 20:27:13 +02:00
Vivien
909f1c0285
change signed to unsigned integer
2023-07-30 20:23:12 +02:00
kozabrada123
b99bcef1f6
Guilds + Channels
2023-07-30 09:04:31 +02:00
kozabrada123
51679e773c
Fix broken links
2023-07-30 08:31:12 +02:00
kozabrada123
499faefa51
Documemtaiom
2023-07-30 08:26:26 +02:00
kozabrada123
b897e44cca
Document a small bit of attachment
2023-07-29 18:12:57 +02:00
kozabrada123
1893dfe0f9
Permissions with code blocks
2023-07-29 18:12:57 +02:00
kozabrada123
49801bef10
Update src/types/utils/rights.rs
...
Co-authored-by: SpecificProtagonist <specificprotagonist@posteo.org>
2023-07-29 16:07:06 +00:00
kozabrada123
8954fd2ae5
Update src/types/utils/snowflake.rs
...
Co-authored-by: SpecificProtagonist <specificprotagonist@posteo.org>
2023-07-29 16:06:49 +00:00
kozabrada123
5ed24eea62
Update src/types/utils/rights.rs
...
Co-authored-by: SpecificProtagonist <specificprotagonist@posteo.org>
2023-07-29 16:06:35 +00:00
kozabrada123
d4048d8845
Update src/types/utils/rights.rs
...
Co-authored-by: SpecificProtagonist <specificprotagonist@posteo.org>
2023-07-29 16:05:27 +00:00
kozabrada123
5d49e72461
Update src/types/utils/rights.rs
...
Co-authored-by: SpecificProtagonist <specificprotagonist@posteo.org>
2023-07-29 16:04:49 +00:00
kozabrada123
b4b9f87520
Capitalise docs
...
Co-authored-by: SpecificProtagonist <specificprotagonist@posteo.org>
2023-07-29 16:04:08 +00:00
kozabrada123
abcdd5e128
Forgot this since had the lint on my local copy
2023-07-29 11:45:25 +02:00
kozabrada123
9c4136644b
Document some flags
2023-07-29 11:26:10 +02:00
kozabrada123
a4f59fcdf4
Minor doc changes
2023-07-29 11:26:00 +02:00
kozabrada123
3058025e9d
Document rights
2023-07-29 11:00:28 +02:00
kozabrada123
787da3092c
Moar docs
2023-07-29 10:23:04 +02:00
kozabrada123
a2ddafb6a1
Remove the todos from the last commit
2023-07-28 18:57:35 +02:00
kozabrada123
1f9efa98e3
Better docs
2023-07-28 18:45:40 +02:00
kozabrada123
577c8a2d71
Merge branch 'main' into fix/doc-improvements
2023-07-28 18:21:20 +02:00
kozabrada123
b2d125104a
Same allow as for voice as normal gateway
2023-07-28 18:04:16 +02:00
kozabrada123
5940af777c
Merge with main, but better this time
2023-07-28 18:01:52 +02:00
kozabrada123
89d4348498
Merge with main
2023-07-28 17:33:23 +02:00
Flori
fa7dd4b92b
Improve auto updating structs usage ( #168 )
...
* Add `GatewayHandle` to `UserMeta`
* Make user::shell async due to gateway add
2023-07-24 19:13:53 +02:00
SpecificProtagonist
24450571de
derive Updateable ( #167 )
2023-07-22 11:20:31 +02:00
Flori
38f0659ec9
Auto updating structs ( #163 )
...
* Gateway fields don't need to be pub
* Add store to Gateway
* Add UpdateMessage trait
* Proof of concept: impl UpdateMessage for Channel
* Start working on auto updating structs
* Send entity updates over watch channel
* Add id to UpdateMessage
* Create trait Updateable
* Add documentation
* add gateway test
* Complete test
* Impl UpdateMessage::update() for ChannelUpdate
* Impl UpdateMessage::update() for ChannelUpdate
Co-authored by: SpecificProtagonist <specificprotagonist@posteo.org>
* make channel::modify no longer mutate Channel
* change modify call
* remove unused imports
* Allow dead code with TODO to remove it
* fix channel::modify test
* Update src/gateway.rs
Co-authored-by: SpecificProtagonist <vincentjunge@posteo.net>
---------
Co-authored-by: SpecificProtagonist <vincentjunge@posteo.net>
2023-07-21 15:35:31 +02:00
kozabrada123
260dd320a8
Merge stuff
2023-07-21 14:10:50 +02:00
SpecificProtagonist
f97d26bc6c
Fix gateway heartbeat blocking ( #162 )
...
fix gateway heartbeat blocking
2023-07-21 13:59:40 +02:00
Flori
b5a8562d89
Fix: message file attachment duplication ( #159 )
...
* make send() take ownership of MessageSendSchema
* Remove message file attachment duplication
* Remove superfluous docstrings
2023-07-17 23:26:25 +02:00
Flori
7df6cb183f
Join/Leave Guilds, (Group) DMs and minor improvements ( #157 )
...
## Summary:
**Added:**
- Schemas `PrivateChannelCreateSchema` `ChannelInviteCreateSchema`, `AddChannelRecipientSchema` recursively (including schemas which were needed to create these schemas)
- Methods `create_private_channel`, `leave_guild`, `accept_invite`, `create_user_invite`, `create_guild_invite`, `add_channel_recipient`, `remove_channel_recipient`
- Integration tests for the functionality covered by implementing #45
- Documentation in some places where I noticed it would be useful to have some
- `create_user` method in `/src/tests`: Cuts down on test boilerplate needed to create an addition test user
**Changed:**
- `.gitignore`
- Added `.DS_store` files to gitignore (some weird macos files), removed Cargo.lock, as Cargo.lock should be included for libraries
- Added a lot of default trait derives like Clone, Copy, PartialEq, Eq, Ord, PartialOrd to structs and enums where I saw them missing
- Added missing `teardown()` calls to the integration tests
- Renamed integration test files in `/src/tests` dir to all be plural: `channel.rs` -> `channels.rs`
- Made more fields on `User` type `Option<>`
- All instances in `/src/tests` where a second test user was created using a RegistrationSchema and the register_user method were replaced with the new `create_user` method
- README.md: Marked roadmap fields covered by #45 as implemented
- Changed visibility of `/src/tests/common/mod.rs` methods from `pub` to `pub(crate)`. In hindsight, this was probably not required, haha
**Removed:**
- Unneeded import in`src/types/config/types/guild_configuration.rs`
## Commit log:
* Add .DS_store, remove Cargo.lock
* Create PrivateChannelCreateSchema
* pub use users
* add channels.rs
* create channels.rs
* Add Deserialize/Serialize derives
* Implement create_private_channel
* Add create_dm() test
* Make optional fields on `User` `Option<>`
* Check boxes for implemented features
* Create users/guilds.rs
* Remove unneeded import
* Add UserMeta::leave_guild()
* Create api/invites/mod.rs
* Add debug print to send_request
* Rename tests files
* Create invites.rs
* create invite.rs
* Add documentation
* Implement accept_invite
* Sort fields on Channel alphabetically
* Add invite mod
* Add forgotten teardown() at test end
* change visiblities, add create_user()
* Implement `create_user_invite()`
* start working on invite tests
* Add allow flags
* Fix bad url
* Create CreateChannelInviteSchema and friends
* remove non-implemented test code
* add body to requests
* Add Clone to UserMeta
* More comprehensive error message when running into a deserialization error
* Add arguments documentation to accept_invite
* Add Eq derive to GuildFeaturesList
* Add Eq derive to Emoji
* Add Eq derive to GuildBan
* Add create_accept_invite() test
* Add Default derive to ChannelCreateSchema
* Change create_guild_invite to return GuildInvite
* Dates as chrono::Date(Utc); sort alphabetically
* Add default derives wherever possible
* Implement add_- and remove_channel_recipient
* Create AddChannelRecipientSchema
* replace otheruser regs with bundle.creeate_user()
* Add (disabled) test remove_add_person_from_to_dm()
2023-07-17 19:36:28 +02:00
Flori
bfdf21f57f
Enable saving and loading LimitsConfiguration ( #152 )
...
Impl Serialize, Deserialize for LimitsConfiguration and children
2023-07-14 17:38:54 +02:00
SpecificProtagonist
05d51bd0bc
Deduplicate gateway dispatch event handling ( #148 )
...
deduplicate gateway dispatch event handling
2023-07-11 20:11:13 +02:00
kozabrada123
d3613702bb
Add some docs
2023-07-11 19:54:04 +02:00
kozabrada123
7cdaf35583
Merge branch 'main' into fix/doc-improvements
2023-07-11 19:24:37 +02:00
Zert3x
d5979e0024
Async Observer Trait ( #147 )
2023-07-11 19:20:27 +02:00
kozabrada123
133021a805
Rustdoc warnings + misc changes
2023-07-10 18:06:45 +02:00
kozabrada123
832cb92abc
UrlBundle slightly better docs
2023-07-10 17:22:31 +02:00
kozabrada123
282bc06cff
/* -> ///
2023-07-10 16:59:00 +02:00
Flori
8c9ccdd997
Ratelimiter overhaul ( #144 )
...
* Rename limits and limit to have better names
* Remove empty lines
* Remove handle_request (moved to requestlimiter)
* Start working on new ratelimiter
* Make limits Option, add "limited?" to constructor
* Add missing logic to send_request
* Rename Limits
* Create Ratelimits and Limit Struct
* Define Limit
* Import Ratelimits
* Define get_rate_limits
* Remove unused import
* + check_rate_limits & limits_config_to_ratelimits
* Remove Absolute Limits
These limits are not meant to be tracked anyways.
* add ratelimits is_exhausted
* Add error handling and send request checking
* change limits to option ratelimits
* Add strum
* Change Ratelimits to Hashmap
* Remove ratelimits in favor of hashmap
* Change code from struct to hashmap
* start working on update rate limits
* Remove wrong import
* Rename ChorusLibError to ChorusError
* Documented the chorus errors
* Made error documentation docstring
* Make ReceivedErrorCodeError have error string
* Remove unneeded import
* Match changes in errors.rs
* Improve update_rate_limits and can_send_request
* add ratelimits.to_hash_map()
* use instances' client instead of new client
* add LimitsConfiguration to instance
* improve update_limits, change a method name
* Fix un-updated errors
* Get LimitConfiguration in a sane way
* Move common.rs into ratelimiter::ChorusRequest
* Delete common.rs
* Make instance.rs use overhauled errors
* Refactor to use new Rate limiting implementation
* Refactor to use new Rate limiting implementation
* Refactor to use new Rate limiting implementation
* Refactor to use new Rate limiting implementation
* Refactor to use new Rate limiting implementation
* Refactor to use new Rate limiting implementation
* update ratelimiter implementation across all files
* Fix remaining errors post-refactor
* Changed Enum case to be correct
* Use result
* Re-add missing body to request
* Remove unneeded late initalization
* Change visibility from pub to pub(crate)
I feel like these core methods don't need to be exposed as public API.
* Remove unnecessary import
* Fix clippy warnings
* Add docstring
* Change Error names across all files
* Update Cargo.toml
Strum is not needed
* Update ratelimits.rs
* Update ratelimits.rs
* Bug/discord instance info unavailable (#146 )
* Change text to be more ambigous
* Use default Configuration instead of erroring out
* Emit warning log if instance config cant be gotten
* Remove import
* Update src/instance.rs
Co-authored-by: SpecificProtagonist <specificprotagonist@posteo.org>
* Add missing closing bracket
* Put limits and limits_configuration as one struct
* Derive Hash
* remove import
* rename limits and limits_configuration
* Save clone call
* Change LimitsConfiguration to RateLimits
`LimitsConfiguration` is in no way related to whether the instance has API rate limits enabled or not. Therefore, it has been replaced with what it should have been all along.
* Add ensure_limit_in_map(), add `window` to `Limit`
* Remove unneeded var
* Remove import
* Clean up unneeded things
Dead code warnings have been supressed, but flagged as FIXME so they don't get forgotten. Anyone using tools like TODO Tree in VSCode can still see that they are there, however, they will not be shown as warnings anymore
* Remove nested submodule `limit`
* Add doc comments
* Add more doc comments
* Add some log messages to some methods
---------
Co-authored-by: SpecificProtagonist <specificprotagonist@posteo.org>
2023-07-09 18:38:02 +02:00
kozabrada123
ce359103da
Use log instead of prints
2023-07-01 19:29:50 +02:00
Vincent Junge
2e9d4caee5
require password to log in
2023-06-25 22:34:05 +02:00
Vincent Junge
9ccc08b5e2
remove client side validation
2023-06-25 11:36:37 +02:00
Flori Weber
70aaa238e3
Make ReactionMeta::get() return Vec<PublicUser>
2023-06-23 12:54:08 +02:00
Flori Weber
f6d6daf1d2
Fix stupid multi line comments
2023-06-23 12:18:22 +02:00
kozabrada123
a07d9d7579
Merge branch 'perpetual/gateway-dev' into feature/voice
2023-06-23 09:29:56 +02:00
kozabrada123
3f24cd67f1
Merge branch 'main' into perpetual/gateway-dev
2023-06-23 09:29:27 +02:00
Flori
fe0c09b0e9
Merge pull request #130 from polyphony-chat/refactor/change-channel-modify
...
Refactor/change channel modify
2023-06-22 20:05:15 +02:00
Flori Weber
0aac291a3c
Remove wrongful match statement
2023-06-22 19:54:39 +02:00
Flori
f554244143
Update src/api/channels/channels.rs
...
Co-authored-by: SpecificProtagonist <specificprotagonist@posteo.org>
2023-06-22 19:42:07 +02:00
Flori Weber
1e0783e30e
Make Channel::modify() take &mut self
2023-06-22 18:56:16 +02:00
Vincent Junge
f2709492de
always use Snowflakes in args
2023-06-22 18:55:19 +02:00
kozabrada123
37f6ea91a3
Merge branch 'perpetual/gateway-dev' into feature/voice
2023-06-22 09:14:07 +02:00
kozabrada123
19c1f3923f
Merge branch 'main' into perpetual/gateway-dev
2023-06-22 09:13:37 +02:00
Vincent Junge
4117bcff59
ChorusResult type alias
2023-06-21 21:39:22 +02:00
Vincent Junge
8d7e49f3c2
get channel messages
2023-06-21 14:46:45 +02:00
kozabrada123
30b0cb5296
Merge branch 'main' into feature/webrtc
2023-06-21 14:28:05 +02:00
kozabrada123
04923f7d09
Merge branch 'main' into perpetual/gateway-dev
2023-06-21 14:27:45 +02:00
kozabrada123
5e037121cd
fmt
2023-06-21 14:26:52 +02:00
kozabrada123
9dc37c9469
Attempt an untested voice gateway implementation
2023-06-21 14:26:00 +02:00
kozabrada123
2ef07d965a
Merge branch 'perpetual/gateway-dev' into feature/webrtc
2023-06-21 08:09:15 +02:00
kozabrada123
2d3f23744c
Merge branch 'main' into perpetual/gateway-dev
2023-06-21 08:01:05 +02:00
Flori Weber
e7eee4808e
Change send_request() calls to pass &mut Instance
2023-06-20 22:42:42 +02:00
Flori Weber
2233063d5f
Use Instance.client instead of creating a new one.
2023-06-20 22:42:08 +02:00
Flori Weber
27047ab909
Add reqwest::Client to chorus::Instance.
2023-06-20 22:41:31 +02:00
Flori Weber
3958f049ea
Change to single-line docstring
2023-06-20 22:36:39 +02:00
Flori Weber
0a523d54c1
Multiline docstring to single line docstring
2023-06-20 22:30:42 +02:00
Flori Weber
1fc38b25bf
Merge branch 'main' into refactor/reuse-reqwest-client
2023-06-20 22:21:08 +02:00
Flori Weber
915c9be4ad
Change docstring from multi- to singleline
2023-06-20 22:20:06 +02:00
Flori
6e50292f71
Merge pull request #122 from SpecificProtagonist/winter
...
More consistent use of snowflakes
2023-06-20 22:16:54 +02:00
Vincent Junge
9429bd7772
more consistent use of snowflakes
2023-06-20 22:03:29 +02:00
Flori
9725b165dd
Merge pull request #121 from polyphony-chat/fix/cannot-connect-to-discord
...
Remove unnecessary things
2023-06-20 21:54:53 +02:00
kozabrada123
b4a4e1f5d5
Add more webrtc typings
2023-06-20 19:51:28 +02:00
kozabrada123
cfe4e2c7bb
Merge branch 'main' into perpetual/gateway-dev
2023-06-20 19:12:39 +02:00
kozabrada123
1431aba363
Add Webrtc Identify & Ready
2023-06-20 19:12:21 +02:00
Flori
304cb6076a
Merge pull request #114 from SpecificProtagonist/snowflake
...
Simplify Snowflake
2023-06-20 18:57:25 +02:00
Flori
dcacfacda9
Merge pull request #117 from SpecificProtagonist/gateway-event
...
Simplify GatewayEvent
2023-06-20 18:57:13 +02:00
kozabrada123
b8d7030ab1
Change Option<ChorusLibError> to Result<(), ChorusLibError>
2023-06-20 18:26:30 +02:00
Vincent Junge
04c3ee56e9
simplify GatewayEvent
2023-06-20 16:12:13 +02:00
Vincent Junge
f614e93892
UrlBundle remove getters
2023-06-20 12:29:52 +02:00
Vincent Junge
29fcdfe641
simplyfy Snowflake
2023-06-20 12:21:22 +02:00
Flori Weber
be7b9616c2
Remove unnecessary things
2023-06-20 00:35:46 +02:00
Flori Weber
603c8c8150
apply clippy suggestions
2023-06-19 19:01:18 +02:00
Flori Weber
17223d338a
change post to delete
2023-06-19 18:12:09 +02:00
Flori Weber
06b4f5fb65
Add Eq, PartialEq derives
2023-06-19 18:12:01 +02:00
Vincent Junge
de5fe8aebf
Fix clippy::await_holding_refcell_ref false positives
2023-06-19 16:46:58 +02:00
Flori Weber
b8e8a1c23a
Fix build failing
2023-06-19 16:11:53 +02:00
Vincent Junge
cadf14ba6a
Make MessageSendSchema fields public
2023-06-19 14:21:27 +02:00
Vincent Junge
37de1d7b06
Fix various Clippy lints
2023-06-19 12:35:07 +02:00
Flori Weber
a05241dd8e
Add remove_relationship
2023-06-18 23:10:29 +02:00
Flori Weber
6d8e0aaa39
Remove unneccessary imports
2023-06-18 23:04:25 +02:00
Flori Weber
636cb4c751
Add modify_user_relationship
2023-06-18 23:02:49 +02:00
Flori Weber
6878fd0380
Fix errors not displayed, add InvalidArgumentsErr
2023-06-18 23:01:38 +02:00
Flori Weber
4829845512
Move FriendRequestSchema to schemas
2023-06-18 19:05:09 +02:00
Flori Weber
191dc34933
Create relationship schemes
2023-06-18 19:04:55 +02:00
Flori Weber
0460a67bdd
Change returns, add documentation
2023-06-18 15:39:52 +02:00
Flori Weber
fc6b431ad8
Start implementing get_relationship
2023-06-18 14:00:12 +02:00
Flori Weber
cd303b0fef
Add FriendRequestSendSchema
2023-06-15 19:01:01 +02:00
Flori Weber
e971ed2b49
Implement send_friend_request
2023-06-15 19:00:47 +02:00
Flori Weber
8378c5ccb6
Add get_mutual_relationships
2023-06-14 22:54:14 +02:00
Flori Weber
6312bd3572
Change belongs_to to be borrowed non-mutably
2023-06-14 22:53:56 +02:00
Flori Weber
b56b5f5f12
Format relationships.rs
2023-06-14 22:14:56 +02:00
Flori Weber
2a8a8d75d3
Add relationships.rs
2023-06-14 22:14:48 +02:00
Flori Weber
870d5606a0
Update link reference
2023-06-13 15:23:39 +02:00
Flori Weber
dfec24b8b8
Update relationship.rs types
2023-06-13 15:23:06 +02:00
Flori Weber
bcc4069cea
Create relationships.rs
2023-06-13 14:04:58 +02:00
Flori Weber
c6dcfff6a8
Create relationships.rs
2023-06-13 14:04:39 +02:00
bitfl0wer
8de2d3b5c3
run cargo fix
2023-06-12 18:59:06 +02:00
bitfl0wer
550d6d9265
run cargo fix
2023-06-12 18:58:53 +02:00
bitfl0wer
1aad39ded1
Remove unneccessary variable
2023-06-12 18:55:27 +02:00
bitfl0wer
98a043ab30
Refactor limited requester
...
The requester does not need to be instantiated anymore, which makes things easier to read imo.
2023-06-12 18:51:54 +02:00
Flori Weber
1910649ac4
Refactor users.rs to use api::common
2023-06-11 21:40:03 +02:00
Flori Weber
43e62359ae
Refactor roles.rs to use api::common
2023-06-11 20:04:40 +02:00
Flori Weber
c03c3357fa
Refactor member.rs to use api::common
2023-06-11 19:30:15 +02:00
Flori Weber
3f8724535e
Refactor guilds.rs to use api:common
2023-06-11 19:26:34 +02:00
Flori Weber
f6da3dcacf
Use handle_request_as_option instead
2023-06-11 19:22:28 +02:00
Flori Weber
3a8b6c8629
Introduce handle_request_as_option
2023-06-11 19:22:10 +02:00
Flori Weber
fac9937bdd
Refactor reactions to use api::options
2023-06-11 19:13:38 +02:00
Flori Weber
c479db36fb
Refactor permissions.rs to use api::common
2023-06-11 17:56:29 +02:00
Flori Weber
90ad75ae30
Remove import
2023-06-11 17:51:26 +02:00
Flori Weber
ce004b3863
Refactor Message::send()
2023-06-11 17:49:42 +02:00
Flori Weber
583031e64f
Make some fields Option enum
2023-06-11 17:49:30 +02:00
Flori Weber
59d512cdce
Refactor to use api common, return Message instead
2023-06-11 17:40:44 +02:00
Flori Weber
bf005c44a4
Refactor channels.rs to use api::common
2023-06-11 17:36:04 +02:00
Flori Weber
5d039c3e9b
Add argument to specify which LimitType to use
2023-06-11 17:35:47 +02:00
Flori Weber
9449c4cd4d
Move common request code into common.rs
2023-06-11 17:21:09 +02:00
Flori Weber
ebe8a054e0
Merge branch 'main' into feature/permissions-and-roles
2023-06-11 15:34:43 +02:00
Flori Weber
3f7bf0c912
create common.rs
2023-06-11 15:34:05 +02:00
kozabrada123
dc5e91a784
Reformat and cargo fix
2023-06-11 14:32:37 +02:00
Flori Weber
8b8ea03513
Cargo fix
2023-06-11 13:55:00 +02:00
Flori Weber
41135d037f
Cargo fix
2023-06-11 13:54:54 +02:00
Flori Weber
f585e0ddae
Reformat entire project, optimize imports
2023-06-11 13:52:53 +02:00
Flori Weber
f4e0d520b1
Reformat entire project, optimize imports
2023-06-11 13:52:31 +02:00
kozabrada123
f5bbd3d737
Merge branch 'main' into perpetual/gateway-dev
2023-06-11 09:10:03 +02:00
bitfl0wer
6952f9977f
Implement delete_permission
2023-06-10 22:16:53 +02:00
bitfl0wer
87e70181fb
impl Channel::edit_permissions()
2023-06-10 22:09:53 +02:00
bitfl0wer
48a063838b
Create permissions.rs
2023-06-10 21:51:45 +02:00
Flori Weber
e5aff12f94
"Normalize" RolePositionUpdateSchema
2023-06-10 19:35:57 +02:00
Flori Weber
5b66464ce9
Better error handling in get methods.
2023-06-10 18:50:49 +02:00
Flori Weber
a9b02bad78
Implement RoleObject::get()
2023-06-10 18:48:37 +02:00
Flori Weber
9a6ac33a40
Add RoleObject::update()
2023-06-10 18:42:37 +02:00
kozabrada123
94ec90b924
Implement display for UserStatus
2023-06-10 16:56:50 +02:00
kozabrada123
330a4347d3
turns out UpdatePresence and PresenceUpdate are different events
2023-06-10 16:32:42 +02:00
kozabrada123
57d2d93420
Change observer update ref to &mut from &
2023-06-10 15:37:02 +02:00
Flori Weber
d5e38d954f
Implement GuildMember::get()
2023-06-10 15:16:45 +02:00
kozabrada123
a148cf576e
Refactor, better deserialization error handling
2023-06-10 12:43:07 +02:00
kozabrada123
0b06f914e3
Merge branch 'main' into perpetual/gateway-dev
2023-06-10 10:30:54 +02:00
bitfl0wer
a18eab1884
Change UserMeta: User instead of Option<User>
...
I do not know why I have made it optional in the first place. hm
2023-06-10 00:35:51 +02:00
bitfl0wer
30db9e9553
implement GuildMember::remove_role()
2023-06-10 00:10:12 +02:00
bitfl0wer
3d98b45413
Implement GuildMember::add_role()
2023-06-10 00:03:31 +02:00
bitfl0wer
daf30ddde6
create member.rs
2023-06-09 23:41:40 +02:00
bitfl0wer
7aa948647a
Add from_vec()
...
Calculates a PermissionFlags Stirng from a Vec<PermissionFlags>.
2023-06-09 21:34:54 +02:00
bitfl0wer
7a0a9baa45
Remove unused import
2023-06-09 20:49:02 +02:00
bitfl0wer
486e210062
Move role schemas to own file
2023-06-09 20:47:45 +02:00
kozabrada123
5231656c68
Docs + unneeded &mut
2023-06-09 20:22:59 +02:00
kozabrada123
28877f8355
Discord.com sends premissions as an integer
2023-06-09 18:38:36 +02:00
kozabrada123
182cd45a15
Rebase
2023-06-09 18:14:20 +02:00
bitfl0wer
d475584fea
Implement RoleObject::position_update()
2023-06-09 16:50:03 +02:00
bitfl0wer
9bf968c7e0
Change Role to have String over PermissionFlags
...
PermissionFlags implementation needs to be figured out a bit better before we can use it here.
2023-06-09 12:04:49 +02:00
bitfl0wer
fc66036674
Add documentation
2023-06-08 22:39:06 +02:00
bitfl0wer
30cfb3b744
Implement RoleObject::create()
2023-06-08 22:26:24 +02:00
bitfl0wer
1c5be5693e
Add FormCreationError
2023-06-08 22:26:08 +02:00
bitfl0wer
9f21c06492
Change InstanceServerError to ChorusLibError
...
The name InstanceServerError was chosen without thinking about it too much, very early in development. The new name suits this custom Error type way better, in my opinion.
2023-06-08 22:16:23 +02:00
bitfl0wer
bac097fb2e
Add RolePositionUpdateSchema
2023-06-08 20:45:56 +02:00
bitfl0wer
4993b7bac8
Change struct name
...
This schema is being used as a RoleModifySchema AND as a RoleCreationSchema.
2023-06-08 20:43:29 +02:00
bitfl0wer
a1a4532b57
Add misssing attribute
2023-06-08 20:42:40 +02:00
bitfl0wer
c31d2aa76d
Add RoleCreateSchema
2023-06-08 20:40:36 +02:00
kozabrada123
e6af81d694
Basic tests
2023-06-08 19:51:32 +02:00
kozabrada123
cae038af8f
Refactor
2023-06-08 18:24:11 +02:00
kozabrada123
0f4eef2fb9
Merge branch 'main' into perpetual/gateway-dev
2023-06-08 17:35:17 +02:00
kozabrada123
f4f17f7454
Gateway basic error handling
2023-06-08 17:34:52 +02:00
bitfl0wer
429db9332b
cargo fix
2023-06-07 23:06:52 +02:00
bitfl0wer
0097809049
Remove unnecessary imports
2023-06-07 23:03:37 +02:00
bitfl0wer
32503078d7
Implement RoleObject::get_all()
2023-06-07 23:03:24 +02:00
bitfl0wer
afe9663ded
Create roles.rs
2023-06-07 23:03:07 +02:00
bitfl0wer
97ca0c17eb
Try making permissions to PermissionFlags
2023-06-07 22:44:16 +02:00
bitfl0wer
6c0d21867c
Sort fields on Guild alphabetically
2023-06-07 22:40:48 +02:00
bitfl0wer
5b7bfa4a5d
Make enum into bitflags struct
2023-06-07 10:39:05 +02:00
bitfl0wer
7a1021031e
Fix enum, add has_permission() for RoleObject
2023-06-06 21:38:28 +02:00
bitfl0wer
e2c80fc1f8
Make enum pub
2023-06-06 20:10:50 +02:00
bitfl0wer
6d2db3d808
Add PermissionFlags
2023-06-06 20:05:34 +02:00
bitfl0wer
7a3f485580
Add reference to docs
2023-06-04 14:41:24 +02:00
bitfl0wer
471abc88a6
Add method to remove own reaction
2023-06-04 14:39:22 +02:00
bitfl0wer
fd2b9e670f
improve existing documentation
2023-06-04 14:32:57 +02:00
bitfl0wer
213220c8e0
Add delete_user method
2023-06-04 14:29:43 +02:00
bitfl0wer
47d1c52014
Change file structure
2023-06-04 14:20:06 +02:00
kozabrada123
7d17a1c976
Implement Clone for all events
2023-06-04 13:49:35 +02:00
kozabrada123
ca9f7f6c11
Merge branch 'main' into perpetual/gateway-dev
2023-06-04 10:18:16 +02:00
bitfl0wer
6b8d458eb4
Move some pieces of documentation to where they make the most sense
2023-06-03 22:34:03 +02:00