1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-11-01 20:45:42 +00:00
Commit graph

1094 commits

Author SHA1 Message Date
diamondburned 169b361262 Gateway: Add Threads into GuildSubscribe 2021-01-01 00:33:35 -08:00
diamondburned c6d8c741e8 CI: Add perseverance test for Gateway 2020-12-31 23:48:29 -08:00
diamondburned 7b67a98405 Gateway: Prevent heartbeat reconnecting twice 2020-12-31 23:01:38 -08:00
diamondburned 2f6ab0d451 API: Fix atomic SIGSEGV in ARM 2020-12-31 10:24:51 -08:00
diamondburned f1f052180b Heart: Improve thread-safety and pace responsiveness
This commit consists of these smaller commits:

    Gateway: SessionID to be a method for thread safety

	This commit breaks the SessionID field of the Gateway struct to
	be thread-safe by wrapping its access with a read-write mutex.
	As this is a bug fix, it is reasonable of a breaking change

    Heart: Allow later binding of event channel

    Voice: Use the new Heart API

    Heart: Fixed data races

    Heart: Allow changing pace, thread-safe Heartbeat
2020-12-31 01:32:45 -08:00
diamondburned 700b55102d API: Added JoinInvite 2020-12-31 00:16:43 -08:00
diamondburned 05de2d7b61 Gateway: Made Shard field empty for default 2020-12-30 23:43:08 -08:00
diamondburned f3f075b27f API: Add get Note endpoint 2020-12-26 16:13:10 -08:00
diamondburned d69d6750dc API: Separated min function 2020-12-26 16:08:41 -08:00
diamondburned 088b304303 Gateway: Rename MessageNotifications to Notifications for consistency 2020-12-19 19:22:35 -08:00
diamondburned d5f3979f95 Gateway: Rename UserGuildMute to UserMuteConfig for correctness 2020-12-19 19:06:09 -08:00
diamondburned 7aff3f9f24 Gateway: Added MuteConfig into UserChannelOverride 2020-12-19 18:59:15 -08:00
diamondburned 4e62f120a2 Gateway: Readd Presences into Ready 2020-12-19 18:46:21 -08:00
diamondburned e0f051b4c6 Shellwords: Simpler error and implementation 2020-12-19 18:02:31 -08:00
diamondburned 3e2814748f Discord: Fixed Sticker rec bug, simpler TagList method 2020-12-19 16:08:28 -08:00
diamondburned 157d64b423 Moreatomic: Replaced invalid mutex with modified sync.Map impl 2020-12-19 02:35:13 -08:00
diamondburned 36c2f166be Moreatomic: Fixed upgradable mutex usage 2020-12-18 23:57:56 -08:00
diamondburned 3ddb472644 Moreatomic: Cave in and use upgradable mutex over sync.Map 2020-12-18 23:47:47 -08:00
diamondburned f11edb7260 State: Add Ready Supplement handlers 2020-12-18 22:51:26 -08:00
diamondburned c9dd51aeb6 Store: Fixed defaultstore out of bound error 2020-12-18 22:33:11 -08:00
diamondburned 88911a7d11 Store: Fixed defaultstore not accepting GroupDM channels 2020-12-18 22:18:04 -08:00
diamondburned 9df396bb7f Bot: Fixed unable to call Plumbed method by command 2020-12-18 15:00:21 -08:00
diamondburned 82006b622b CI: Bumped Dismock 2020-12-16 15:18:05 -08:00
diamondburned fdeff18f5d API: Fix integration test 2020-12-16 14:51:32 -08:00
diamondburned 78a76ecb42 Discord: Revert "APIEmoji shouldn't be path-encoded"
This reverts commit dae2a0ffc1.
2020-12-16 14:51:00 -08:00
diamondburned dae2a0ffc1 Discord: APIEmoji shouldn't be path-encoded 2020-12-16 14:30:00 -08:00
diamondburned 808dfb28bb httputil: Fixed Multipart writer not closing 2020-12-16 14:08:31 -08:00
diamondburned 1483dd71d8 Webhook: Shorter constructor function names 2020-12-16 13:22:26 -08:00
diamondburned 868825da7d Webhook: Breaking fix redundant type names 2020-12-16 13:17:56 -08:00
diamondburned 525d0bb3f6 API: Move ExecuteWebhookData, add package sendpart for uploads
This commit moved ExecuteWebhookData from package api to package webhook
inside package api. This change required splitting the multipart
abstractions away from package api, so they are now inside package
sendpart in utils.

