dschook 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/readme.md +25 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dschook",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Convenience library for Discord's Webhook API",
5
5
  "main": "lib/Webhook.js",
6
6
  "files": [
package/readme.md CHANGED
@@ -73,6 +73,31 @@ hook.send({
73
73
  });
74
74
  ```
75
75
 
76
+ ### Message modifiers
77
+
78
+ Sending messages as a user:
79
+
80
+ ```js
81
+ hook.as_user("Charles", /* optional */ "avatarURL").sendText("My name is Charles");
82
+ ```
83
+
84
+ Sending messages in a thread (the webhook must be in a forum to work):
85
+
86
+ ```js
87
+ hook.in_thread("Good morning thread").sendComponents(
88
+ text("Good morning!")
89
+ );
90
+ ```
91
+
92
+ Sending messages with text-to-speech:
93
+
94
+ ```js
95
+ hook.with_tts().send_text("boo!");
96
+ ```
97
+
98
+ These modifiers can be stacked.
99
+
100
+
76
101
  ## Currently unsupported
77
102
 
78
103
  PRs welcome!