discordrb 3.2.1 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of discordrb might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/.gitignore +4 -0
- data/.rubocop.yml +3 -3
- data/.travis.yml +28 -3
- data/.yardopts +1 -1
- data/CHANGELOG.md +555 -144
- data/CONTRIBUTING.md +1 -1
- data/Gemfile +0 -4
- data/README.md +86 -15
- data/Rakefile +2 -2
- data/bin/travis_build_docs.sh +17 -0
- data/discordrb-webhooks.gemspec +2 -1
- data/discordrb.gemspec +12 -5
- data/lib/discordrb.rb +2 -2
- data/lib/discordrb/api.rb +94 -25
- data/lib/discordrb/api/channel.rb +53 -17
- data/lib/discordrb/api/invite.rb +7 -4
- data/lib/discordrb/api/server.rb +173 -36
- data/lib/discordrb/api/user.rb +18 -4
- data/lib/discordrb/api/webhook.rb +83 -0
- data/lib/discordrb/await.rb +1 -1
- data/lib/discordrb/bot.rb +191 -102
- data/lib/discordrb/cache.rb +39 -9
- data/lib/discordrb/commands/command_bot.rb +79 -24
- data/lib/discordrb/commands/container.rb +16 -2
- data/lib/discordrb/commands/parser.rb +46 -7
- data/lib/discordrb/commands/rate_limiter.rb +8 -6
- data/lib/discordrb/container.rb +51 -7
- data/lib/discordrb/data.rb +1729 -286
- data/lib/discordrb/errors.rb +34 -1
- data/lib/discordrb/events/generic.rb +1 -1
- data/lib/discordrb/events/guilds.rb +1 -0
- data/lib/discordrb/events/message.rb +18 -12
- data/lib/discordrb/events/presence.rb +7 -2
- data/lib/discordrb/events/reactions.rb +13 -4
- data/lib/discordrb/events/roles.rb +7 -6
- data/lib/discordrb/events/typing.rb +1 -1
- data/lib/discordrb/events/webhooks.rb +61 -0
- data/lib/discordrb/gateway.rb +85 -32
- data/lib/discordrb/light.rb +1 -1
- data/lib/discordrb/logger.rb +8 -7
- data/lib/discordrb/permissions.rb +41 -4
- data/lib/discordrb/version.rb +1 -1
- data/lib/discordrb/voice/encoder.rb +10 -8
- data/lib/discordrb/voice/voice_bot.rb +4 -4
- data/lib/discordrb/websocket.rb +2 -2
- metadata +59 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b25d90cb65adea4d1dac0aa33b64f6451e1c21f7dbe13c48f2ae9d40ea5e2edf
|
4
|
+
data.tar.gz: 31e41074b2304456f73413af20ca1850757e34566af21067a4989656d78feb77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5bb79daa3219ec1c75f637ccaf39c71e943ba2e162c02ca46fd2775e7a746d4cfecafda8af8402d215936660249b96ae441632444d7718688badf19ae38f72fe
|
7
|
+
data.tar.gz: 71110b5df4bade1aac8d54b708bbc93b5a91d61c146eb56e9aa25a94f9dd0ff0f291db4c0c28589f095ab9fa19ed9204e50a0aaa920557c6fdc802d88eaa733a
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -48,9 +48,9 @@ Style/SingleLineBlockParams:
|
|
48
48
|
- inject: [m, e]
|
49
49
|
|
50
50
|
AllCops:
|
51
|
-
TargetRubyVersion: 2.
|
51
|
+
TargetRubyVersion: 2.2
|
52
52
|
|
53
|
-
#
|
53
|
+
# https://stackoverflow.com/q/4763121
|
54
54
|
Style/Alias:
|
55
55
|
Enabled: false
|
56
56
|
|
@@ -60,6 +60,6 @@ Style/NumericLiterals:
|
|
60
60
|
- examples/*
|
61
61
|
|
62
62
|
# Ignore `eval` in the examples folder
|
63
|
-
|
63
|
+
Security/Eval:
|
64
64
|
Exclude:
|
65
65
|
- examples/*
|
data/.travis.yml
CHANGED
@@ -1,8 +1,33 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 2.
|
4
|
-
|
3
|
+
- 2.2.10
|
4
|
+
- 2.3.7
|
5
|
+
- 2.4.4
|
6
|
+
- 2.5.1
|
7
|
+
before_script:
|
8
|
+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 -o ./cc-test-reporter
|
9
|
+
- chmod +x ./cc-test-reporter
|
10
|
+
- ./cc-test-reporter before-build
|
5
11
|
script:
|
6
12
|
- bundle exec rspec spec
|
7
|
-
- bundle exec codeclimate-test-reporter
|
8
13
|
- bundle exec rubocop -c .rubocop.yml
|
14
|
+
- bin/travis_build_docs.sh
|
15
|
+
after_script:
|
16
|
+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
17
|
+
deploy:
|
18
|
+
- provider: pages
|
19
|
+
skip-cleanup: true
|
20
|
+
github-token: $GITHUB_TOKEN
|
21
|
+
keep-history: true
|
22
|
+
local-dir: docs
|
23
|
+
on:
|
24
|
+
branch: master
|
25
|
+
rvm: 2.5.1
|
26
|
+
- provider: pages
|
27
|
+
skip-cleanup: true
|
28
|
+
github-token: $GITHUB_TOKEN
|
29
|
+
keep-history: true
|
30
|
+
local-dir: docs
|
31
|
+
on:
|
32
|
+
tags: true
|
33
|
+
rvm: 2.5.1
|
data/.yardopts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
--markup markdown --hide-tag todo
|
1
|
+
--markup markdown --hide-tag todo --fail-on-warning
|
data/CHANGELOG.md
CHANGED
@@ -1,22 +1,239 @@
|
|
1
1
|
# Changelog
|
2
|
+
All notable changes to this project will be documented in this file.
|
2
3
|
|
3
|
-
|
4
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
5
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
4
6
|
|
7
|
+
## Unreleased
|
8
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v3.3.0...HEAD)
|
9
|
+
|
10
|
+
## [3.3.0] - 2018-10-27
|
11
|
+
[3.3.0]: https://github.com/meew0/discordrb/releases/tag/v3.3.0
|
12
|
+
|
13
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v3.2.1...v3.3.0)
|
14
|
+
|
15
|
+
|
16
|
+
### Summary
|
17
|
+
|
18
|
+
3.3.0 brings discordrb up to speed with new features added to Discord's API over the last year. Included is a large number of fixes, optimizations, and library features.
|
19
|
+
|
20
|
+
Since there is a lot here, here are highlights of the more notable changes in this release:
|
21
|
+
|
22
|
+
- We now use SSL certificate validation in our gateway connections, and enforce use of TLSv1.2. If this is an issue
|
23
|
+
for your platform or environment (you get errors related to SSL), please report this with relevant details. You
|
24
|
+
can revert to the old codepath at any time by setting `DISCORDRB_SSL_VERIFY_NONE`. This environment variable will
|
25
|
+
be removed in a later release when this proves to be a stable default.
|
26
|
+
|
27
|
+
- `CommandBot` now supports a new method of "aliasing" commands with the `aliases:` keyword. It accepts an array
|
28
|
+
of symbols of alternate command names. Currently this is supported by passing an array of symbols for the command
|
29
|
+
name itself, but this essentially makes "copies" of the command, meaning each alias will show up in your help command.
|
30
|
+
Using `aliases` instead, the library will recognize that these other names *are aliases* instead of copying the command.
|
31
|
+
Aliases will be listed when users use `!help` with the command name, or any of its aliases. For now you may chose to use
|
32
|
+
either style, but you cannot use both. Specifying an array for the command name is now considered deprecated.
|
33
|
+
|
34
|
+
- There are now two methods of creating "awaits" in discordrb. The new style is a blocking (synchronous) method that
|
35
|
+
uses threads and regular event handlers in the background. The new methods are all named with a bang (`!`),
|
36
|
+
i.e. `user.await!`, `message.await!`, and simply return the raised event. This system should be less confusing that
|
37
|
+
the current asynchronous one. These blocking awaits no longer have an identifying key and only accept the event
|
38
|
+
attributes as an argument. There is also a special reserved attribute called `timeout` that will stop waiting for
|
39
|
+
an event and return `nil` if the given number of seconds has passed. Eventually this new system of awaits will
|
40
|
+
replace the old one in a later breaking change. A short example:
|
41
|
+
|
42
|
+
```ruby
|
43
|
+
bot.message(content: '!test') do |event|
|
44
|
+
event.respond 'What is your name?'
|
45
|
+
response = event.message.await!(timeout: 3)
|
46
|
+
if response
|
47
|
+
event.respond "Hello, #{response.message.content}!"
|
48
|
+
else
|
49
|
+
event.respond 'You took too long!'
|
50
|
+
end
|
51
|
+
end
|
52
|
+
```
|
53
|
+
|
54
|
+
The entire changelog follows, with items that contain breaking changes noted. If you use parts of the library
|
55
|
+
mentioned in a breaking change, you can read the PR and diff for the full details. If you need help with
|
56
|
+
understanding, updating your bot, or have any other questions, please feel free to [join us on Discord](https://discord.gg/cyK3Hjm)
|
57
|
+
or open an issue if necessary.
|
58
|
+
|
59
|
+
Thank you to all of our contributors!
|
60
|
+
|
61
|
+
### Added
|
62
|
+
|
63
|
+
- API methods to add and remove single member roles ([#310](https://github.com/meew0/discordrb/pull/310))
|
64
|
+
- **(breaking change)** API methods and abstractions for listing available voice regions ([#311](https://github.com/meew0/discordrb/pull/311))
|
65
|
+
- `Server` methods to prune members and to get the number of members available for pruning ([#315](https://github.com/meew0/discordrb/pull/315))
|
66
|
+
- Methods for filtering the kinds of overwrites present on a channel ([#321](https://github.com/meew0/discordrb/pull/321))
|
67
|
+
- `Channel#default_channel?`, for checking if a channel is the default channel of a server ([#320](https://github.com/meew0/discordrb/pull/320), thanks @Reaver01)
|
68
|
+
- Method for returning a `Server`'s `@everyone` role
|
69
|
+
- Reactions can now be serialized with `#to_s` to be used in `Message#react` more easily ([#342](https://github.com/meew0/discordrb/pull/342))
|
70
|
+
- Additional objects and attributes for parsing embeds on messages ([#344](https://github.com/meew0/discordrb/pull/344), thanks @mattantonelli)
|
71
|
+
- Methods for finding a members highest role, the role that is hoisting the member, or giving the member color ([#335](https://github.com/meew0/discordrb/pull/335), thanks @Snazzah)
|
72
|
+
- API support for managing webhooks ([#356](https://github.com/meew0/discordrb/pull/356), thanks @Daniel-Worrall)
|
73
|
+
- Support for reading and managing a channel's `nsfw` property ([#380](https://github.com/meew0/discordrb/pull/380))
|
74
|
+
- The `:administrator` permissions value is aliased as `:administrate` ([#322](https://github.com/meew0/discordrb/pull/322))
|
75
|
+
- Class methods on `Permissions` for easily building permissions bits values ([#322](https://github.com/meew0/discordrb/pull/322))
|
76
|
+
- `Gateway#send_packet` and `Gateway#send_raw` methods to send custom data payloads to the gateway
|
77
|
+
- Methods for reading `icon_url` and `proxy_icon_url` in `EmbedAuthor`
|
78
|
+
- Methods for obtaining a server and channels invites ([#394](https://github.com/meew0/discordrb/pull/394))
|
79
|
+
- Example of using awaits ([#370](https://github.com/meew0/discordrb/pull/370))
|
80
|
+
- Methods on `Member` for kicking and banning ([#404](https://github.com/meew0/discordrb/pull/404))
|
81
|
+
- API method and abstraction for adding members to guilds with OAuth2 tokens ([#413](https://github.com/meew0/discordrb/pull/413))
|
82
|
+
- Example of using a prefix proc ([#411](https://github.com/meew0/discordrb/pull/411))
|
83
|
+
- **(breaking change)** Methods for managing a server's system channel ([#437](https://github.com/meew0/discordrb/pull/437), thanks @ldelelis)
|
84
|
+
- **(breaking change)** Additional error code constants ([#419](https://github.com/meew0/discordrb/pull/419), thanks @LikeLakers2)
|
85
|
+
- Commands can be created with a `:rescue` argument, to provide a message or callback when an unhandled exception is raised when executing the command ([#360](https://github.com/meew0/discordrb/pull/360))
|
86
|
+
- **(breaking change)** Additional `Server` properties for verification levels, default message notification levels, and explicit content filter settings ([#414](https://github.com/meew0/discordrb/pull/414), thanks @PixeLInc)
|
87
|
+
- **(breaking change)** `nonce` is accepted in `API::Channel.create_message` ([#414](https://github.com/meew0/discordrb/pull/414), thanks @PixeLInc)
|
88
|
+
- Setters for new status options (`Bot#listening=`, `Bot#watching=`) ([#432](https://github.com/meew0/discordrb/pull/432), thanks @PixeLInc)
|
89
|
+
- Documentation examples for sending a file ([#409](https://github.com/meew0/discordrb/pull/409))
|
90
|
+
- Respondable implements `#send_embed` ([#420](https://github.com/meew0/discordrb/pull/420))
|
91
|
+
- `Invite` now supplies `max_age` and `created_at`
|
92
|
+
- `Invite` now supplies `member_count` and `online_member_count` ([#454](https://github.com/meew0/discordrb/pull/454), thanks @Snazzah)
|
93
|
+
- `Server` methods for managing a server's embed (widget) settings ([#435](https://github.com/meew0/discordrb/pull/435))
|
94
|
+
- **(breaking change)** Support for category channels in `Server` and `Channel` ([#415](https://github.com/meew0/discordrb/pull/415), [#477](https://github.com/meew0/discordrb/pull/477), thanks @omnilord)
|
95
|
+
- `CommandBot` and commands channel whitelist can now be modified after creation ([#446](https://github.com/meew0/discordrb/pull/446), thanks @omnilord)
|
96
|
+
- A `Role`'s `position` can now be sorted relative to other roles ([#445](https://github.com/meew0/discordrb/pull/445), thanks @mattantonelli)
|
97
|
+
- The `return` keyword inside of commands can be used to return content to Discord ([#462](https://github.com/meew0/discordrb/pull/462), thanks @TrenchFroast)
|
98
|
+
- `Emoji` now supplies `animated` ([#464](https://github.com/meew0/discordrb/pull/464), thanks @PixeLInc)
|
99
|
+
- Additional instructions for installation of Ruby's devkit for Ruby 2.3+ ([#468](https://github.com/meew0/discordrb/pull/468), thanks @oct2pus)
|
100
|
+
- `Server` API for retrieving a server's audit logs ([#353](https://github.com/meew0/discordrb/pull/353), thanks @Snazzah)
|
101
|
+
- `EventContainer` methods for server role create, delete, and update events ([#494](https://github.com/meew0/discordrb/pull/494), thanks @Daniel-Worrall)
|
102
|
+
- `PlayingEvent` now returns `details` ([#486](https://github.com/meew0/discordrb/pull/486), thanks @xTVaser)
|
103
|
+
- `Role` now supplies `server` ([#505](https://github.com/meew0/discordrb/pull/505), thanks @micke)
|
104
|
+
- Documentation for the `discordrb-webhooks` gem in `README.md` ([#460](https://github.com/meew0/discordrb/pull/460))
|
105
|
+
- A new, synchronous awaits system available via `#await!` ([#499](https://github.com/meew0/discordrb/pull/499))
|
106
|
+
- `Channel#sort_after`, for moving a channel around a server within categories easily ([#497](https://github.com/meew0/discordrb/pull/497))
|
107
|
+
- The gemspec now includes a link to the changelog ([#515](https://github.com/meew0/discordrb/pull/515), thanks @ChallahuAkbar)
|
108
|
+
- Commands can now be restricted by either `allowed_roles` or `required_roles` ([#469](https://github.com/meew0/discordrb/pull/469), thanks @elfenars)
|
109
|
+
- `Bot#parse_mention` parses `Channel` mentions ([#525](https://github.com/meew0/discordrb/pull/525), thanks @estherbolik)
|
110
|
+
- Support for Discord's `zlib-stream` gateway compression, as well as options to configure the compression mode in `Bot#initialize` ([#527](https://github.com/meew0/discordrb/pull/527), thanks @oct2pus for additional testing)
|
111
|
+
- "Priority Speaker" permission bit ([#530](https://github.com/meew0/discordrb/pull/530), thanks @Chewsterchew)
|
112
|
+
- Implemented `aliases` attribute in commands, for an improved alternative to "command copying" by passing an array to the command name ([#524](https://github.com/meew0/discordrb/pull/524))
|
113
|
+
- **(breaking change)** Methods for managing a `Channel`'s slowmode settings ([#573](https://github.com/meew0/discordrb/pull/573), thanks @badBlackShark)
|
114
|
+
|
115
|
+
### Changed
|
116
|
+
|
117
|
+
- `Channel#make_invite` now accepts an argument to always return a unique invite code ([#312](https://github.com/meew0/discordrb/pull/312))
|
118
|
+
- More of the API accepts objects that respond to `#resolve_id` ([#313](https://github.com/meew0/discordrb/pull/313), [#328](https://github.com/meew0/discordrb/pull/328), thanks @Likelakers2)
|
119
|
+
- **(breaking change)** `Channel#history` and `API::Channel.messages` now accepts `around_id` ([#314](https://github.com/meew0/discordrb/pull/314))
|
120
|
+
- **(breaking change)** `API::Server.prune_count` accepts `days` ([#315](https://github.com/meew0/discordrb/pull/315))
|
121
|
+
- **(breaking change)** Methods for creating channels accept additional arguments ([#321](https://github.com/meew0/discordrb/pull/321))
|
122
|
+
- `Channel` overwrite-related API now returns an `Overwrite` object ([#321](https://github.com/meew0/discordrb/pull/321))
|
123
|
+
- **(breaking change)** Creating roles now accepts more parameters ([#323](https://github.com/meew0/discordrb/pull/323), thanks @Reaver01)
|
124
|
+
- Rate limits are now logged to a `:ratelimit` logging level and can be configured
|
125
|
+
- `client_id` in `Bot#initilalize` is now optional, and will be cached automatically by the API when needed ([#337](https://github.com/meew0/discordrb/pull/337))
|
126
|
+
- `Voice::Encoder#encode_file` now accepts options for ffmpeg ([#341](https://github.com/meew0/discordrb/pull/341), thanks @oyisre)
|
127
|
+
- Objects that implement `IDObject` can now be compared using more operators ([#346](https://github.com/meew0/discordrb/pull/346), thanks @mattantonelli)
|
128
|
+
- Filled in permissions bit for viewing a server's audit log ([#349](https://github.com/meew0/discordrb/pull/349), thanks @Daniel-Worrall)
|
129
|
+
- https://cdn.discordapp.com is now used as the base URL for CDN resources like avatars and server icons ([#358](https://github.com/meew0/discordrb/pull/358))
|
130
|
+
- Reaction events raised from the bot's actions will respect `parse_self` ([#350](https://github.com/meew0/discordrb/pull/350), thanks @Daniel-Worrall)
|
131
|
+
- `Webhooks::Embed#initialize` parses its `color`/`colour` argument ([#364](https://github.com/meew0/discordrb/pull/364), thanks @Daniel-Worrall)
|
132
|
+
- Webhook related events can now be matched on webhook ID ([#363](https://github.com/meew0/discordrb/pull/363), thanks @Daniel-Worrall)
|
133
|
+
- Discord's default user avatar URLs will now be returned when applicable ([#375](https://github.com/meew0/discordrb/pull/375))
|
134
|
+
- `Cache#find_user` can now find individual users if name and discriminator is given ([#384](https://github.com/meew0/discordrb/pull/384))
|
135
|
+
- `ReactionEvent` provides both `server` and `member`, if possible ([#351](https://github.com/meew0/discordrb/pull/351), thanks @Daniel-Worrall)
|
136
|
+
- Installation instructions now include guides for installing with Bundler ([#386](https://github.com/meew0/discordrb/pull/386), [#405](https://github.com/meew0/discordrb/pull/405), thanks @VxJasonxV and @PixeLInc)
|
137
|
+
- **(breaking change)** `default_channel` implementation is updated to reflect Discord changes ([#382](https://github.com/meew0/discordrb/pull/382), [#534](https://github.com/meew0/discordrb/pull/534))
|
138
|
+
- Documentation around the conditions where our API returns `nil` is clarified ([#395](https://github.com/meew0/discordrb/pull/395), thanks @LikeLakers2)
|
139
|
+
- Whenever possible, we update cached data about a `Server` returned to us from making changes to it
|
140
|
+
- **(breaking change)** `Cache#server` now returns `nil` if a server is not found instead of raising an exception ([#424](https://github.com/meew0/discordrb/pull/424), thanks @soukouki)
|
141
|
+
- `Bucket#rate_limited?` now accepts an `increment` value for weighted rate limits ([#427](https://github.com/meew0/discordrb/pull/427), thanks @Lavode)
|
142
|
+
- **(breaking change)** `Server#bans` now returns `Array<ServerBan>`, which contains `reason` data in addition to the user banned ([#404](https://github.com/meew0/discordrb/pull/404))
|
143
|
+
- `Channel#prune` now accepts a block that can be used to filter the messages to be pruned ([#421](https://github.com/meew0/discordrb/pull/421), thanks @snapcase)
|
144
|
+
- WSCS verions message is now only printed when using voice functionality ([#438](https://github.com/meew0/discordrb/pull/438), thanks @dreid)
|
145
|
+
- **(breaking change)** `API::Server.update_channel` is now `API::Server.update_channel_positions`
|
146
|
+
- CI is now tested against Ruby 2.3, 2.4, and 2.5 ([#476](https://github.com/meew0/discordrb/pull/476), thanks @nicolasleger)
|
147
|
+
- CI now tests with YARD to validate docstrings
|
148
|
+
- Specs for `Channel` are refactored ([#481](https://github.com/meew0/discordrb/pull/481), thanks @Daniel-Worrall)
|
149
|
+
- Specs are refactored to not use `module` namespaces ([#520](https://github.com/meew0/discordrb/pull/520), thanks @Daniel-Worrall)
|
150
|
+
- `Bot` now logs to `LOGGER.info` when the bot successfully resumes
|
151
|
+
- Code climate tooling is updated ([#489](https://github.com/meew0/discordrb/pull/489), thanks @ChallahuAkbar)
|
152
|
+
- `Bot#parse_mention` will now return an `Emoji` object for a mention of an emoji the bot isn't connected to ([#473](https://github.com/meew0/discordrb/pull/473))
|
153
|
+
- The changelog now follows the "Keep a Changelog" format ([#504](https://github.com/meew0/discordrb/pull/504), thanks @connorshea)
|
154
|
+
- `Bot#run` documentation is adjusted to clarify the use of its async argument ([#521](https://github.com/meew0/discordrb/pull/521))
|
155
|
+
- **(breaking change)** `Bot#join` is renamed to `Bot#accept_invite` ([#521](https://github.com/meew0/discordrb/pull/521))
|
156
|
+
- `Embed#colour=`/`Embed#color=` now accepts instances of `ColourRGB`/`ColorRGB` ([#523](https://github.com/meew0/discordrb/pull/523))
|
157
|
+
- `Gateway` now performs certificate validation, and enforces use of TLSv1.2. If you experience issues (please report them!), you can return to the old codepath by setting `DISCORDRB_SSL_VERIFY_NONE` ([#528](https://github.com/meew0/discordrb/pull/528), thanks @cky)
|
158
|
+
- Documentation clarifications around `voice_state_update`, `member_update`, and `server_create` ([#531](https://github.com/meew0/discordrb/pull/531))
|
159
|
+
- URLs listed across the code base now use https, various other cleanups ([#540](https://github.com/meew0/discordrb/pull/540), thanks @ChallahuAkbar)
|
160
|
+
- Dependency on the `ffi` gem is restricted to `>= 1.9.24` to prevent a security exploit on Windows, per [CVE-2018-1000201](https://nvd.nist.gov/vuln/detail/CVE-2018-1000201) ([#544](https://github.com/meew0/discordrb/pull/544))
|
161
|
+
- Warnings about accessing cached data after server streaming times out are now clarified and printed when accessing relevant methods ([#578](https://github.com/meew0/discordrb/pull/578), thanks @connorshea)
|
162
|
+
|
163
|
+
### Deprecated
|
164
|
+
|
165
|
+
- The existing awaits system is deprecated in favor of a simpler, synchronous system introduced in [#499](https://github.com/meew0/discordrb/pull/499) ([#509](https://github.com/meew0/discordrb/pull/509))
|
166
|
+
|
167
|
+
### Removed
|
168
|
+
|
169
|
+
- **(breaking change)** Unsupported `mentions` argument in Create Message API ([#420](https://github.com/meew0/discordrb/pull/420))
|
170
|
+
- **(breaking change)** `TrueClass` is no longer an alias for `:debug` logging in `Bot#initialize`
|
171
|
+
|
172
|
+
### Fixed
|
173
|
+
|
174
|
+
- `Errors::MessageTooLong` is now raised correctly ([#325](https://github.com/meew0/discordrb/pull/325), thanks @Daniel-Worrall)
|
175
|
+
- Certain `Reaction` related events properly inherit `Event` ([#329](https://github.com/meew0/discordrb/pull/329), thanks @valeth)
|
176
|
+
- Permissions calculation now takes the server's `@everyone` role permissions into consideration (additional work by [#357](https://github.com/meew0/discordrb/pull/357), thanks @mattantonelli)
|
177
|
+
- `Role#members` had a typo preventing it from working ([#340](https://github.com/meew0/discordrb/pull/340))
|
178
|
+
- `Message#my_reactions` now correctly returns `Array<Reaction>` ([#342](https://github.com/meew0/discordrb/pull/342))
|
179
|
+
- Several internal checks have been added to make bots more resilient to zombie connections
|
180
|
+
- Documentation for `TypingEvent` is now more accurate ([#367](https://github.com/meew0/discordrb/pull/367), thanks @Snazzah)
|
181
|
+
- Corrected implementation of the `reason` parameter in various API ([#372](https://github.com/meew0/discordrb/pull/372))
|
182
|
+
- `CommandBot`'s advanced functionality properly handles empty strings in certain settings ([#379](https://github.com/meew0/discordrb/pull/379), thanks @LikeLakers2)
|
183
|
+
- Rate limit headers are processed correctly when running into certain API exceptions ([#440](https://github.com/meew0/discordrb/pull/440), thanks @unleashy)
|
184
|
+
- Typos preventing `ArgumentError` from being raised when processing `arg_types` ([#400](https://github.com/meew0/discordrb/pull/400), thanks @Daniel-Worrall)
|
185
|
+
- `Server#create_role` correctly accepts a `ColourRGB`/`ColorRGB` via `#combined`
|
186
|
+
- `EventContainer#add_handler` correctly adds handlers for events that haven't had internal storage created for them yet
|
187
|
+
- When a server is initially cached, its channels are now cached in a way that prevents REST exceptions from being raised when attempting to process gateway events with uncached channels as a subject ([#391](https://github.com/meew0/discordrb/pull/391))
|
188
|
+
- Await event matching now considers specific subclasses, preventing certain awaits to be triggered wrongly on different events in the same class tree ([#431](https://github.com/meew0/discordrb/pull/431))
|
189
|
+
- Bulk deleting messages properly filters out messages older than two weeks ([#439](https://github.com/meew0/discordrb/pull/439), thanks @Emberwalker)
|
190
|
+
- Rate limiting when certain API errors occur are handled properly ([#440](https://github.com/meew0/discordrb/pull/440), thanks @unleashy)
|
191
|
+
- Querying the cache for an unknown member no longer adds `nil` elements, which caused unexpected behavior ([#456](https://github.com/meew0/discordrb/pull/456))
|
192
|
+
- Logging behaves correctly when token is an empty string ([#449](https://github.com/meew0/discordrb/pull/449), thanks @Daniel-Worrall)
|
193
|
+
- Several typos in documentation ([#444](https://github.com/meew0/discordrb/pull/444), thanks @ToppleKek)
|
194
|
+
- When possible, `User` objects are now cached from messages instead of making an API request that may fail
|
195
|
+
- `rest-client` is upgraded to `>= 2.1.0.rc1`, as `2.1.0` is completely broken on Windows with Ruby 2.5 ([#478](https://github.com/meew0/discordrb/pull/478), thanks @Daniel-Worrall and @swarley)
|
196
|
+
- `EmbedAuthor` sets the correct instance variable for `proxy_icon_url`
|
197
|
+
- `ReactionEvent` correctly returns the server on which it occurred ([#484](https://github.com/meew0/discordrb/pull/484), thanks @charagarlnad)
|
198
|
+
- `ServerRoleCreateEvent` no longer fails to match when supplying a `name` attribute ([#493](https://github.com/meew0/discordrb/pull/493), [#506](https://github.com/meew0/discordrb/pull/506), thanks @Daniel-Worrall and @micke)
|
199
|
+
- `PlayingEvent` now correctly returns `server` ([#486](https://github.com/meew0/discordrb/pull/486), thanks @xTVaser)
|
200
|
+
- Roles will no longer be cached twice when using `Server#create_role` ([#488](https://github.com/meew0/discordrb/pull/488))
|
201
|
+
- Race condition when creating event handlers inside of other event handlers ([#514](https://github.com/meew0/discordrb/pull/514))
|
202
|
+
- Command chain execution is halted immediately if `execute_command` fails, fixing some possible errors that could occur with `advanced_functionality` ([#517](https://github.com/meew0/discordrb/pull/517), thanks @unleashy)
|
203
|
+
- In the event non-existent role IDs are observed in a member object, they are ignored to prevent cache related errors ([#535](https://github.com/meew0/discordrb/pull/535))
|
204
|
+
- `end_with` attribute in `MessageEventHandler` now accepts group-less regular expressions without throwing exceptions ([#571](https://github.com/meew0/discordrb/pull/571), thanks @badBlackShark)
|
205
|
+
- `PresenceEvent` is correctly raised when dispatched ([#574](https://github.com/meew0/discordrb/pull/574))
|
206
|
+
- `Attachment#initialize` correctly sets `@id` instance variable ([#575](https://github.com/meew0/discordrb/pull/575), thanks @kandayo)
|
207
|
+
|
208
|
+
## [3.2.1] - 2017-02-18
|
209
|
+
[3.2.1]: https://github.com/meew0/discordrb/releases/tag/v3.2.1
|
210
|
+
|
211
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v3.2.0.1...v3.2.1)
|
212
|
+
|
213
|
+
### Changed
|
5
214
|
- `Bot#stop` and `Gateway#stop` now explicitly return `nil`, for more convenient use in commands
|
6
215
|
- The API method to query for users has been removed as the endpoint no longer exists
|
7
216
|
- Some more methods have been changed to resolve IDs, which means they can be called with integer and string IDs instead of just the objects ([#313](https://github.com/meew0/discordrb/pull/313), thanks @LikeLakers2)
|
8
217
|
- Bulk deleting now uses the new non-deprecated URL – this has no immediate effect, but once the old one will be removed bots using it will not be able to bulk delete anymore (see also [#309](https://github.com/meew0/discordrb/issues/309))
|
9
|
-
### Bugfixes
|
10
218
|
|
11
|
-
|
219
|
+
### Fixed
|
220
|
+
- Fixed another bug with resumes that caused issues when resuming a zombie connection
|
12
221
|
- Fixed a bug that caused issues when playing short files ([#326](https://github.com/meew0/discordrb/issues/316))
|
13
222
|
|
14
|
-
## 3.2.0.1
|
223
|
+
## [3.2.0.1] - 2017-01-29
|
224
|
+
[3.2.0.1]: https://github.com/meew0/discordrb/releases/tag/v3.2.0.1
|
225
|
+
|
226
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v3.2.0...v3.2.0.1)
|
15
227
|
|
228
|
+
### Fixed
|
16
229
|
- Attempt to fix an issue that causes a strange problem with dependencies when installing discordrb
|
17
230
|
|
18
|
-
## 3.2.0
|
231
|
+
## [3.2.0] - 2017-01-29
|
232
|
+
[3.2.0]: https://github.com/meew0/discordrb/releases/tag/v3.2.0
|
19
233
|
|
234
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v3.1.1...v3.2.0)
|
235
|
+
|
236
|
+
### Added
|
20
237
|
- Various parts of gateway error handling were improved, leading to significant stability improvements:
|
21
238
|
- A long standing bug was fixed that prevented resumes in most cases, which caused unnecessary reconnections.
|
22
239
|
- The error handler that handles problems with sending the raw data over TCP now catches errors more broadly.
|
@@ -27,25 +244,24 @@
|
|
27
244
|
- Rich embeds can now be sent alongside messages, for example using the `embed` parameter in `send_message`, or with the new method `Channel#send_embed`
|
28
245
|
- `advanced_functionality` bots now support escaping using backslashes ([#293](https://github.com/meew0/discordrb/issues/293) / [#304](https://github.com/meew0/discordrb/pull/304), thanks @LikeLakers2)
|
29
246
|
- Added type checking and conversion for commands ([#298](https://github.com/meew0/discordrb/pull/298), thanks @ohtaavi)
|
30
|
-
- Bulk deleting messages now checks for message age (see also [
|
247
|
+
- Bulk deleting messages now checks for message age (see also [discordapp/discord-api-docs#208](https://github.com/discordapp/discord-api-docs/issues/208)). By default, it will ignore messages that are too old to be bulk deleted, but there is also a `strict` mode setting now that raises an exception in such a case.
|
31
248
|
- Reactions can now be viewed for existing messages ([#262](https://github.com/meew0/discordrb/pull/262), thanks @z64), added to messages ([#266](https://github.com/meew0/discordrb/pull/266), thanks @z64), and listened for using gateway events as well as internal handlers ([#300](https://github.com/meew0/discordrb/issues/300)).
|
32
249
|
- Game types and stream URLs are now cached ([#297](https://github.com/meew0/discordrb/issues/297))
|
33
|
-
- The default non-streaming game was changed to be `0` instead of `nil` ([#277](https://github.com/meew0/discordrb/pull/277), thanks @zeyla)
|
250
|
+
- The default non-streaming game was changed to be `0` instead of `nil` ([#277](https://github.com/meew0/discordrb/pull/277), thanks @zeyla)
|
34
251
|
- A method `Channel#delete_message` was added to support deleting single messages by ID without prior resolution.
|
35
252
|
- Permission overwrites can now be deleted from channels ([#268](https://github.com/meew0/discordrb/pull/268), thanks @greenbigfrog)
|
36
253
|
- There is now a utility method `IDObject.synthesise` that creates snowflakes with specific timestamps out of thin air.
|
37
254
|
- Typing events are now respondable, so you can call `#respond` on them for example ([#270](https://github.com/meew0/discordrb/pull/270), thanks @VxJasonxV)
|
38
255
|
- Message authors can now be `User` objects if a `Member` object could not be found or created ([#290](https://github.com/meew0/discordrb/issues/290))
|
39
256
|
- Added two new events, `unknown` ([#288](https://github.com/meew0/discordrb/issues/288)) and `raw`, that are raised for unknown dispatches and all dispatches, respectively.
|
40
|
-
- Bots can now be set to fully ignore other bots ([#257](https://github.com/meew0/discordrb/pull/257), thanks @greenbigfrog)
|
257
|
+
- Bots can now be set to fully ignore other bots ([#257](https://github.com/meew0/discordrb/pull/257), thanks @greenbigfrog)
|
41
258
|
- Voice state update events now have an `old_channel` property/attribute that denotes the previous channel the user was in in case of joining/moving/leaving.
|
42
259
|
- The default help command no longer shows commands the user can't use ([#275](https://github.com/meew0/discordrb/pull/275), thanks @FormalHellhound)
|
43
260
|
- Updated the command example to no longer include user-specific stuff ([#260](https://github.com/meew0/discordrb/issues/260))
|
44
261
|
- `Server#role` now resolves IDs, so they can be passed as strings if necessary.
|
45
262
|
|
46
|
-
###
|
47
|
-
|
48
|
-
- Fixed bots' shard settings being ignored in certain cases
|
263
|
+
### Fixed
|
264
|
+
- Fixed bots' shard settings being ignored in certain cases
|
49
265
|
- Parsing role mentions using `Bot#parse_mention` works properly now.
|
50
266
|
- Fixed some specific REST methods that were broken by the API module refactor ([#302](https://github.com/meew0/discordrb/pull/302), thanks @LikeLakers2)
|
51
267
|
- Cached channel data is now updated properly on change ([#272](https://github.com/meew0/discordrb/issues/272))
|
@@ -62,18 +278,22 @@
|
|
62
278
|
- It no longer fails completely if called from PM if there are any commands that require server-specific checks ([#308](https://github.com/meew0/discordrb/issues/308))
|
63
279
|
- Fixed a slight formatting mistake
|
64
280
|
- Quoted command arguments in `advanced_functionality` are no longer split by newline
|
65
|
-
- Fixed a specific edge case in command chain handling where handling commands with the same name as the chain delimiter was broken
|
281
|
+
- Fixed a specific edge case in command chain handling where handling commands with the same name as the chain delimiter was broken
|
66
282
|
|
67
|
-
## 3.1.1
|
283
|
+
## [3.1.1] - 2016-10-21
|
284
|
+
[3.1.1]: https://github.com/meew0/discordrb/releases/tag/v3.1.1
|
68
285
|
|
69
|
-
|
70
|
-
|
71
|
-
### Bugfixes
|
286
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v3.1.0...v3.1.1)
|
72
287
|
|
288
|
+
### Fixed
|
73
289
|
- An oversight where a `GUILD_DELETE` dispatch would cause an internal error was fixed. ([#256](https://github.com/meew0/discordrb/pull/256), thanks @greenbigfrog)
|
74
290
|
|
75
|
-
## 3.1.0
|
291
|
+
## [3.1.0] - 2016-10-20
|
292
|
+
[3.1.0]: https://github.com/meew0/discordrb/releases/tag/v3.1.0
|
293
|
+
|
294
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v3.0.2...v3.1.0)
|
76
295
|
|
296
|
+
### Added
|
77
297
|
- Emoji handling support ([#226](https://github.com/meew0/discordrb/pull/226), thanks @greenbigfrog)
|
78
298
|
- A `channels` attribute has been added to `CommandBot` as well as `Command` to restrict the channels in which either of the two works ([#249](https://github.com/meew0/discordrb/pull/249), thanks @Xzanth)
|
79
299
|
- The bulk deletion endpoint is now exposed directly using the `Channel#delete_messages` method ([#235](https://github.com/meew0/discordrb/pull/235), thanks @z64)
|
@@ -81,8 +301,7 @@
|
|
81
301
|
- A few examples have been added to the docs ([#250](https://github.com/meew0/discordrb/pull/250), thanks @SunDwarf)
|
82
302
|
- The specs have been improved; they're still not exhaustive by far but there are at least slightly more now.
|
83
303
|
|
84
|
-
###
|
85
|
-
|
304
|
+
### Fixed
|
86
305
|
- Fixed an important bug that caused the logger not to work in some cases. ([#243](https://github.com/meew0/discordrb/pull/243), thanks @Daniel-Worrall)
|
87
306
|
- Fixed logger token redaction.
|
88
307
|
- `unavailable_servers` should no longer crash the bot due to being nil in some cases ([#244](https://github.com/meew0/discordrb/pull/244), thanks @Daniel-Worrall)
|
@@ -90,36 +309,46 @@
|
|
90
309
|
- A `CommandBot` without any commands should no longer crash when receiving a message that triggers it ([#242](https://github.com/meew0/discordrb/issues/242))
|
91
310
|
- Changing nicknames works again, it has apparently been broken in 3.0.0.
|
92
311
|
|
93
|
-
## 3.0.2
|
312
|
+
## [3.0.2] - 2016-10-07
|
313
|
+
[3.0.2]: https://github.com/meew0/discordrb/releases/tag/v3.0.2
|
94
314
|
|
95
|
-
|
315
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v3.0.1...v3.0.2)
|
96
316
|
|
97
|
-
###
|
317
|
+
### Changed
|
318
|
+
- A small change to how CommandBot parameter lists are formatted ([#240](https://github.com/meew0/discordrb/pull/240), thanks @FormalHellhound)
|
98
319
|
|
320
|
+
### Fixed
|
99
321
|
- Setting properties on a channel (e.g. `Channel#topic=`) works again ([#238](https://github.com/meew0/discordrb/issues/238) / [#239](https://github.com/meew0/discordrb/pull/239), thanks @Daniel-Worrall)
|
100
322
|
|
101
|
-
## 3.0.1
|
323
|
+
## [3.0.1] - 2016-10-01
|
324
|
+
[3.0.1]: https://github.com/meew0/discordrb/releases/tag/v3.0.1
|
325
|
+
|
326
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v3.0.0...v3.0.1)
|
102
327
|
|
103
328
|
A tiny update to support webhook-sent messages properly!
|
104
329
|
|
330
|
+
### Added
|
105
331
|
- Added the utility methods `Message#webhook?` and `User#webhook?` to check whether a message or a user belongs to a webhook
|
106
332
|
- Added `Message#webhook_id` to get the ID of the sending webhook for webhook messages
|
107
333
|
- Added the `webhook_commands` parameter to CommandBot that, if false (default true), prevents webhook-sent messages from being parsed and handled as commands.
|
108
334
|
|
109
|
-
###
|
110
|
-
|
335
|
+
### Fixed
|
111
336
|
- Fixed webhook-sent messages being ignored because their author couldn't be resolved.
|
112
337
|
- Fixed a minor performance problem where a CommandBot would create unnecessarily create redundant objects for every received message.
|
113
338
|
|
114
|
-
## 3.0.0
|
339
|
+
## [3.0.0] - 2016-09-30
|
340
|
+
[3.0.0]: https://github.com/meew0/discordrb/releases/tag/v3.0.0
|
341
|
+
|
342
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v2.1.3...v3.0.0)
|
115
343
|
|
116
344
|
I didn't think there could possibly be a release larger than 2.0.0 was, but here it is! Including the respective release commit, there were 540 commits from 1.8.1 to 2.0.0, but a whopping 734 commits from 2.1.3 to 3.0.0.
|
117
345
|
|
118
346
|
As with 2.0.0, there are some breaking changes! They are, as always, highlighted in bold.
|
119
347
|
|
348
|
+
### Added
|
120
349
|
- **The `application_id` parameter has been renamed to `client_id`**. With the changes to how bot applications work, it would just be confusing to have it be called `application_id` any longer. If you try to use `application_id` now, it will raise a descriptive exception; with 3.1.0 that will be removed too (you'll get a less descriptive exception).
|
121
350
|
- The gateway implementation has been completely rewritten, for more performance, stability and maintainability. This means that **to call some internal methods like `inject_reconnect`, a `Gateway` instance (available as `Bot#gateway`) now needs to be used.**
|
122
|
-
- **User login using email and password has been removed**. Use a user token instead, see also [here](https://github.com/
|
351
|
+
- **User login using email and password has been removed**. Use a user token instead, see also [here](https://github.com/discordapp/discord-api-docs/issues/69#issuecomment-223886862).
|
123
352
|
- In addition to the rewrite, the gateway version has also been upgraded to protocol version 6 (the rewrite was for v5). **With this, the way channel types are handled has been changed a bit!** If you've been using the abstraction methods like `Channel#voice?`, you should be fine though. This also includes support for group chats on user accounts, as that was the only real functionality change on v6. ([#211](https://github.com/meew0/discordrb/pull/211), thanks @Daniel-Worrall)
|
124
353
|
- **Custom prefix handlers for `CommandBot`s now get the full message object as their parameter rather than only the content**, for even more flexibility.
|
125
354
|
- For internal consistency, **the `UnknownGuild` error was renamed to `UnknownServer`**. I doubt this change affects anyone, but if you handle that error specifically in your bot, make sure to change it.
|
@@ -161,14 +390,13 @@ As with 2.0.0, there are some breaking changes! They are, as always, highlighted
|
|
161
390
|
- A method `Bot#connected?` has been added to check whether the bot is currently connected to the gateway.
|
162
391
|
- The indescriptive error message that was previously sent when calling methods like `Bot#game=` without an active gateway connection has been replaced with a more descriptive one.
|
163
392
|
- The bot's token is now, by default, redacted from any logging output; this can be turned off if desired using the `redact_token` initialization parameter. ([#225](https://github.com/meew0/discordrb/issues/225) / [#231](https://github.com/meew0/discordrb/pull/231), thanks @Daniel-Worrall)
|
164
|
-
- The new rate limit headers are now supported. This will have no real impact on any code using discordrb, but it means discordrb is now considered compliant again. See also [here](https://github.com/
|
393
|
+
- The new rate limit headers are now supported. This will have no real impact on any code using discordrb, but it means discordrb is now considered compliant again. See also [here](https://github.com/discordapp/discord-api-docs/issues/108).
|
165
394
|
- Rogue presences, i.e. presences without an associated cached member, now print a log message instead of being completely ignored
|
166
395
|
- A variety of aliases have been added to existing methods.
|
167
396
|
- An example to show off voice sending has been added to the repo, and existing examples have been improved.
|
168
397
|
- A large amount of fixes and clarifications have been made to the docs.
|
169
398
|
|
170
|
-
###
|
171
|
-
|
399
|
+
### Fixed
|
172
400
|
- The almost a year old bug where changing the own user's username would reset its avatar has finally been fixed.
|
173
401
|
- The issue where resolving a large server with the owner offline would sometimes cause a stack overflow has been fixed ([#169](https://github.com/meew0/discordrb/issues/169) / [#170](https://github.com/meew0/discordrb/issues/170) / [#191](https://github.com/meew0/discordrb/pull/191), thanks @stoodfarback)
|
174
402
|
- Fixed an issue where if a server had an AFK channel set, but that AFK channel couldn't be connected to, resolving the server (and in turn all objects depending on it) would fail. This likely fixes any random `NoPermission` errors you've ever encountered in your log.
|
@@ -187,24 +415,27 @@ As with 2.0.0, there are some breaking changes! They are, as always, highlighted
|
|
187
415
|
- Opcode 9 packets which are received while no session currently exists are handled correctly
|
188
416
|
- A possible regression in PM channel creation was fixed. ([#227](https://github.com/meew0/discordrb/issues/227) / [#228](https://github.com/meew0/discordrb/pull/228), thanks @heimidal)
|
189
417
|
|
190
|
-
## 2.1.3
|
191
|
-
|
192
|
-
*Bugfix-only release.*
|
418
|
+
## [2.1.3] - 2016-06-11
|
419
|
+
[2.1.3]: https://github.com/meew0/discordrb/releases/tag/v2.1.3
|
193
420
|
|
194
|
-
|
421
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v2.1.2...v2.1.3)
|
195
422
|
|
423
|
+
### Fixed
|
196
424
|
- Various messages that were just printed to stdout that should have been using the `Logger` system now do ([#132](https://github.com/meew0/discordrb/issues/132) and [#133](https://github.com/meew0/discordrb/pull/133), thanks @PoVa)
|
197
425
|
- A mistake in the documentation was fixed ([#140](https://github.com/meew0/discordrb/issues/140))
|
198
426
|
- Handling of the `GUILD_MEMBER_DELETE` gateway event should now work even if, for whatever reason, Discord sends an invalid server ID ([#129](https://github.com/meew0/discordrb/issues/129))
|
199
427
|
- If the processing of a particular voice packet takes too long, the user will now be warned instead of an error being raised ([#134](https://github.com/meew0/discordrb/issues/134))
|
200
428
|
|
201
|
-
## 2.1.2
|
429
|
+
## [2.1.2] - 2016-05-29
|
430
|
+
[2.1.2]: https://github.com/meew0/discordrb/releases/tag/v2.1.2
|
431
|
+
|
432
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v2.1.1...v2.1.2)
|
202
433
|
|
434
|
+
### Added
|
203
435
|
- A reader was added (`Bot#awaits`) to read the hash of awaits, so ones that aren't necessary anymore can be deleted.
|
204
436
|
- `Channel#prune` now uses the bulk delete endpoint which means it will be much faster and no longer rate limited ([#118](https://github.com/meew0/discordrb/pull/118), thanks @snapcase)
|
205
437
|
|
206
|
-
###
|
207
|
-
|
438
|
+
### Fixed
|
208
439
|
- A few unresolved links in the documentation were fixed.
|
209
440
|
- The tracking of streamed servers was updated so that very long lists of servers should now all be processed.
|
210
441
|
- Resolution methods now return nil if the object to resolve can't be found, which should alleviate some rare caching problems ([#124](https://github.com/meew0/discordrb/pull/124), thanks @Snazzah)
|
@@ -212,17 +443,21 @@ As with 2.0.0, there are some breaking changes! They are, as always, highlighted
|
|
212
443
|
- Network errors (`EPIPE` and the like) should no longer cause an exception while processing ([#127](https://github.com/meew0/discordrb/issues/127))
|
213
444
|
- Uncached members in messages are now logged.
|
214
445
|
|
215
|
-
## 2.1.1
|
216
|
-
|
217
|
-
*Bugfix-only release.*
|
446
|
+
## [2.1.1] - 2016-05-08
|
447
|
+
[2.1.1]: https://github.com/meew0/discordrb/releases/tag/v2.1.1
|
218
448
|
|
219
|
-
|
449
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v2.1.0...v2.1.1)
|
220
450
|
|
451
|
+
### Fixed
|
221
452
|
- Fixed a caching error that occurred when deleting roles ([#113](https://github.com/meew0/discordrb/issues/113))
|
222
453
|
- Commands should no longer be triggered with nil authors ([#114](https://github.com/meew0/discordrb/issues/114))
|
223
454
|
|
224
|
-
## 2.1.0
|
455
|
+
## [2.1.0] - 2016-04-30
|
456
|
+
[2.1.0]: https://github.com/meew0/discordrb/releases/tag/v2.1.0
|
225
457
|
|
458
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v2.0.4...v2.1.0)
|
459
|
+
|
460
|
+
### Added
|
226
461
|
- API support for the April 29 Discord update, which was the first feature update in a while with more than a few additions to the API, was added. This includes: ([#111](https://github.com/meew0/discordrb/pull/111))
|
227
462
|
- Members' nicknames can now be set and read (`Member#nick`) and updates to them are being tracked.
|
228
463
|
- Roles now have a `mentionable?` property and a `mention` utility method.
|
@@ -230,17 +465,20 @@ As with 2.0.0, there are some breaking changes! They are, as always, highlighted
|
|
230
465
|
- The internal REST rate limit handler was updated:
|
231
466
|
- It now tracks message rate limits server wide to properly handle new bot account rate limits. ([#100](https://github.com/meew0/discordrb/issues/100))
|
232
467
|
- It now keeps track of all requests, even those that are known not to be rate limited (it just won't do anything to them). This allows for more flexibility should future rate limits be added.
|
233
|
-
- Guild sharding is now supported using the optional `shard_id` and `num_shards` to bot initializers. Read about it here: https://github.com/
|
468
|
+
- Guild sharding is now supported using the optional `shard_id` and `num_shards` to bot initializers. Read about it here: https://github.com/discordapp/discord-api-docs/issues/17 ([#98](https://github.com/meew0/discordrb/issues/98))
|
234
469
|
- Commands can now require users to have specific action permissions to be able to execute them using the `:required_permissions` attribute. ([#104](https://github.com/meew0/discordrb/issues/104) / [#112](https://github.com/meew0/discordrb/pull/112))
|
235
470
|
- A `heartbeat` event was added that gets triggered every now and then to allow for roughly periodic actions. ([#110](https://github.com/meew0/discordrb/pull/110))
|
236
471
|
- Prefixes are now more flexible in the format they can have - arrays and callables are now allowed as well. Read the documentation for more info.([#107](https://github.com/meew0/discordrb/issues/107) / [#109](https://github.com/meew0/discordrb/pull/109))
|
237
472
|
|
238
|
-
## 2.0.4
|
473
|
+
## [2.0.4] - 2016-04-19
|
474
|
+
[2.0.4]: https://github.com/meew0/discordrb/releases/tag/v2.0.4
|
239
475
|
|
240
|
-
|
476
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v2.0.3...v2.0.4)
|
241
477
|
|
242
|
-
###
|
478
|
+
### Added
|
479
|
+
- Added a utility method `Invite#url` ([#86](https://github.com/meew0/discordrb/issues/86)/[#101](https://github.com/meew0/discordrb/pull/101), thanks @PoVa)
|
243
480
|
|
481
|
+
### Fixed
|
244
482
|
- Fix a caching inconsistency where a server's channels and a bot's channels wouldn't be identical. This caused server channels to not update properly ([#105](https://github.com/meew0/discordrb/issues/105))
|
245
483
|
- Setting avatars should now work again on Windows ([#96](https://github.com/meew0/discordrb/issues/96))
|
246
484
|
- Message edit events should no longer be raised with nil authors ([#95](https://github.com/meew0/discordrb/issues/95))
|
@@ -248,50 +486,63 @@ As with 2.0.0, there are some breaking changes! They are, as always, highlighted
|
|
248
486
|
- Voice states are now preserved for chunked members, fixes an issue where a voice channel's users would ignore all voice states that occurred before the call ([#103](https://github.com/meew0/discordrb/issues/103))
|
249
487
|
- Fixed some possible problems with heartbeats not being sent with unstable connections
|
250
488
|
|
251
|
-
## 2.0.3
|
489
|
+
## [2.0.3] - 2016-04-15
|
490
|
+
[2.0.3]: https://github.com/meew0/discordrb/releases/tag/v2.0.3
|
491
|
+
|
492
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v2.0.2...v2.0.3)
|
252
493
|
|
494
|
+
### Added
|
253
495
|
- All examples now fully use v2 ([#92](https://github.com/meew0/discordrb/pull/92), thanks @snapcase)
|
254
496
|
- The message that occurs when a command is missing permission can now be changed or disabled ([#94](https://github.com/meew0/discordrb/pull/94), thanks @snapcase)
|
255
497
|
- The log message that occurs when you disconnect from the WebSocket is now more compact ([#90](https://github.com/meew0/discordrb/issues/90))
|
256
498
|
- `Bot#ignored?` now exists to check whether a user is ignored
|
257
499
|
|
258
|
-
###
|
259
|
-
|
500
|
+
### Fixed
|
260
501
|
- A problem where getting channel history would sometimes cause an exception has been fixed ([#88](https://github.com/meew0/discordrb/issues/88))
|
261
502
|
- `split_message` should now behave correctly in a specific edge case ([#85](https://github.com/meew0/discordrb/pull/85), thanks @AnhNhan)
|
262
503
|
- DCA playback should no longer cause an error when playback ends due to a specific reason
|
263
504
|
|
264
|
-
## 2.0.2
|
505
|
+
## [2.0.2] - 2016-04-10
|
506
|
+
[2.0.2]: https://github.com/meew0/discordrb/releases/tag/v2.0.2
|
265
507
|
|
508
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v2.0.1...v2.0.2)
|
509
|
+
|
510
|
+
### Added
|
266
511
|
- Added `Server#text_channels` and `#voice_channels` ([#79](https://github.com/meew0/discordrb/issues/79))
|
267
512
|
- Added `Server#online_users` ([#80](https://github.com/meew0/discordrb/issues/80))
|
268
513
|
- Added `Member#role?` ([#83](https://github.com/meew0/discordrb/issues/83))
|
269
514
|
- Added three utility methods `User#online?`, `#offline?`, and `#idle?`
|
270
515
|
- `Bot#send_message` can now take channel objects as well as the ID
|
271
516
|
|
272
|
-
###
|
273
|
-
|
517
|
+
### Fixed
|
274
518
|
- Removing the bot from a server will no longer result in a gateway message error
|
275
519
|
- Fixed an exception raised if a previously unavailable guild goes online after the stream timeout
|
276
520
|
- `server_create` will no longer be raised for newly available guilds
|
277
521
|
- Fixed the annoying message about constant reassignment at startup
|
278
522
|
- Fixed an error where rarely a server's owner wouldn't be initialized correctly
|
279
523
|
|
280
|
-
## 2.0.1
|
524
|
+
## [2.0.1] - 2016-04-10
|
525
|
+
[2.0.1]: https://github.com/meew0/discordrb/releases/tag/v2.0.1
|
526
|
+
|
527
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v2.0.0...v2.0.1)
|
281
528
|
|
529
|
+
### Added
|
282
530
|
- Added some more examples ([#75](https://github.com/meew0/discordrb/pull/75), thanks @greenbigfrog)
|
283
531
|
- Users can now be ignored from messages at gateway level (`Bot#ignore_user`, `Bot#unignore_user`)
|
284
532
|
- `Member#add_role` and `Member#remove_role` were re-added from User - they were missing before
|
285
533
|
|
286
|
-
###
|
287
|
-
|
534
|
+
### Fixed
|
288
535
|
- Fixed some typos in the documentation
|
289
536
|
- If a server is actually unavailable it will no longer spam the console with timeout messages
|
290
537
|
- VoiceBot now sends five frames of silence after finishing a track. This fixes an issue where the sound from the last track would bleed over into the new one due to interpolation.
|
291
538
|
- Fixed a bug where playing something right after connecting to voice would sometimes cause the encryption key to not be set
|
292
539
|
|
293
|
-
## 2.0.0
|
540
|
+
## [2.0.0] - 2016-04-08
|
541
|
+
[2.0.0]: https://github.com/meew0/discordrb/releases/tag/v2.0.0
|
542
|
+
|
543
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.8.1...v2.0.0)
|
294
544
|
|
545
|
+
### Added
|
295
546
|
This is the first major update with some breaking changes! Those are highlighted in bold with migration advice after them. Ask in the Discord channel (see the README) if you have questions.
|
296
547
|
|
297
548
|
- **Bot initializers now only use named parameters.** This shouldn't be a hard change to adjust to, but everyone will have to do it. Here's some examples:
|
@@ -357,22 +608,30 @@ puts bot.profile.username
|
|
357
608
|
- The overall performance and memory usage was improved, especially on Ruby 2.3 (using the new frozen string literal comment)
|
358
609
|
- The documentation was slightly improved.
|
359
610
|
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
611
|
+
### Fixed
|
612
|
+
- A *lot* of latent bugs with caching were fixed. This doesn't really have a noticeable effect, it just means better stability and reliability as a whole.
|
613
|
+
- **Command bots no longer respond when there are spaces between the prefix and the command.** Because this behaviour may be desirable, a `spaces_allowed` attribute was added to the CommandBot initializer that can be set to true to re-enable this behaviour.
|
614
|
+
- Permission calculation (`User#permission?`) has been thoroughly rewritten and should now account for edge cases like server owners and Manage Permissions.
|
615
|
+
- The gateway reconnect logic now uses a correct falloff system - before it would start at 1 second between attempts and immediately jump to 120. Now the transition is more smooth.
|
616
|
+
- Commands with aliases now show up correctly in the auto-generated help command ([#72](https://github.com/meew0/discordrb/issues/72))
|
617
|
+
- The auto-generated help command can now actually be disabled by setting the corresponding attribute to nil ([#73](https://github.com/meew0/discordrb/issues/73))
|
618
|
+
- Including empty containers now does nothing instead of raising an error
|
619
|
+
- Command bots now obey `should_parse_self`
|
620
|
+
|
621
|
+
## [1.8.1] - 2016-03-11
|
622
|
+
[1.8.1]: https://github.com/meew0/discordrb/releases/tag/v1.8.1
|
369
623
|
|
370
|
-
|
624
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.8.0...v1.8.1)
|
371
625
|
|
372
|
-
###
|
626
|
+
### Fixed
|
373
627
|
* Fixed an error (caused by an undocumented API change) that would write a traceback to the console every time someone started typing in a channel invisible to the bot.
|
374
628
|
|
375
|
-
## 1.8.0
|
629
|
+
## [1.8.0] - 2016-03-11
|
630
|
+
[1.8.0]: https://github.com/meew0/discordrb/releases/tag/v1.8.0
|
631
|
+
|
632
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.7.5...v1.8.0)
|
633
|
+
|
634
|
+
### Added
|
376
635
|
* The built-in logger has been somewhat redone.
|
377
636
|
* It now has a fancy mode, settable using `Discordrb::LOGGER.fancy = true/false`, that makes use of ANSI escape codes to prettify the log output.
|
378
637
|
* It now supports more things than just `debug`, there's also `warn`, `error`, `good`, `info`, `in`, and `out`.
|
@@ -383,102 +642,157 @@ puts bot.profile.username
|
|
383
642
|
* `Channel#mention` was added that mentions a channel analogous to `User#mention`.
|
384
643
|
* The aliases `tag` and `discord_tag` have been added to the discriminator because that's what Discord calls them now.
|
385
644
|
|
386
|
-
###
|
645
|
+
### Fixed
|
387
646
|
* A problem some users had where voice playback would leak FFmpeg processes has been fixed.
|
388
647
|
* The VWS internal thread now has a name in debug messages (`vws-i`)
|
389
648
|
* Users' voice channels should now always be set if they are in one
|
390
649
|
|
391
|
-
## 1.7.5
|
650
|
+
## [1.7.5] - 2016-03-03
|
651
|
+
[1.7.5]: https://github.com/meew0/discordrb/releases/tag/v1.7.5
|
652
|
+
|
653
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.7.4...v1.7.5)
|
654
|
+
|
655
|
+
### Changed
|
392
656
|
* `Channel#send_message` and `Bot#send_message` now have an extra `tts` parameter (false by default) to specify whether the message should use TTS.
|
393
657
|
|
394
|
-
###
|
658
|
+
### Fixed
|
395
659
|
* Attempting to `p` a data class, especially a `User` or `Profile`, should no longer lock up the interpreter due to very deep recursion.
|
396
660
|
* Manual TTS using `API.send_message` will now work correctly.
|
397
661
|
|
398
|
-
## 1.7.4
|
662
|
+
## [1.7.4] - 2016-02-28
|
663
|
+
[1.7.4]: https://github.com/meew0/discordrb/releases/tag/v1.7.4
|
664
|
+
|
665
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.7.3...v1.7.4)
|
666
|
+
|
667
|
+
### Added
|
399
668
|
* Added methods `Channel#text?` and `Channel#voice?` to check a channel's type.
|
400
669
|
* Frequently allocated strings have been turned into symbols or frozen constants, this should improve performance slightly.
|
401
670
|
|
402
|
-
###
|
671
|
+
### Fixed
|
403
672
|
* `VoiceBot#destroy` will now properly disconnect you and should no longer cause segfaults.
|
404
673
|
* Fixed a bug where you couldn't set any settings on a role created using `Server#create_role`.
|
405
674
|
* Fixed `Profile#avatar=` doing absolutely nothing.
|
406
675
|
|
407
|
-
## 1.7.3
|
676
|
+
## [1.7.3] - 2016-02-27
|
677
|
+
[1.7.3]: https://github.com/meew0/discordrb/releases/tag/v1.7.3
|
678
|
+
|
679
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.7.2...v1.7.3)
|
680
|
+
|
681
|
+
### Added
|
408
682
|
* The server banlist can now be accessed more nicely using `Server#bans`.
|
409
683
|
* Some abstractions for OAuth application creation were added - `bot.create_oauth_application` and `bot.update_oauth_application`. See the docs about how to use them.
|
410
684
|
|
411
|
-
## 1.7.2
|
685
|
+
## [1.7.2] - 2016-02-25
|
686
|
+
[1.7.2]: https://github.com/meew0/discordrb/releases/tag/v1.7.2
|
687
|
+
|
688
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.7.1...v1.7.2)
|
689
|
+
|
690
|
+
### Changed
|
412
691
|
* The `bot` object can now be read from all events, not just from command ones.
|
413
692
|
* You can now set the `filter_volume` on VoiceBot, which corresponds to the old way of doing volume handling, in case the new way is too slow for you.
|
414
693
|
|
415
|
-
## 1.7.1
|
694
|
+
## [1.7.1] - 2016-02-23
|
695
|
+
[1.7.1]: https://github.com/meew0/discordrb/releases/tag/v1.7.1
|
696
|
+
|
697
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.7.0...v1.7.1)
|
698
|
+
|
699
|
+
### Added
|
416
700
|
* A `clear!` method was added to EventContainer that removes all events from it, so you can overwrite modules by defining them again. (It's unnecessary for CommandContainers because commands can never be duplicate.)
|
417
701
|
|
418
|
-
###
|
702
|
+
### Fixed
|
419
703
|
* The tokens will now be verified correctly when obtained from the cache. (I messed up last time)
|
420
704
|
* Events of the same type in different containers will now be merged correctly when including both containers.
|
421
705
|
* Got rid of the annoying `undefined method 'game' for nil:NilClass` error that sometimes occurred on startup. (It was harmless but now it's gone entirely)
|
422
706
|
|
423
|
-
## 1.7.0
|
707
|
+
## [1.7.0] - 2016-02-23
|
708
|
+
[1.7.0]: https://github.com/meew0/discordrb/releases/tag/v1.7.0
|
709
|
+
|
710
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.6.6...v1.7.0)
|
711
|
+
|
712
|
+
### Added
|
424
713
|
* **`bot.find` and `bot.find_user` have had their fuzzy search feature removed because it only caused problems. If you still need it, you can copy the code from the repo's history.** In addition, `find` was renamed to `find_channel` but still exists as a (deprecated) alias.
|
425
|
-
* The in-line documentation using Yard is now complete and can be [accessed at RubyDoc](
|
714
|
+
* The in-line documentation using Yard is now complete and can be [accessed at RubyDoc](https://www.rubydoc.info/github/meew0/discordrb/master/). It's not quite polished yet and some things may be confusing, but it should be mostly usable.
|
426
715
|
* Events and commands can now be thoroughly modularized using a system I call 'containers'. (TODO: Add a tutorial here later)
|
427
716
|
* Support for the latest API changes:
|
428
717
|
* `Server.leave` does something different than `Server.delete`
|
429
718
|
* The WebSocket connection now uses version 3 of the protocol
|
430
|
-
* Voice bots now support playing DCA files using the [`play_dca`](
|
431
|
-
* The [volume](
|
719
|
+
* Voice bots now support playing DCA files using the [`play_dca`](https://www.rubydoc.info/github/meew0/discordrb/master/Discordrb%2FVoice%2FVoiceBot%3Aplay_dca) method. (TODO: Add a section to the voice tutorial)
|
720
|
+
* The [volume](https://www.rubydoc.info/github/meew0/discordrb/master/Discordrb%2FVoice%2FVoiceBot%3Avolume) of a voice bot can now be changed during playback and not only for future playbacks.
|
432
721
|
* A `Channel.prune` method was added to quickly delete lots of messages from a channel. (It appears that this is something lots of bots do.)
|
433
|
-
* [`Server#members`](
|
434
|
-
* An attribute [`Server#member_count`](
|
435
|
-
* An attribute [`Server#large?`](
|
722
|
+
* [`Server#members`](https://www.rubydoc.info/github/meew0/discordrb/master/Discordrb%2FServer%3Amembers) is now aliased to `users`.
|
723
|
+
* An attribute [`Server#member_count`](https://www.rubydoc.info/github/meew0/discordrb/master/Discordrb%2FServer%3Amember_count) was added that is accurate even if chunked members have not been added yet.
|
724
|
+
* An attribute [`Server#large?`](https://www.rubydoc.info/github/meew0/discordrb/master/Discordrb%2FServer%3Alarge) was added that is true if a server could possibly have an inaccurate list of members.
|
436
725
|
* Some more specific error classes have been added to replace the RestClient generic ones.
|
437
726
|
* Quickly sending a message using the `event << 'text'` syntax now works in every type of message event, not just commands.
|
438
|
-
* You can now set the bitrate of sent audio data using `bot.voice.encoder.bitrate = 64000` (see [`Encoder#bitrate=`](
|
439
|
-
* A rate limiting feature was added to commands - you can define buckets using the [`bucket`](
|
440
|
-
* A [`SimpleRateLimiter`](
|
727
|
+
* You can now set the bitrate of sent audio data using `bot.voice.encoder.bitrate = 64000` (see [`Encoder#bitrate=`](https://www.rubydoc.info/github/meew0/discordrb/master/Discordrb/Voice/Encoder#bitrate%3D-instance_method)). Note that sent audio data will always be unaffected by voice channel bitrate settings, those only tell the client at what bitrate it should send.
|
728
|
+
* A rate limiting feature was added to commands - you can define buckets using the [`bucket`](https://www.rubydoc.info/github/meew0/discordrb/master/Discordrb%2FCommands%2FRateLimiter%3Abucket) method and use them as a parameter for [`command`](https://www.rubydoc.info/github/meew0/discordrb/master/Discordrb%2FCommands%2FCommandContainer%3Acommand).
|
729
|
+
* A [`SimpleRateLimiter`](https://www.rubydoc.info/github/meew0/discordrb/master/Discordrb/Commands/SimpleRateLimiter) class was also added if you want rate limiting independent from commands (e. g. for events)
|
441
730
|
* Connecting to the WebSocket now uses an exponential falloff system so we don't spam Discord with requests anymore.
|
442
731
|
* Debug timestamps are now accurate to milliseconds.
|
443
732
|
|
444
|
-
|
445
|
-
### Bugfixes
|
733
|
+
### Fixed
|
446
734
|
* The token cacher will now detect whether a cached token has been invalidated due to a password change.
|
447
735
|
* `break`ing from an event or command will no longer spew `LocalJumpError`s to the console.
|
448
736
|
|
449
|
-
## 1.6.6
|
737
|
+
## [1.6.6] - 2016-02-13
|
738
|
+
[1.6.6]: https://github.com/meew0/discordrb/releases/tag/v1.6.6
|
739
|
+
|
740
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.6.5...v1.6.6)
|
450
741
|
|
451
|
-
###
|
742
|
+
### Fixed
|
452
743
|
* Fixed a problem that would cause an incompatibility with Ruby 2.1
|
453
744
|
* Fixed servers sometimes containing duplicate members
|
454
745
|
|
455
|
-
## 1.6.5
|
746
|
+
## [1.6.5] - 2016-02-12
|
747
|
+
[1.6.5]: https://github.com/meew0/discordrb/releases/tag/v1.6.5
|
748
|
+
|
749
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.6.4...v1.6.5)
|
750
|
+
|
751
|
+
### Changed
|
456
752
|
* The bot will now request the users that would previously be sent all in one READY packet in multiple chunks. This improves startup time slightly and ensures compatibility with the latest Discord change, but it also means that some users won't be in server members lists until a while after creation (usually a couple seconds at most).
|
457
753
|
|
458
|
-
## 1.6.4
|
754
|
+
## [1.6.4] - 2016-02-10
|
755
|
+
[1.6.4]: https://github.com/meew0/discordrb/releases/tag/v1.6.4
|
756
|
+
|
757
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.6.3...v1.6.4)
|
459
758
|
|
460
|
-
###
|
759
|
+
### Fixed
|
461
760
|
* Fixed a bug that made the joining of servers using an invite impossible.
|
462
761
|
|
463
|
-
## 1.6.3
|
762
|
+
## [1.6.3] - 2016-02-08
|
763
|
+
[1.6.3]: https://github.com/meew0/discordrb/releases/tag/v1.6.3
|
464
764
|
|
465
|
-
|
765
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.6.2...v1.6.3)
|
766
|
+
|
767
|
+
### Fixed
|
466
768
|
* Fixed a bug that prevented the banning of users over the API
|
467
769
|
|
468
|
-
## 1.6.2
|
770
|
+
## [1.6.2] - 2016-02-06
|
771
|
+
[1.6.2]: https://github.com/meew0/discordrb/releases/tag/v1.6.2
|
772
|
+
|
773
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.6.1...v1.6.2)
|
469
774
|
|
470
|
-
###
|
775
|
+
### Fixed
|
471
776
|
* RbNaCl is now installed directly instead of the wrapper that also contains libsodium. This has the disadvantage that you will have to install libsodium manually but at least it's not broken on Windows anymore.
|
472
777
|
|
473
|
-
## 1.6.1
|
778
|
+
## [1.6.1] - 2016-02-04
|
779
|
+
[1.6.1]: https://github.com/meew0/discordrb/releases/tag/v1.6.1
|
780
|
+
|
781
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.6.0...v1.6.1)
|
782
|
+
|
783
|
+
### Changed
|
474
784
|
* It's now possible to prevent the `READY` packet from being printed in debug mode, run `bot.suppress_ready_debug` once before the `bot.run` to do it.
|
475
785
|
|
476
|
-
###
|
786
|
+
### Fixed
|
477
787
|
* Token cache files with invalid JSON syntax will no longer crash the bot at login.
|
478
788
|
|
479
|
-
## 1.6.0
|
789
|
+
## [1.6.0] - 2016-02-01
|
790
|
+
[1.6.0]: https://github.com/meew0/discordrb/releases/tag/v1.6.0
|
791
|
+
|
792
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.5.4...v1.6.0)
|
480
793
|
|
481
|
-
|
794
|
+
### Added
|
795
|
+
* The inline documentation using YARD was greatly improved and is now mostly usable, at least for the data classes and voice classes. It's still not complete enough to be released on GitHub, but you can build it yourself using [YARD](https://yardoc.org/).
|
482
796
|
* It's now possible to encrypt sent voice data using an optional parameter in `voice_connect`. The encryption uses RbNaCl's [SecretBox](https://github.com/cryptosphere/rbnacl/wiki/Secret-Key-Encryption#algorithm-details) and is enabled by default.
|
483
797
|
* The [new library comparison](https://discordapi.com/unofficial/comparison.html) is now fully supported, barring voice receive and multi-send: (#39)
|
484
798
|
* `bot.invite` will create an `Invite` object from a code containing information about it.
|
@@ -497,38 +811,62 @@ puts bot.profile.username
|
|
497
811
|
* To avoid confusion with `avatar_url`, the reader `user.avatar` was renamed to `avatar_id`. (`user.avatar` still exists but is now deprecated.)
|
498
812
|
* Symbols are now used instead of strings as hash keys in all methods that send JSON data to somewhere. This might improve performance slightly.
|
499
813
|
|
500
|
-
###
|
814
|
+
### Fixed
|
501
815
|
* Fixed the reader `server.afk_channel_id` not containing a value sometimes.
|
502
816
|
* An issue was fixed where attempting to create a `Server` object from a stub server that didn't contain any role data would cause an exception.
|
503
817
|
* The `Invite` `server` property will now be initialized directly from the invite data instead of the channel the invite is to, to prevent it being `nil` when the invite channel was stubbed.
|
504
818
|
* The `inviter` of an `Invite` will now be `nil` instead of causing an exception when it doesn't exist in the invite data.
|
505
819
|
|
506
|
-
## 1.5.4
|
820
|
+
## [1.5.4] - 2016-01-16
|
821
|
+
[1.5.4]: https://github.com/meew0/discordrb/releases/tag/v1.5.4
|
822
|
+
|
823
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.5.3...v1.5.4)
|
824
|
+
|
825
|
+
### Changed
|
507
826
|
* The `opus-ruby` and `levenshtein` dependencies are now optional - if you don't need them, it won't crash immediately (only when you try to use voice / `find` with a threshold > 0, respectively)
|
508
827
|
|
509
|
-
###
|
828
|
+
### Fixed
|
510
829
|
* Voice volume can now be properly set when using avconv (#37, thanks @purintai)
|
511
830
|
* `websocket-client-simple`, which is required for voice, is now specified in the dependencies.
|
512
831
|
|
513
|
-
## 1.5.3
|
832
|
+
## [1.5.3] - 2016-01-11
|
833
|
+
[1.5.3]: https://github.com/meew0/discordrb/releases/tag/v1.5.3
|
834
|
+
|
835
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.5.2...v1.5.3)
|
836
|
+
|
837
|
+
### Added
|
514
838
|
* Voice bot length adjustments are now configurable using `bot.voice.adjust_interval` and `bot.voice.adjust_offset` (make sure the latter is less than the first, or no adjustment will be performed at all)
|
515
839
|
* Length adjustments can now be made more smooth using `bot.voice.adjust_average` (true allows for more smooth adjustments, *may* improve stutteriness but might make it worse as well)
|
516
840
|
|
517
|
-
## 1.5.2
|
841
|
+
## [1.5.2] - 2016-01-11
|
842
|
+
[1.5.2]: https://github.com/meew0/discordrb/releases/tag/v1.5.2
|
843
|
+
|
844
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.5.1...v1.5.2)
|
845
|
+
|
846
|
+
### Added
|
518
847
|
* `bot.voice_connect` can now use a channel ID directly.
|
519
848
|
* A reader `bot.volume` now exists for the corresponding writer.
|
520
849
|
* The attribute `bot.encoder.use_avconv` was added that makes the bot use avconv instead of ffmpeg (for those on Ubuntu 14.x)
|
521
850
|
* The PBKDF2 iteration count for token caching was increased to 300,000 for extra security.
|
522
851
|
|
523
|
-
###
|
852
|
+
### Fixed
|
524
853
|
* Fix a bug where `play_file` wouldn't properly accept string file paths (#36, thanks @purintai)
|
525
854
|
* Fix a concurrency issue where `VoiceBot` would try to read from nil
|
526
855
|
|
856
|
+
## [1.5.1] - 2016-01-10
|
857
|
+
[1.5.1]: https://github.com/meew0/discordrb/releases/tag/v1.5.1
|
858
|
+
|
859
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.5.0...v1.5.1)
|
527
860
|
|
528
|
-
|
861
|
+
### Added
|
529
862
|
* The connection to voice was made more reliable. I haven't experienced any issues with it myself but I got reports where `recv` worked better than `recvmsg`.
|
530
863
|
|
531
|
-
## 1.5.0
|
864
|
+
## [1.5.0] - 2016-01-10
|
865
|
+
[1.5.0]: https://github.com/meew0/discordrb/releases/tag/v1.5.0
|
866
|
+
|
867
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.4.8...v1.5.0)
|
868
|
+
|
869
|
+
### Added
|
532
870
|
* Voice support: discordrb can now connect to voice using `bot.voice_connect` and do the following things:
|
533
871
|
* Play files and URLs using `VoiceBot.play_file`
|
534
872
|
* Play arbitrary streams using `VoiceBot.play_io`
|
@@ -536,63 +874,99 @@ puts bot.profile.username
|
|
536
874
|
* Pause and resume playback (`VoiceBot.pause` and `VoiceBot.continue`)
|
537
875
|
* Authentication tokens are now cached and no login request will be made if a cached token is found. This is mostly to reduce strain on Discord's servers.
|
538
876
|
|
539
|
-
###
|
877
|
+
### Fixed
|
540
878
|
* Some latent ID casting errors were fixed - those would probably never have been noticed anyway, but they're fixed now.
|
541
879
|
* `Bot.parse_mention` now works, it didn't work at all previously
|
542
880
|
|
543
|
-
## 1.4.8
|
881
|
+
## [1.4.8] - 2016-01-06
|
882
|
+
[1.4.8]: https://github.com/meew0/discordrb/releases/tag/v1.4.8
|
883
|
+
|
884
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.4.7...v1.4.8)
|
885
|
+
|
886
|
+
### Added
|
544
887
|
* The `User` class now has the methods `add_role` and `remove_role` which add a role to a user and remove it, respectively.
|
545
888
|
* All data classes now have a useful `==` implementation.
|
546
889
|
* **The `Game` class and all references to it were removed**. Games are now only identified by their name.
|
547
890
|
|
548
|
-
###
|
891
|
+
### Fixed
|
549
892
|
* When a role is deleted, the ID is now obtained correctly. (#30)
|
550
893
|
|
551
|
-
## 1.4.7
|
894
|
+
## [1.4.7] - 2016-01-03
|
895
|
+
[1.4.7]: https://github.com/meew0/discordrb/releases/tag/v1.4.7
|
896
|
+
|
897
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.4.6...v1.4.7)
|
898
|
+
|
899
|
+
### Added
|
552
900
|
* Presence event handling is now divided into two separate events; `PresenceEvent` to handle online/offline/idle statuses and `PlayingEvent` to handle users playing games.
|
553
901
|
* The `user` property of `MessageEvent` is now automatically resolved to the cached user, so you can modify roles instantly without having to resolve it yourself.
|
554
902
|
* `Message` now has a useful `to_s` method that just returns the content.
|
555
903
|
|
556
|
-
###
|
904
|
+
### Fixed
|
557
905
|
* The `TypingEvent` `user` property is now initialized correctly (#29, thanks @purintai)
|
558
906
|
|
559
|
-
## 1.4.6
|
560
|
-
|
907
|
+
## [1.4.6] - 2015-12-25
|
908
|
+
[1.4.6]: https://github.com/meew0/discordrb/releases/tag/v1.4.6
|
561
909
|
|
562
|
-
|
910
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.4.4...v1.4.6)
|
911
|
+
|
912
|
+
### Fixed
|
563
913
|
* The `user` and `server` properties of `PresenceEvent` are now initialized correctly.
|
564
914
|
|
565
915
|
## 1.4.5
|
916
|
+
<!-- This was never tagged in the git repo -->
|
917
|
+
### Changed
|
566
918
|
* The `Bot.game` property can now be set to an arbitrary string.
|
567
919
|
* Discord mentions are handled in the old way again, after Discord reverted an API change.
|
568
920
|
|
569
|
-
## 1.4.4
|
921
|
+
## [1.4.4] - 2015-12-18
|
922
|
+
[1.4.4]: https://github.com/meew0/discordrb/releases/tag/v1.4.4
|
923
|
+
|
924
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.4.3...v1.4.4)
|
925
|
+
|
926
|
+
### Added
|
570
927
|
* Add `Server.leave_server` as an alias for `delete_server`
|
571
928
|
* Use the new Discord mention format (mentions array). **Reverted in 1.4.5**
|
572
929
|
* Discord rate limited API calls are now handled correctly - discordrb will try again after the specified time.
|
573
930
|
* Debug logging is now handled by a separate `Logger` class
|
574
931
|
|
575
|
-
###
|
932
|
+
### Fixed
|
576
933
|
* Message timestamps are now parsed correctly.
|
577
934
|
* The quickadders for awaits (`User.await`, `Channel.await` etc.) now add the correct awaits.
|
578
935
|
|
579
|
-
## 1.4.3
|
936
|
+
## [1.4.3] - 2015-12-11
|
937
|
+
[1.4.3]: https://github.com/meew0/discordrb/releases/tag/v1.4.3
|
938
|
+
|
939
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.4.2...v1.4.3)
|
940
|
+
|
941
|
+
### Added
|
580
942
|
* Added a method `Bot.find_user` analogous to `Bot.find`.
|
581
943
|
|
582
|
-
###
|
944
|
+
### Fixed
|
583
945
|
* Remove a leftover debug line (#23, thanks @VxJasonxV)
|
584
946
|
|
585
|
-
## 1.4.2
|
947
|
+
## [1.4.2] - 2015-12-10
|
948
|
+
[1.4.2]: https://github.com/meew0/discordrb/releases/tag/v1.4.2
|
949
|
+
|
950
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.4.1...v1.4.2)
|
951
|
+
|
952
|
+
### Changed
|
586
953
|
* discordrb will now send a user agent in the format requested by the Discord devs.
|
587
954
|
|
588
|
-
## 1.4.1
|
589
|
-
|
955
|
+
## [1.4.1] - 2015-12-07
|
956
|
+
[1.4.1]: https://github.com/meew0/discordrb/releases/tag/v1.4.1
|
590
957
|
|
591
|
-
|
958
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.4.0...v1.4.1)
|
959
|
+
|
960
|
+
### Fixed
|
592
961
|
* Empty messages will now never be sent
|
593
962
|
* The command-not-found message in `CommandBot` can now be disabled properly
|
594
963
|
|
595
|
-
## 1.4.0
|
964
|
+
## [1.4.0] - 2015-12-04
|
965
|
+
[1.4.0]: https://github.com/meew0/discordrb/releases/tag/v1.4.0
|
966
|
+
|
967
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.3.12...v1.4.0)
|
968
|
+
|
969
|
+
### Added
|
596
970
|
* All methods and classes where the words "colour" or "color" are used now have had aliases added with the respective other spelling. (Internally, everything uses "colour" now).
|
597
971
|
* discordrb now supports everything on the Discord API comparison, except for voice (see also #22)
|
598
972
|
* Roles can now be created, edited and deleted and their permissions modified.
|
@@ -606,58 +980,95 @@ puts bot.profile.username
|
|
606
980
|
* discordrb now handles created/updated/deleted servers properly with events added to handle them.
|
607
981
|
* The list of games handled by Discord will now be updated automatically.
|
608
982
|
|
609
|
-
###
|
983
|
+
### Fixed
|
610
984
|
* Fixed a bug where command handling would crash if the command didn't exist.
|
611
985
|
|
612
|
-
## 1.3.12
|
986
|
+
## [1.3.12] - 2015-11-30
|
987
|
+
[1.3.12]: https://github.com/meew0/discordrb/releases/tag/v1.3.12
|
988
|
+
|
989
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.3.11...v1.3.12)
|
990
|
+
|
991
|
+
### Added
|
613
992
|
* Add an attribute `Bot.should_parse_self` (false by default) that prevents the bot from raising an event if it receives a message from itself.
|
614
993
|
* `User.bot?` and `Message.from_bot?` were implemented to check whether the user is the bot or the message was sent by it.
|
615
994
|
* Add an event for private messages specifically (`Bot.pm` and `PrivateMessageEvent`)
|
616
995
|
|
617
|
-
###
|
996
|
+
### Fixed
|
618
997
|
* Fix the `MessageEvent` attribute that checks whether the message is from the bot not working at all.
|
619
998
|
|
620
|
-
## 1.3.11
|
999
|
+
## [1.3.11] - 2015-11-29
|
1000
|
+
[1.3.11]: https://github.com/meew0/discordrb/releases/tag/v1.3.11
|
1001
|
+
|
1002
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.3.10...v1.3.11)
|
1003
|
+
|
1004
|
+
### Added
|
621
1005
|
* Add a user selector (`:bot`) that is usable in the `from:` `MessageEvent` attribute to check whether the message was sent by a bot.
|
622
1006
|
|
623
|
-
###
|
1007
|
+
### Fixed
|
624
1008
|
* `Channel.private?` now checks for the server being nil instead of the `is_private` attribute provided by Discord as the latter is unreliable. (wtf)
|
625
1009
|
|
626
|
-
## 1.3.10
|
1010
|
+
## [1.3.10] - 2015-11-28
|
1011
|
+
[1.3.10]: https://github.com/meew0/discordrb/releases/tag/v1.3.10
|
1012
|
+
|
1013
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.3.9...v1.3.10)
|
1014
|
+
|
1015
|
+
### Added
|
627
1016
|
* Add a method `Channel.private?` to check for a PM channel
|
628
1017
|
* Add a `MessageEvent` attribute (`:private`) to check whether a message was sent in a PM channel
|
629
1018
|
* Add various aliases to `MessageEvent` attributes
|
630
1019
|
* Allow regexes to check for strings in `MessageEvent` attributes
|
631
1020
|
|
632
|
-
###
|
1021
|
+
### Fixed
|
633
1022
|
* The `matches_all` method would break in certain edge cases. This didn't really affect discordrb and I don't think anyone else uses that method (it's pretty useless otherwise). This has been fixed
|
634
1023
|
|
635
|
-
## 1.3.9
|
1024
|
+
## [1.3.9] - 2015-11-27
|
1025
|
+
[1.3.9]: https://github.com/meew0/discordrb/releases/tag/v1.3.9
|
1026
|
+
|
1027
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.3.8...v1.3.9)
|
1028
|
+
|
1029
|
+
### Added
|
636
1030
|
* Add awaits, a powerful way to add temporary event handlers.
|
637
1031
|
* Add a `Bot.find` method to fuzzy-search for channels.
|
638
1032
|
* Add methods to kick, ban and unban users.
|
639
1033
|
|
640
|
-
###
|
1034
|
+
### Fixed
|
641
1035
|
* Permission overrides now work correctly for private channels (i. e. they don't exist at all)
|
642
1036
|
* Users joining and leaving servers are now handled correctly.
|
643
1037
|
|
644
|
-
## 1.3.8
|
1038
|
+
## [1.3.8] - 2015-11-12
|
1039
|
+
[1.3.8]: https://github.com/meew0/discordrb/releases/tag/v1.3.8
|
1040
|
+
|
1041
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.3.7...v1.3.8)
|
1042
|
+
|
1043
|
+
### Added
|
645
1044
|
* Added `Bot.users` and `Bot.servers` readers to get the list of users and servers.
|
646
1045
|
|
647
|
-
###
|
1046
|
+
### Fixed
|
648
1047
|
* POST requests to API calls that don't need a payload will now send a `nil` payload instead. This fixes the bot being unable to join any servers and various other latent problems. (#21, thanks @davidkus)
|
649
1048
|
|
650
|
-
## 1.3.7
|
651
|
-
|
1049
|
+
## [1.3.7] - 2015-11-07
|
1050
|
+
[1.3.7]: https://github.com/meew0/discordrb/releases/tag/v1.3.7
|
1051
|
+
|
1052
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.3.6...v1.3.7)
|
652
1053
|
|
653
|
-
###
|
1054
|
+
### Fixed
|
654
1055
|
* Fix the command bot being included wrong, which caused crashes upon startup.
|
655
1056
|
|
656
|
-
## 1.3.6
|
1057
|
+
## [1.3.6] - 2015-11-07
|
1058
|
+
[1.3.6]: https://github.com/meew0/discordrb/releases/tag/v1.3.6
|
1059
|
+
|
1060
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.3.5...v1.3.6)
|
1061
|
+
|
1062
|
+
### Added
|
657
1063
|
* The bot can now be stopped from the script using the new method `Bot.stop`.
|
658
1064
|
|
659
|
-
###
|
1065
|
+
### Fixed
|
660
1066
|
* Fix some wrong file requires which caused crashes sometimes.
|
661
1067
|
|
662
|
-
## 1.3.5
|
1068
|
+
## [1.3.5] - 2015-11-07
|
1069
|
+
[1.3.5]: https://github.com/meew0/discordrb/releases/tag/v1.3.5
|
1070
|
+
|
1071
|
+
[View diff for this release.](https://github.com/meew0/discordrb/compare/v1.3.4...v1.3.5)
|
1072
|
+
|
1073
|
+
### Added
|
663
1074
|
* The bot can now be run asynchronously using `Bot.run(:async)` to do further initialization after the bot was started.
|