This commit will break code that uploads anything, as the type name is
now sendpart.File from api.SendMessageFile. The behavior should be the
same as before.
2020-12-16 13:11:11 -08:00
diamondburned 91dc41e388 API: Expose Max fetch constants
This commit exposes the Max fetch constants to allow package users to
externally reimplement any part of the API abstractions without having
to redeclare more constants.
2020-12-16 12:26:25 -08:00
diamondburned 86756dfbaa Discord: Added typed APIEmoji
This commit adds a new discord.APIEmoji type along with changes to
certain methods in package API that utilizes this new type. Similarly to
typed snowflakes, this should help reduce mistakes when using the React
functions.
2020-12-16 12:24:23 -08:00
Maximilian von Lindern f887060983
Webhook: Add support for message edit and delete (#180)
* Webhook: Add support for message edit and delete
* Webhook: remove global functions
* Webhook: move package Webhook into api/
* Webhook: Moved (unused in API) data struct to package webhook

Co-authored-by: diamondburned <datutbrus@gmail.com>
2020-12-16 12:11:11 -08:00
diamondburned 9a820c3749 CI: Update Dismock 2020-12-15 14:16:12 -08:00
mavolin 7a7a56d613 State: remove redundant error return from NewFromSession 2020-12-15 08:32:18 -08:00
diamondburned 826b90a5f3 Bot: Start to add IntentGuilds for better caching 2020-12-14 14:54:56 -08:00
diamondburned b801e46760 Bot: Optional command when plumbed in Help, no more extra space 2020-12-14 14:18:04 -08:00
diamondburned 66c95761a7 Bot: Getter for Plumbed and Help generation fix 2020-12-14 13:43:36 -08:00
diamondburned d65807ce15 API: Potential rate limit fix for reactions 2020-12-11 17:58:52 -08:00
diamondburned 43e5eeafde Fixed FUNDING.yml 2020-12-11 16:50:47 -08:00
diamondburned 24a845ec11 Create FUNDING.yml 2020-12-11 16:50:20 -08:00
mavolin 9911a3d662 State: fix caching not working properly on user accounts 2020-12-08 11:50:35 -08:00
diamondburned 5e2af90fd0 Gateway: Rollback weird user changes 2020-12-01 18:07:42 -08:00
diamondburned 5a76b21ecf wsutil: Fixed irregular close 1000 error 2020-11-30 21:49:55 -08:00
diamondburned b8994ed0da Voice: Remove state-keeping of sessions
This commit gets rid of all the code that previously managed different
voice sessions in different guilds. This is because there is rarely ever
a need for this, and most bots that need this could do their own
keeping.

This change, although removes some features off of the package, adds a
lot of clarity on what to do exactly when it comes to connecting to a
voice channel.

In order to make the migration process a bit easier, an example has been
added which guides through using the voice.Session API.
2020-11-30 19:12:20 -08:00
diamondburned 6727f0e728 Voice: Fixed voice tests for new JoinChannel 2020-11-30 17:04:11 -08:00
diamondburned 4df72dc891 Voice: JoinChannel no longer takes in an extra GuildID 2020-11-30 16:58:28 -08:00
diamondburned 1463d6e675 Voice: Rename NewVoice... to New 2020-11-30 16:46:43 -08:00
diamondburned 0d427cab71 Voice: Allow New without intents 2020-11-30 16:42:26 -08:00
diamondburned 29582d6131 Bot: Allow both plumbed and normal commands
This commit changes the existing Plumb behavior to allow normal commands
to coexist along a plumbed command. This change allows certain behaviors
that would otherwise require manually switching on arguments.

An example use case of this change would be having a default behavior
when a subcommand call doesn't have a command name. For example, given
this code:

    func (b *Banana) Setup(sub *bot.Subcommand) { sub.SetPlumb(b.Help) }

    func (b *Banana) Green(*gateway.MessageCreateEvent) {}
    func (b *Banana) Help(*gateway.MessageCreateEvent)  {}

The subcommand "banana" could have its own help when it's called as
"!banana", while "!banana green" would trigger another handler.
2020-11-30 14:26:53 -08:00