Commit Graph

536 Commits

Author SHA1 Message Date
Flori Weber f0e3933419 Implement RoleObject::get() 2023-06-10 18:48:37 +02:00
Flori Weber 2652ae68e0 Add RoleObject::update() 2023-06-10 18:42:37 +02:00
kozabrada123 17194a2fcc Implement display for UserStatus 2023-06-10 16:56:50 +02:00
kozabrada123 3db9114ecf turns out UpdatePresence and PresenceUpdate are different events 2023-06-10 16:32:42 +02:00
kozabrada123 78e63657c8 Change observer update ref to &mut from & 2023-06-10 15:37:02 +02:00
Flori Weber 6070ad8e0a Implement GuildMember::get() 2023-06-10 15:16:45 +02:00
kozabrada123 d5b883a088 Refactor, better deserialization error handling 2023-06-10 12:43:07 +02:00
kozabrada123 ecc6fc9424 Merge branch 'main' into perpetual/gateway-dev 2023-06-10 10:30:54 +02:00
bitfl0wer 972100af65 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 9fb6c8c6f9 implement GuildMember::remove_role() 2023-06-10 00:10:12 +02:00
bitfl0wer e4fb36d914 Implement GuildMember::add_role() 2023-06-10 00:03:31 +02:00
bitfl0wer ce59beab3a create member.rs 2023-06-09 23:41:40 +02:00
bitfl0wer 777746bc00 Add from_vec()
Calculates a PermissionFlags Stirng from a Vec<PermissionFlags>.
2023-06-09 21:34:54 +02:00
bitfl0wer 76e038b103 Remove unused import 2023-06-09 20:49:02 +02:00
bitfl0wer 2d828f2fdb Move role schemas to own file 2023-06-09 20:47:45 +02:00
kozabrada123 a278b63ecb Docs + unneeded &mut 2023-06-09 20:22:59 +02:00
kozabrada123 dc2fc90414 Discord.com sends premissions as an integer 2023-06-09 18:38:36 +02:00
kozabrada123 10617ca85c Rebase 2023-06-09 18:14:20 +02:00
bitfl0wer 6ed9eaf2fc Implement RoleObject::position_update() 2023-06-09 16:50:03 +02:00
bitfl0wer 2c153259b3 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 47f8b131a3 Add documentation 2023-06-08 22:39:06 +02:00
bitfl0wer f41312d430 Implement RoleObject::create() 2023-06-08 22:26:24 +02:00
bitfl0wer 951e41db4b Add FormCreationError 2023-06-08 22:26:08 +02:00
bitfl0wer b0a19faa48 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 8b35c5948d Add RolePositionUpdateSchema 2023-06-08 20:45:56 +02:00
bitfl0wer 925165aba2 Change struct name
This schema is being used as a RoleModifySchema AND as a RoleCreationSchema.
2023-06-08 20:43:29 +02:00
bitfl0wer 4547e8b2d6 Add misssing attribute 2023-06-08 20:42:40 +02:00
bitfl0wer 46fac4b132 Add RoleCreateSchema 2023-06-08 20:40:36 +02:00
kozabrada123 88d571486b Basic tests 2023-06-08 19:51:32 +02:00
kozabrada123 da98f3c581 Refactor 2023-06-08 18:24:11 +02:00
kozabrada123 74785b4b2b Merge branch 'main' into perpetual/gateway-dev 2023-06-08 17:35:17 +02:00
kozabrada123 a0629bf198 Gateway basic error handling 2023-06-08 17:34:52 +02:00
bitfl0wer 15a122d719 cargo fix 2023-06-07 23:06:52 +02:00
bitfl0wer 1381bbfcbf Remove unnecessary imports 2023-06-07 23:03:37 +02:00
bitfl0wer acbbc88e84 Implement RoleObject::get_all() 2023-06-07 23:03:24 +02:00
bitfl0wer 990f9eb4e2 Create roles.rs 2023-06-07 23:03:07 +02:00
bitfl0wer 91ede88140 Try making permissions to PermissionFlags 2023-06-07 22:44:16 +02:00
bitfl0wer 1d701c185f Sort fields on Guild alphabetically 2023-06-07 22:40:48 +02:00
bitfl0wer cf74d0e618 Make enum into bitflags struct 2023-06-07 10:39:05 +02:00
bitfl0wer e65aa964f0 Fix enum, add has_permission() for RoleObject 2023-06-06 21:38:28 +02:00
bitfl0wer 3cd633f7ad Make enum pub 2023-06-06 20:10:50 +02:00
bitfl0wer e07387fc77 Add PermissionFlags 2023-06-06 20:05:34 +02:00
bitfl0wer 3692f15f0f Add reference to docs 2023-06-04 14:41:24 +02:00
bitfl0wer 0a106d2e1d Add method to remove own reaction 2023-06-04 14:39:22 +02:00
bitfl0wer 7a811e1792 improve existing documentation 2023-06-04 14:32:57 +02:00
bitfl0wer 359bfc7b8b Add delete_user method 2023-06-04 14:29:43 +02:00
bitfl0wer 92e768d5a6 Change file structure 2023-06-04 14:20:06 +02:00
kozabrada123 8f6c533e50 Implement Clone for all events 2023-06-04 13:49:35 +02:00
kozabrada123 9bad8ab4fa Merge branch 'main' into perpetual/gateway-dev 2023-06-04 10:18:16 +02:00
bitfl0wer 5dd9d095cf Move some pieces of documentation to where they make the most sense 2023-06-03 22:34:03 +02:00
bitfl0wer 9918b9a71d Make reference links clickable in cargo doc 2023-06-03 22:15:03 +02:00
bitfl0wer b5de178a91 Add references 2023-06-03 22:08:56 +02:00
bitfl0wer 065bb28c96 Add create reaction with documentation 2023-06-03 22:07:37 +02:00
bitfl0wer 33e0f75772 Add delete_emoji method with documentation 2023-06-03 20:17:21 +02:00
bitfl0wer 4d6ad1cd7b Add documentation 2023-06-03 18:59:13 +02:00
bitfl0wer be512504c5 Add reactions: get 2023-06-03 18:53:53 +02:00
bitfl0wer da0726c538 Implement reactions: delete all 2023-06-03 18:46:36 +02:00
bitfl0wer df6fcbd5ee Add ReactionMeta struct 2023-06-03 15:21:49 +02:00
kozabrada123 151ae4250a Features is not always sent 2023-06-02 11:00:34 +02:00
kozabrada123 2309c957d4 Merge branch 'perpetual/gateway-dev' of https://github.com/polyphony-chat/chorus into perpetual/gateway-dev 2023-06-02 10:58:22 +02:00
kozabrada123 a4b21072ab fmt 2023-06-02 10:58:04 +02:00
kozabrada123 554810862d Handle Heartbeat ACKs 2023-06-02 10:57:47 +02:00
kozabrada123 0192f1452d Handle Heartbeat requests 2023-06-02 10:42:19 +02:00
bitfl0wer e9d5384f02 Create reactions.rs 2023-06-01 21:14:11 +02:00
bitfl0wer e61546e442 Remove mod 2023-06-01 21:14:02 +02:00
Flori db1afb4578 Merge pull request #83 from polyphony-chat/refactor/less-boilerplate
Refactor/less boilerplate
2023-05-30 23:11:47 +02:00
bitfl0wer 9943fcc55f Refactored users() as much as possible 2023-05-30 23:04:22 +02:00
Quaternion fefc6a68f9 make the tests pass 2023-05-30 10:57:34 -04:00
Zert3x 8ccd6a8d4b Merge branch 'main' into refactor/rename-apierror 2023-05-29 22:25:02 -04:00
bitfl0wer 315c5a00cf Refactor channels() 2023-05-29 23:59:13 +02:00
bitfl0wer 671c5d6191 Refactor create 2023-05-29 23:57:23 +02:00
bitfl0wer 03e5a83d84 Refactor delete() 2023-05-29 23:51:12 +02:00
bitfl0wer b501aca5b2 Refactor create() and get() 2023-05-29 23:46:43 +02:00
bitfl0wer f986b33878 Remove unnecessary lifetime 2023-05-29 23:46:17 +02:00
bitfl0wer 69993820f9 Refactor Guild create 2023-05-29 23:16:43 +02:00
bitfl0wer c43e861586 Refactor message::send() 2023-05-29 23:15:05 +02:00
bitfl0wer 072d99e879 Refactor modify() to take less boilerplate args 2023-05-29 23:11:12 +02:00
bitfl0wer ebeaf31343 Refactor delete() to take less boilerplate args 2023-05-29 23:08:52 +02:00
bitfl0wer 3e4840d7a6 Refactor get() to take less boilerplate args 2023-05-29 23:01:17 +02:00
bitfl0wer 84b3b72928 Add clone, default derives 2023-05-29 18:50:19 +02:00
bitfl0wer f8655c22bc Make all attributes pub 2023-05-29 18:34:08 +02:00
bitfl0wer 6cb400b3d0 Add modify() 2023-05-29 18:27:30 +02:00
bitfl0wer 572ff07b93 Add ChannelModifySchema 2023-05-29 18:27:15 +02:00
Flori 7ada53a4d4 Merge pull request #81 from polyphony-chat/feature/channel/delete
Feature/channel/delete
2023-05-29 17:56:13 +02:00
bitfl0wer 4bac730e14 Implement User methods on User instead of UserMeta 2023-05-29 17:25:34 +02:00
kozabrada123 24a79b18e2 Fix typo 2023-05-29 17:18:52 +02:00
kozabrada123 9d546ef2a5 Fix some errors caused by the observer return fix 2023-05-29 17:11:08 +02:00
bitfl0wer 1f739ebfb7 Made Guild::create return Guild instead of String.
This makes way more sense, I think.
2023-05-29 16:50:10 +02:00
bitfl0wer aa28fbe1cd Changed some apparently incorrect attributes
Some attributes are not necessarily returned by the GET route for a guild. Also, some integers were too small. One example is max_video_channel_users, which was a u8, but could theoretically be a value much higher than u8::MAX.
2023-05-29 16:49:36 +02:00
bitfl0wer 3fe3e2a461 Remove print statement 2023-05-28 23:08:13 +02:00
bitfl0wer fdc1da9af7 Remove print statement 2023-05-28 23:08:05 +02:00
bitfl0wer 1fb3ef6766 Create channels() for Guild
This method retrieves all channels from a guild
2023-05-28 23:04:35 +02:00
bitfl0wer 84505829c4 Make delete use self 2023-05-28 23:04:13 +02:00
bitfl0wer 8e8556ee53 Add InvalidResponseError 2023-05-28 23:04:02 +02:00
bitfl0wer f2824f3a81 Add documentation 2023-05-28 22:40:37 +02:00
bitfl0wer a189d2baaa Make channel delete take ownership of a Channel 2023-05-28 22:39:38 +02:00
bitfl0wer ed330859bd Add channel delete method 2023-05-28 22:39:25 +02:00
kozabrada123 7e37d2df42 Fix weird observer subscribe return 2023-05-28 17:37:05 +02:00
kozabrada123 6c2e29228f u16 is too small for flags apparently 2023-05-28 17:36:30 +02:00
kozabrada123 6d90980bf4 Members is optional 2023-05-28 17:36:12 +02:00