1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2025-07-23 05:11:44 +00:00
Commit graph

1139 commits

Author SHA1 Message Date
diamondburned 19d9c3f2e0
gateway: Add FromWebsocketGateway constructor
Previously, it was not possible to construct a new *gateway.Gateway
instance from a custom constructed *ws.Gateway instance. This new
constructor makes that possible.
2025-07-02 22:32:18 -07:00
ayn2op 91c175a8e0 gateway: change IdentifyProperties.ClientBuildNumber type to int 2025-07-01 18:40:48 -07:00
Ayyan 9ba3bdee65
gateway: Add new fields to IdentifyProperties (#481)
* feat(gateway): add new fields to IdentifyProperties

Reference: https://docs.discord.food/reference#client-properties

* feat(gateway): add new fields to IdentifyProperties struct
2025-06-30 19:26:02 -07:00
diamondburned 9d8f454bf6
sendpart: Add GuestSize helper
GuestSize is added to utilize the io.Seeker API to determine the size of
the reader stream if possible. This is mostly useful if the reader is an
`*os.File`.
2025-06-20 01:26:52 -07:00
diamondburned daf47b3491
api: Add upload size consts and DetermineUploadSize
This commit adds a new method `DetermineUploadSize` into both api.Client
and state.State, which implement the core logic to determine the right
upload size limit for the current user. Bots can ignore this method.

This commit also adds constants for the upload size limits, with
different constants for different scenarios (nitro, server boosts).
Bots can directly use the `UploadSizeLimit` constant, which is the
default lowest limit.
2025-06-20 01:25:20 -07:00
diamondburned 6cf93e070a
state: Cache members on Message{Create,Update}
We now use the .Member in each incoming message and store that into the
gateway cache (state). Theoretically, this member can get stale, but in
reality bots scarcely ever use messages, so they won't be affected by
this, and clients should still rely on the RequestGuildMembers command
to get the latest member information.
2025-06-20 00:59:45 -07:00
ayn2op 7824d15d26 feat(api): add fields to LoginResponse 2025-05-15 10:38:23 -07:00
ayn2op 8a78eb0443 fix(api): change field name to login 2025-04-28 23:05:05 -07:00
twoscott 0bf2103a1e discord: Add Member BannerURL methods 2025-03-31 14:30:09 -07:00
twoscott b01afe1b80 api: Support with_counts for Guilds method 2025-03-25 21:49:43 -07:00
dependabot[bot] e47e27bd82 build(deps): bump golang.org/x/time from 0.9.0 to 0.10.0
Bumps [golang.org/x/time](https://github.com/golang/time) from 0.9.0 to 0.10.0.
- [Commits](https://github.com/golang/time/compare/v0.9.0...v0.10.0)

---
updated-dependencies:
- dependency-name: golang.org/x/time
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-02 15:51:44 -08:00
diamondburned e1d265203b
Fix old GHA 2025-02-26 00:31:55 -08:00
diamondburned 1c8c4d80b6
Bump Go to 1.23 2025-02-25 23:29:58 -08:00
dependabot[bot] 3a51367bf8 build(deps): bump golang.org/x/time from 0.8.0 to 0.9.0
Bumps [golang.org/x/time](https://github.com/golang/time) from 0.8.0 to 0.9.0.
- [Commits](https://github.com/golang/time/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: golang.org/x/time
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-09 12:39:33 -08:00
dependabot[bot] d0cb786fda build(deps): bump golang.org/x/crypto from 0.31.0 to 0.32.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.31.0 to 0.32.0.
- [Commits](https://github.com/golang/crypto/compare/v0.31.0...v0.32.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-09 00:24:43 -08:00
dependabot[bot] 44d8abdc6e build(deps): bump golang.org/x/crypto from 0.29.0 to 0.31.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.29.0 to 0.31.0.
- [Commits](https://github.com/golang/crypto/compare/v0.29.0...v0.31.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-11 18:44:56 -08:00
dependabot[bot] e735ea5ce6 build(deps): bump golang.org/x/crypto
Bumps the go_modules group with 1 update in the /0-examples/voice directory: [golang.org/x/crypto](https://github.com/golang/crypto).


Updates `golang.org/x/crypto` from 0.17.0 to 0.31.0
- [Commits](https://github.com/golang/crypto/compare/v0.17.0...v0.31.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
  dependency-group: go_modules
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-11 18:44:28 -08:00
dependabot[bot] c1d1d5714b build(deps): bump golang.org/x/time from 0.6.0 to 0.8.0
Bumps [golang.org/x/time](https://github.com/golang/time) from 0.6.0 to 0.8.0.
- [Commits](https://github.com/golang/time/compare/v0.6.0...v0.8.0)

---
updated-dependencies:
- dependency-name: golang.org/x/time
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-10 09:41:56 +07:00
dependabot[bot] b6b0b236ec build(deps): bump golang.org/x/crypto from 0.27.0 to 0.29.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.27.0 to 0.29.0.
- [Commits](https://github.com/golang/crypto/compare/v0.27.0...v0.29.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-09 12:27:43 +07:00
Barani Kumar S c2bbe540a1
discord: Add SelectedValue for SelectComponents (#455)
* discord: Added SelectedValue fields for Channel, User and Role SelectComponents

* discord: Modified MentionableSelectComponent to accept both RoleID and UserID as SelectedMentions

* discord: Minor comment change

* discord: Applied [this](https://github.com/diamondburned/arikawa/pull/455#discussion_r1815822434)

* discord: Modified MentionableSelectComponent to take in DefaultMention union type

* comments: Little typo fix

* discord: Minor wordings and comment fix

* comments: Fix format
2024-10-31 13:12:25 -07:00
diamondburned f8537d78bb
*: Fix GHA shell directive 2024-10-13 22:11:17 -07:00
diamondburned e198c6e8f2
*: Experiment with GHA weirdness 2024-10-13 22:07:20 -07:00
diamondburned 8c46c5bab3
*: Migrate to Nix flakes, deprecate non-GHA CI
This simplifies the project setup and makes it easier to maintain the
CI pipeline.
2024-10-13 21:31:57 -07:00
diamondburned 85debd971d
discord: Fix up documentation for MessageSnapshots
Follow up to PR #453.
2024-10-13 21:21:51 -07:00
diamondburned eb1d5817db
discord: Populate Relationship type with nickname 2024-10-13 21:17:07 -07:00
hi117 9e83b0ef90
discord: Add message_snapshot support (#453)
* Add new type field

https://discord.com/developers/docs/resources/message#message-reference-structure

* Update with changes

* Add message_snapshot

* fixup

* fixup

* Convert Message to MessageSnapshotMessage
2024-10-13 21:16:10 -07:00
Benbebop 6f5a53063f utils: dont set http.Client timeout to a default value 2024-09-16 13:33:25 +07:00
dependabot[bot] 67f94a835a build(deps): bump golang.org/x/crypto from 0.25.0 to 0.27.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.25.0 to 0.27.0.
- [Commits](https://github.com/golang/crypto/compare/v0.25.0...v0.27.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-08 17:34:06 +09:00
diamondburned 4b1270e34b
*: Reasonable generate diff testing for CI 2024-09-08 17:33:04 +09:00
hi117 acbed83ca7
api: Add initial implementation for automoderator API (#444)
* Add initial implementation for automoderator api

* Move AutoModerationRuleID to snowflake.go and go generate

* Combine a struct and document all the things

* Add audit log reasons to modify and delete in automoderation

* Update docstrings and change how data is passed in

* Rename plurals to singulars and update data stuff

* fixup

* Update to use optional

* Move params out of data

* fixup and add types
2024-08-06 14:43:41 +07:00
diamondburned af0a612eca
json/option: Add helper Optional[T] type 2024-08-06 13:32:15 +07:00
dependabot[bot] c40c6b8021 build(deps): bump golang.org/x/time from 0.5.0 to 0.6.0
Bumps [golang.org/x/time](https://github.com/golang/time) from 0.5.0 to 0.6.0.
- [Commits](https://github.com/golang/time/compare/v0.5.0...v0.6.0)

---
updated-dependencies:
- dependency-name: golang.org/x/time
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-06 01:54:48 +07:00
Samuel Hernandez 65afa699ef gateway: add missing Event suffix to GuildMemberListUpdateEvent 2024-08-04 18:26:28 +07:00
Samuel Hernandez 231b4759dc api: allow searching DMs 2024-07-14 14:46:59 +07:00
Samuel Hernandez 0ec9fe5ace discord: add URL method to Channel 2024-07-14 12:42:27 +07:00
dependabot[bot] 5d7b2e3fd0 build(deps): bump golang.org/x/crypto from 0.24.0 to 0.25.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.24.0 to 0.25.0.
- [Commits](https://github.com/golang/crypto/compare/v0.24.0...v0.25.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-06 14:46:02 +07:00
diamondburned bc3439b8ff
cmdroute: Further deprecate Handle{Command,Autocompletion}
These functions now call HandleInteraction directly, which then calls
internal functions. For incorrect uses, this change is breaking.
2024-07-06 12:42:00 +07:00
dependabot[bot] 4d2f793418 build(deps): bump github.com/gorilla/schema
Bumps the go_modules group with 1 update in the /0-examples/voice directory: [github.com/gorilla/schema](https://github.com/gorilla/schema).


Updates `github.com/gorilla/schema` from 1.2.0 to 1.4.1
- [Release notes](https://github.com/gorilla/schema/releases)
- [Commits](https://github.com/gorilla/schema/compare/v1.2.0...v1.4.1)

---
updated-dependencies:
- dependency-name: github.com/gorilla/schema
  dependency-type: indirect
  dependency-group: go_modules
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 10:31:39 +07:00
dependabot[bot] 49c46eb547 build(deps): bump github.com/gorilla/schema from 1.4.0 to 1.4.1
Bumps [github.com/gorilla/schema](https://github.com/gorilla/schema) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/gorilla/schema/releases)
- [Commits](https://github.com/gorilla/schema/compare/v1.4.0...v1.4.1)

---
updated-dependencies:
- dependency-name: github.com/gorilla/schema
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-02 10:31:29 +07:00
dependabot[bot] 99a8517ee4 build(deps): bump github.com/gorilla/schema from 1.3.0 to 1.4.0
Bumps [github.com/gorilla/schema](https://github.com/gorilla/schema) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/gorilla/schema/releases)
- [Commits](https://github.com/gorilla/schema/compare/v1.3.0...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/gorilla/schema
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-17 16:23:26 -07:00
dependabot[bot] c613d8d961 build(deps): bump golang.org/x/crypto from 0.23.0 to 0.24.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.23.0 to 0.24.0.
- [Commits](https://github.com/golang/crypto/compare/v0.23.0...v0.24.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-14 14:33:56 -07:00
dependabot[bot] f22a386a44 build(deps): bump github.com/gorilla/websocket from 1.5.2 to 1.5.3
Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.5.2 to 1.5.3.
- [Release notes](https://github.com/gorilla/websocket/releases)
- [Commits](https://github.com/gorilla/websocket/compare/v1.5.2...v1.5.3)

---
updated-dependencies:
- dependency-name: github.com/gorilla/websocket
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-14 14:25:04 -07:00
dependabot[bot] e76c4d733c build(deps): bump github.com/gorilla/websocket from 1.5.1 to 1.5.2
Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.5.1 to 1.5.2.
- [Release notes](https://github.com/gorilla/websocket/releases)
- [Commits](https://github.com/gorilla/websocket/compare/v1.5.1...v1.5.2)

---
updated-dependencies:
- dependency-name: github.com/gorilla/websocket
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-10 16:47:43 -07:00
dependabot[bot] 9289cfc9e8 build(deps): bump golang.org/x/crypto from 0.22.0 to 0.23.0
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.22.0 to 0.23.0.
- [Commits](https://github.com/golang/crypto/compare/v0.22.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-06 15:57:12 -07:00
diamondburned 5aaffc3687
discord: Upgrade MemberFlags from u8 to u32
why did it ever do this?! 522 does not even fit in a u8!
where did it even get this idea from?! omg.
2024-04-23 23:13:22 -07:00
diamondburned 95173b95f7
gateway: Add event op + type to unmarshal error 2024-04-23 23:06:35 -07:00
diamondburned 2fb68833e9
Bump dependencies manually 2024-04-10 17:57:15 -07:00
dependabot[bot] 43ca7e44ef build(deps): bump github.com/gorilla/websocket from 1.4.2 to 1.5.1
Bumps [github.com/gorilla/websocket](https://github.com/gorilla/websocket) from 1.4.2 to 1.5.1.
- [Release notes](https://github.com/gorilla/websocket/releases)
- [Commits](https://github.com/gorilla/websocket/compare/v1.4.2...v1.5.1)

---
updated-dependencies:
- dependency-name: github.com/gorilla/websocket
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-10 17:52:16 -07:00
dependabot[bot] b13ecfc357 build(deps): bump golang.org/x/time
Bumps [golang.org/x/time](https://github.com/golang/time) from 0.0.0-20210723032227-1f47c861a9ac to 0.5.0.
- [Commits](https://github.com/golang/time/commits/v0.5.0)

---
updated-dependencies:
- dependency-name: golang.org/x/time
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-10 17:51:58 -07:00
Diamond 88f3f6d073
Add dependabot.yml 2024-04-10 16:31:10 -07:00