@@ -18,7 +18,7 @@ The format that is expected in those arguments looks like this:
18
18
"title" : " title" ,
19
19
"description" : " description" ,
20
20
"url" : " url for title" ,
21
- "timestamp" : " timestamp in epoch seconds " ,
21
+ "timestamp" : " timestamp in epoch milliseconds " ,
22
22
"color" : " color in hex format, with leading #" ,
23
23
"image" : " example image url" ,
24
24
"footer" : {
@@ -79,3 +79,39 @@ The format that is expected in those arguments looks like this:
79
79
}
80
80
```
81
81
{collapsible="true" default-state="collapsed" collapsed-title="Example Embed"}
82
+
83
+ ### URL format
84
+
85
+ Some fields in the embed can contain a URL. This URL is often a link to an image that should be used, but it can reference any possible url.
86
+ These fields are checked before the embed is sent, and any of the URLs are not valid, an error will be shown.
87
+ The URL must contain a valid protocol, meaning it must start with e.g. ` http:// ` or ` https:// ` .
88
+
89
+ ### Message Link
90
+
91
+ The message link is a link to a message in discord, which can be obtained by right-clicking on a message and selecting ` Copy Message Link ` .
92
+ This link is used to identify the message that should be edited or read from. \
93
+ The regex that is used to match the message link is:
94
+ ``` regex
95
+ (?x) # enable comment mode
96
+ (?i) # ignore case
97
+ (?:https?+://)?+ # 'https://' or 'http://' or ''
98
+ (?:(?:canary|ptb)\\.)?+ # 'canary.' or 'ptb.'
99
+ discord(?:app)?+\\.com/channels/ # 'discord(app).com/channels/'
100
+ (?:(?<server>[0-9]++)|@me) # '@me' or the server id as named group
101
+ / # '/'
102
+ (?<channel>[0-9]++) # the textchannel id as named group
103
+ / # '/'
104
+ (?<message>[0-9]++) # the message id as named group
105
+ ```
106
+ {collapsible="true" default-state="expanded" collapsed-title="Message Link Regex"}
107
+
108
+ ### Timestamp
109
+
110
+ The ` timestamp ` field is a unix timestamp in milliseconds. This is used to display a timestamp in the embed. \
111
+ You can convert a date to a timestamp and vice versa by using websites like [ this] ( https://www.epochconverter.com/ ) . \
112
+ Please make sure that the timestamp is in milliseconds, as the bot will not convert it for you, resulting in incorrect dates being shown.
113
+
114
+ ### Color
115
+
116
+ The ` color ` field is a hex color code, with a leading ` # ` . This color is used to color the left bar of the embed. \
117
+ You can use websites like [ this] ( https://www.w3schools.com/colors/colors_picker.asp ) or [ this] ( https://www.color-hex.com/ ) to find a color you like.
0 commit comments