aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorZeyla Hellyer <[email protected]>2018-05-21 17:43:06 -0700
committerZeyla Hellyer <[email protected]>2018-05-21 17:43:47 -0700
commit0e1e8fbbe564c23530a709a7ec407b08f63944e2 (patch)
tree4ec7ff0903ba1911180dd9a0bcf90b1bad608086 /tests
parentAdd `rls/` dir to .gitignore (diff)
downloadserenity-0e1e8fbbe564c23530a709a7ec407b08f63944e2.tar.xz
serenity-0e1e8fbbe564c23530a709a7ec407b08f63944e2.zip
Add `Message::member` structfield
Adds the `Message::member` structfield, which contains a partial amount of member data (deaf and mute status, role IDs, and joined_at).
Diffstat (limited to 'tests')
-rw-r--r--tests/resources/message_create_3.json29
-rw-r--r--tests/test_deser.rs3
2 files changed, 32 insertions, 0 deletions
diff --git a/tests/resources/message_create_3.json b/tests/resources/message_create_3.json
new file mode 100644
index 0000000..6301355
--- /dev/null
+++ b/tests/resources/message_create_3.json
@@ -0,0 +1,29 @@
+{
+ "type": 0,
+ "tts": false,
+ "timestamp": "2017-01-01T01:01:01.100000+00:00",
+ "pinned": false,
+ "nonce": -6000000000000000,
+ "mentions": [],
+ "mention_roles": [],
+ "mention_everyone": false,
+ "id": "300000000000000000",
+ "embeds": [],
+ "edited_timestamp": null,
+ "content": "fake",
+ "channel_id": "100000000000000000",
+ "author": {
+ "username": "fake",
+ "id": "300000000000000000",
+ "discriminator": "1234",
+ "bot": true,
+ "avatar": "f133549aac3208319a9fbc3c12345678"
+ },
+ "member": {
+ "joined_at": "2017-11-19T18:55:33.00000+00:00",
+ "roles": [381891844067557378, 391753382181863425, 381925348956438528],
+ "deaf": false,
+ "mute": false
+ },
+ "attachments": []
+ }
diff --git a/tests/test_deser.rs b/tests/test_deser.rs
index e547e9d..70b6f1f 100644
--- a/tests/test_deser.rs
+++ b/tests/test_deser.rs
@@ -126,6 +126,9 @@ fn message_create() {
// negative nonce
p!(MessageCreateEvent, "message_create_2");
+
+ // message from guild with partial member data
+ p!(MessageCreateEvent, "message_create_3");
}
#[test]