zumito-framework 1.1.43 → 1.1.44

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.
@@ -17,14 +17,17 @@ export class TextFormatter {
17
17
  static getMember(memberId) {
18
18
  return `<@!${memberId}>`;
19
19
  }
20
+ // Formats: https://discord.com/developers/docs/reference#message-formatting-formats
20
21
  static getTimestamp(timestamp, format) {
21
22
  return `<t:${timestamp}:${format}>`;
22
23
  }
24
+ // Formats: https://discord.com/developers/docs/reference#message-formatting-formats
23
25
  static getTimestampFromDate(date, format) {
24
- return `<t:${date.getTime() / 1000}:${format}>`;
26
+ return `<t:${Math.trunc(date.getTime() / 1000)}:${format}>`;
25
27
  }
28
+ // Formats: https://discord.com/developers/docs/reference#message-formatting-formats
26
29
  static getTimestampFromNow(format) {
27
- return `<t:${Math.floor(Date.now() / 1000)}:${format}>`;
30
+ return `<t:${Math.trunc(Math.floor(Date.now() / 1000))}:${format}>`;
28
31
  }
29
32
  static getCodeBlock(code, language) {
30
33
  return `\`\`\`${language}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zumito-framework",
3
- "version": "1.1.43",
3
+ "version": "1.1.44",
4
4
  "description": "Discord.js bot framework",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",