snowtransfer 0.17.7 → 0.18.0

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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,31 @@
1
+ # 0.18.0
2
+ First entry in this changelog. This is a major one - possibly the biggest one save for the js -> ts rewrite. We'll start with the most interesting/impactful.
3
+
4
+ - Consistency changes across the board. This includes method names, code formatting, etc. (I finally updated eslint to v10)
5
+ - This is quite a few breaking changes and makes up a good chunk of this update. The original method names didn't get a redirect to the new ones. Sorry in advance for the migration struggle.
6
+ - I had to struggle migrating Discord.js a few times, don't think this library is safe from the same struggles >:D jk. I think this will be the only time this kinda thing happens.
7
+ - PATCH methods have been changed from a mix of update/edit/??? prefixes to just edit* preferably. Some methods are special snowflakes.
8
+ - DELETE methods have been changed to prefix with delete*
9
+ - Bulk methods like channel bulk delete messages was simplified to deleteMessages. There were more though.
10
+ - SkuMethods#getSkus was SkuMethods#GetSkus (PascalCase instead of camelCase like literally every other method)
11
+ - Found and fixed some actual bugs.
12
+ - GuildScheduledEventMethods#getGuildScheduledEvent and UserMethods#getGuild was accidentally passing the query string params to the JSON body param for the request.
13
+ - IntervalCounter#take would continue to decrement remaining past 0 into the negatives. It would still return false regardless, but this could probably have been problematic in external use cases outside of this lib.
14
+ - request retry logic would go indefinitely instead of decrementing the remaining amount.
15
+ - Removed some types being exported from the package.
16
+ - These types were actually just straight up deleted as discord-api-types added them.
17
+ - Added a generateWaveform function to Constants.
18
+ - This function is supposed to be used for ChannelMethods#createVoiceMessage, but it doesn't do the whole thing for you. Please read the JSDoc for it!
19
+ - Huge thank you to @Lulalaby for her original C# implementation.
20
+ - Removed any lingering references to removeEveryone.
21
+ - Fixed some errors with docs.
22
+ - Some of it was spelling related.
23
+ - Some docs entries had invalid JS in it, so anyone who copy pasted and saw an error... Oops! My bad.
24
+ - Changed some method return types to be from discord-api-types.
25
+ - Previously for HTTP 204 routes, the return type was never, which was incorrect and made some design patterns, specifically mock test writing annoying as you cannot naturally return the type never in JS without unconditionally throwing an Error or calling process.exit()
26
+ - A PR from yours truly changed it to undefined. I had changed them to void locally for a bit and commented out the types from dapi types, but now that's fixed so they're back.
27
+ - VSCode settings deprecated the setting originally used to specify the TS version in editor, so the path was changed.
28
+ - Deleted the old travis.yml
29
+ - Updated the examples.
30
+ - Added a build script that runs both build:src and build:docs.
31
+ - Added a lint script.
package/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2021 DasWolke
3
+ Copyright (c) 2026 DasWolke
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -26,6 +26,8 @@ I've written a general whitepaper on the idea of microservice bots, which you ca
26
26
  ### Documentation:
27
27
  You can find the docs at [https://daswolke.github.io/SnowTransfer/](https://daswolke.github.io/SnowTransfer/)
28
28
 
29
+ For a changelog, read here: [Changelog](./CHANGELOG.md)
30
+
29
31
  ### Installation:
30
32
  To install SnowTransfer, make sure that you have node 22.0.0 or higher and npm installed on your computer.
31
33
 
@@ -35,11 +37,8 @@ Then run the following command in a terminal `npm install snowtransfer`
35
37
  ```js
36
38
  const { SnowTransfer } = require('snowtransfer');
37
39
  const client = new SnowTransfer('DISCORD BOT TOKEN');
38
- const request = async () => {
39
- const message = await client.channel.createMessage('channel id', 'hi there');
40
- console.log(message);
41
- };
42
- request().then(() => {
40
+
41
+ client.channel.createMessage('channel id', 'hi there').then(() => {
43
42
  // message was sent to discord
44
43
  }).catch(e => {
45
44
  // an error occurred