discordrb-blackst0ne 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +7 -0
  2. data/.codeclimate.yml +16 -0
  3. data/.gitignore +16 -0
  4. data/.overcommit.yml +7 -0
  5. data/.rspec +2 -0
  6. data/.rubocop.yml +49 -0
  7. data/.travis.yml +32 -0
  8. data/.yardopts +1 -0
  9. data/CHANGELOG.md +1079 -0
  10. data/CONTRIBUTING.md +13 -0
  11. data/Gemfile +7 -0
  12. data/LICENSE.txt +21 -0
  13. data/README.md +200 -0
  14. data/Rakefile +17 -0
  15. data/bin/console +15 -0
  16. data/bin/setup +7 -0
  17. data/bin/travis_build_docs.sh +17 -0
  18. data/discordrb-webhooks.gemspec +26 -0
  19. data/discordrb.gemspec +44 -0
  20. data/lib/discordrb.rb +30 -0
  21. data/lib/discordrb/api.rb +319 -0
  22. data/lib/discordrb/api/channel.rb +411 -0
  23. data/lib/discordrb/api/invite.rb +44 -0
  24. data/lib/discordrb/api/server.rb +531 -0
  25. data/lib/discordrb/api/user.rb +149 -0
  26. data/lib/discordrb/api/webhook.rb +83 -0
  27. data/lib/discordrb/await.rb +52 -0
  28. data/lib/discordrb/bot.rb +1345 -0
  29. data/lib/discordrb/cache.rb +256 -0
  30. data/lib/discordrb/commands/command_bot.rb +512 -0
  31. data/lib/discordrb/commands/container.rb +113 -0
  32. data/lib/discordrb/commands/events.rb +11 -0
  33. data/lib/discordrb/commands/parser.rb +327 -0
  34. data/lib/discordrb/commands/rate_limiter.rb +144 -0
  35. data/lib/discordrb/container.rb +566 -0
  36. data/lib/discordrb/data.rb +4230 -0
  37. data/lib/discordrb/errors.rb +202 -0
  38. data/lib/discordrb/events/await.rb +48 -0
  39. data/lib/discordrb/events/bans.rb +58 -0
  40. data/lib/discordrb/events/channels.rb +186 -0
  41. data/lib/discordrb/events/generic.rb +127 -0
  42. data/lib/discordrb/events/guilds.rb +186 -0
  43. data/lib/discordrb/events/lifetime.rb +31 -0
  44. data/lib/discordrb/events/members.rb +90 -0
  45. data/lib/discordrb/events/message.rb +295 -0
  46. data/lib/discordrb/events/presence.rb +112 -0
  47. data/lib/discordrb/events/raw.rb +49 -0
  48. data/lib/discordrb/events/reactions.rb +113 -0
  49. data/lib/discordrb/events/roles.rb +88 -0
  50. data/lib/discordrb/events/typing.rb +70 -0
  51. data/lib/discordrb/events/voice_state_update.rb +102 -0
  52. data/lib/discordrb/events/webhooks.rb +61 -0
  53. data/lib/discordrb/gateway.rb +838 -0
  54. data/lib/discordrb/light.rb +8 -0
  55. data/lib/discordrb/light/data.rb +62 -0
  56. data/lib/discordrb/light/integrations.rb +73 -0
  57. data/lib/discordrb/light/light_bot.rb +58 -0
  58. data/lib/discordrb/logger.rb +120 -0
  59. data/lib/discordrb/permissions.rb +124 -0
  60. data/lib/discordrb/version.rb +7 -0
  61. data/lib/discordrb/voice/encoder.rb +108 -0
  62. data/lib/discordrb/voice/network.rb +317 -0
  63. data/lib/discordrb/voice/voice_bot.rb +401 -0
  64. data/lib/discordrb/webhooks.rb +12 -0
  65. data/lib/discordrb/websocket.rb +72 -0
  66. metadata +305 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d9d2b3da2dd5338af37d0cb2840d94f3411fa193c651b2fd3c63983dd4a08421
4
+ data.tar.gz: 81d28c3ac57f349a9eb43bf0ee6fde7657d5941bbf5546c16cb3fe77aa9dd5b1
5
+ SHA512:
6
+ metadata.gz: 16d6d1ec9d92138529ed86690061e30a1c0d30381ba122c3b49476d3dcae94e5b7d5d06362557bf709d2f42de94442610199cd648e211041a7e333b7ee6122f8
7
+ data.tar.gz: 046b1818b86484e6c780e39d8c945c39389ed7a25d3c6bff1a27a06a08113730bbc035599ff9f436baa011831c9a0816268fda7aca85808596c4ea4a392e1941
@@ -0,0 +1,16 @@
1
+ ---
2
+ engines:
3
+ duplication:
4
+ enabled: true
5
+ config:
6
+ languages:
7
+ - ruby
8
+ fixme:
9
+ enabled: true
10
+ rubocop:
11
+ enabled: true
12
+ ratings:
13
+ paths:
14
+ - "**.rb"
15
+ exclude_paths:
16
+ - spec/
@@ -0,0 +1,16 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /profiles/
10
+ /tmp/
11
+ /.idea/
12
+ .DS_Store
13
+ *.gem
14
+ **.sw*
15
+
16
+ /vendor/bundle
@@ -0,0 +1,7 @@
1
+ PreCommit:
2
+ RuboCop:
3
+ enabled: true
4
+ on_warn: fail # Treat all warnings as failures
5
+
6
+ AuthorName:
7
+ enabled: false
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --color
2
+ --require spec_helper
@@ -0,0 +1,49 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.3
3
+
4
+ # Allow 'Pokémon-style' exception handling
5
+ Lint/RescueException:
6
+ Enabled: false
7
+
8
+ # Disable all metrics.
9
+ Metrics:
10
+ Enabled: false
11
+
12
+ # Allow some common and/or obvious short method params
13
+ Naming/UncommunicativeMethodParamName:
14
+ # Duplicate defaults to avoid overriding
15
+ AllowedNames:
16
+ - io
17
+ - id
18
+ - to
19
+ - by
20
+ - on
21
+ - in
22
+ - at
23
+ - ip
24
+ - e
25
+ - _
26
+
27
+ # Ignore `eval` in the examples folder
28
+ Security/Eval:
29
+ Exclude:
30
+ - examples/*
31
+
32
+ # https://stackoverflow.com/q/4763121/
33
+ Style/Alias:
34
+ Enabled: false
35
+
36
+ # Prefer compact module/class defs
37
+ Style/ClassAndModuleChildren:
38
+ Enabled: false
39
+
40
+ # So RuboCop doesn't complain about application IDs
41
+ Style/NumericLiterals:
42
+ Exclude:
43
+ - examples/*
44
+
45
+ # Prefer |m, e| for the `reduce` block arguments
46
+ Style/SingleLineBlockParams:
47
+ Methods:
48
+ - reduce: [m, e]
49
+ - inject: [m, e]
@@ -0,0 +1,32 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.3.7
4
+ - 2.4.4
5
+ - 2.5.1
6
+ before_script:
7
+ - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 -o ./cc-test-reporter
8
+ - chmod +x ./cc-test-reporter
9
+ - ./cc-test-reporter before-build
10
+ script:
11
+ - bundle exec rspec spec
12
+ - bundle exec rubocop -c .rubocop.yml
13
+ - bin/travis_build_docs.sh
14
+ after_script:
15
+ - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
16
+ deploy:
17
+ - provider: pages
18
+ skip-cleanup: true
19
+ github-token: $GITHUB_TOKEN
20
+ keep-history: true
21
+ local-dir: docs
22
+ on:
23
+ branch: master
24
+ rvm: 2.5.1
25
+ - provider: pages
26
+ skip-cleanup: true
27
+ github-token: $GITHUB_TOKEN
28
+ keep-history: true
29
+ local-dir: docs
30
+ on:
31
+ tags: true
32
+ rvm: 2.5.1
@@ -0,0 +1 @@
1
+ --markup markdown --hide-tag todo --fail-on-warning
@@ -0,0 +1,1079 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
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).
6
+
7
+ ## Unreleased
8
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v3.3.0...HEAD)
9
+
10
+ ### Changed
11
+
12
+ - **(breaking change)** Upgraded minimum Ruby version to 2.3.7, and upgraded Rubocop to 0.60.0. This additionally changes the name of some public constants. ([#487](https://github.com/meew0/discordrb/pull/487), thanks @ChallahuAkbar)
13
+ - Dependencies for `rbnacl`, `rake`, and `rspec` have been updated ([#538](https://github.com/meew0/discordrb/pull/538), thanks @ChallahuAkbar)
14
+
15
+ ## [3.3.0] - 2018-10-27
16
+ [3.3.0]: https://github.com/meew0/discordrb/releases/tag/v3.3.0
17
+
18
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v3.2.1...v3.3.0)
19
+
20
+
21
+ ### Summary
22
+
23
+ 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.
24
+
25
+ Since there is a lot here, here are highlights of the more notable changes in this release:
26
+
27
+ - We now use SSL certificate validation in our gateway connections, and enforce use of TLSv1.2. If this is an issue
28
+ for your platform or environment (you get errors related to SSL), please report this with relevant details. You
29
+ can revert to the old codepath at any time by setting `DISCORDRB_SSL_VERIFY_NONE`. This environment variable will
30
+ be removed in a later release when this proves to be a stable default.
31
+
32
+ - `CommandBot` now supports a new method of "aliasing" commands with the `aliases:` keyword. It accepts an array
33
+ of symbols of alternate command names. Currently this is supported by passing an array of symbols for the command
34
+ name itself, but this essentially makes "copies" of the command, meaning each alias will show up in your help command.
35
+ Using `aliases` instead, the library will recognize that these other names *are aliases* instead of copying the command.
36
+ Aliases will be listed when users use `!help` with the command name, or any of its aliases. For now you may chose to use
37
+ either style, but you cannot use both. Specifying an array for the command name is now considered deprecated.
38
+
39
+ - There are now two methods of creating "awaits" in discordrb. The new style is a blocking (synchronous) method that
40
+ uses threads and regular event handlers in the background. The new methods are all named with a bang (`!`),
41
+ i.e. `user.await!`, `message.await!`, and simply return the raised event. This system should be less confusing than
42
+ the current asynchronous one. These blocking awaits no longer have an identifying key and only accept the event
43
+ attributes as an argument. There is also a special reserved attribute called `timeout` that will stop waiting for
44
+ an event and return `nil` if the given number of seconds has passed. Eventually this new system of awaits will
45
+ replace the old one in a later breaking change. A short example:
46
+
47
+ ```ruby
48
+ bot.message(content: '!test') do |event|
49
+ event.respond 'What is your name?'
50
+ response = event.message.await!(timeout: 3)
51
+ if response
52
+ event.respond "Hello, #{response.message.content}!"
53
+ else
54
+ event.respond 'You took too long!'
55
+ end
56
+ end
57
+ ```
58
+
59
+ The entire changelog follows, with items that contain breaking changes noted. If you use parts of the library
60
+ mentioned in a breaking change, you can read the PR and diff for the full details. If you need help with
61
+ understanding, updating your bot, or have any other questions, please feel free to [join us on Discord](https://discord.gg/cyK3Hjm)
62
+ or open an issue if necessary.
63
+
64
+ Thank you to all of our contributors!
65
+
66
+ ### Added
67
+
68
+ - API methods to add and remove single member roles ([#310](https://github.com/meew0/discordrb/pull/310))
69
+ - **(breaking change)** API methods and abstractions for listing available voice regions ([#311](https://github.com/meew0/discordrb/pull/311))
70
+ - `Server` methods to prune members and to get the number of members available for pruning ([#315](https://github.com/meew0/discordrb/pull/315))
71
+ - Methods for filtering the kinds of overwrites present on a channel ([#321](https://github.com/meew0/discordrb/pull/321))
72
+ - `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)
73
+ - Method for returning a `Server`'s `@everyone` role
74
+ - Reactions can now be serialized with `#to_s` to be used in `Message#react` more easily ([#342](https://github.com/meew0/discordrb/pull/342))
75
+ - Additional objects and attributes for parsing embeds on messages ([#344](https://github.com/meew0/discordrb/pull/344), thanks @mattantonelli)
76
+ - 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)
77
+ - API support for managing webhooks ([#356](https://github.com/meew0/discordrb/pull/356), thanks @Daniel-Worrall)
78
+ - Support for reading and managing a channel's `nsfw` property ([#380](https://github.com/meew0/discordrb/pull/380))
79
+ - The `:administrator` permissions value is aliased as `:administrate` ([#322](https://github.com/meew0/discordrb/pull/322))
80
+ - Class methods on `Permissions` for easily building permissions bits values ([#322](https://github.com/meew0/discordrb/pull/322))
81
+ - `Gateway#send_packet` and `Gateway#send_raw` methods to send custom data payloads to the gateway
82
+ - Methods for reading `icon_url` and `proxy_icon_url` in `EmbedAuthor`
83
+ - Methods for obtaining a server and channels invites ([#394](https://github.com/meew0/discordrb/pull/394))
84
+ - Example of using awaits ([#370](https://github.com/meew0/discordrb/pull/370))
85
+ - Methods on `Member` for kicking and banning ([#404](https://github.com/meew0/discordrb/pull/404))
86
+ - API method and abstraction for adding members to guilds with OAuth2 tokens ([#413](https://github.com/meew0/discordrb/pull/413))
87
+ - Example of using a prefix proc ([#411](https://github.com/meew0/discordrb/pull/411))
88
+ - **(breaking change)** Methods for managing a server's system channel ([#437](https://github.com/meew0/discordrb/pull/437), thanks @ldelelis)
89
+ - **(breaking change)** Additional error code constants ([#419](https://github.com/meew0/discordrb/pull/419), thanks @LikeLakers2)
90
+ - 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))
91
+ - **(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)
92
+ - **(breaking change)** `nonce` is accepted in `API::Channel.create_message` ([#414](https://github.com/meew0/discordrb/pull/414), thanks @PixeLInc)
93
+ - Setters for new status options (`Bot#listening=`, `Bot#watching=`) ([#432](https://github.com/meew0/discordrb/pull/432), thanks @PixeLInc)
94
+ - Documentation examples for sending a file ([#409](https://github.com/meew0/discordrb/pull/409))
95
+ - Respondable implements `#send_embed` ([#420](https://github.com/meew0/discordrb/pull/420))
96
+ - `Invite` now supplies `max_age` and `created_at`
97
+ - `Invite` now supplies `member_count` and `online_member_count` ([#454](https://github.com/meew0/discordrb/pull/454), thanks @Snazzah)
98
+ - `Server` methods for managing a server's embed (widget) settings ([#435](https://github.com/meew0/discordrb/pull/435))
99
+ - **(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)
100
+ - `CommandBot` and commands channel whitelist can now be modified after creation ([#446](https://github.com/meew0/discordrb/pull/446), thanks @omnilord)
101
+ - A `Role`'s `position` can now be sorted relative to other roles ([#445](https://github.com/meew0/discordrb/pull/445), thanks @mattantonelli)
102
+ - The `return` keyword inside of commands can be used to return content to Discord ([#462](https://github.com/meew0/discordrb/pull/462), thanks @TrenchFroast)
103
+ - `Emoji` now supplies `animated` ([#464](https://github.com/meew0/discordrb/pull/464), thanks @PixeLInc)
104
+ - Additional instructions for installation of Ruby's devkit for Ruby 2.3+ ([#468](https://github.com/meew0/discordrb/pull/468), thanks @oct2pus)
105
+ - `Server` API for retrieving a server's audit logs ([#353](https://github.com/meew0/discordrb/pull/353), thanks @Snazzah)
106
+ - `EventContainer` methods for server role create, delete, and update events ([#494](https://github.com/meew0/discordrb/pull/494), thanks @Daniel-Worrall)
107
+ - `PlayingEvent` now returns `details` ([#486](https://github.com/meew0/discordrb/pull/486), thanks @xTVaser)
108
+ - `Role` now supplies `server` ([#505](https://github.com/meew0/discordrb/pull/505), thanks @micke)
109
+ - Documentation for the `discordrb-webhooks` gem in `README.md` ([#460](https://github.com/meew0/discordrb/pull/460))
110
+ - A new, synchronous awaits system available via `#await!` ([#499](https://github.com/meew0/discordrb/pull/499))
111
+ - `Channel#sort_after`, for moving a channel around a server within categories easily ([#497](https://github.com/meew0/discordrb/pull/497))
112
+ - The gemspec now includes a link to the changelog ([#515](https://github.com/meew0/discordrb/pull/515), thanks @ChallahuAkbar)
113
+ - Commands can now be restricted by either `allowed_roles` or `required_roles` ([#469](https://github.com/meew0/discordrb/pull/469), thanks @elfenars)
114
+ - `Bot#parse_mention` parses `Channel` mentions ([#525](https://github.com/meew0/discordrb/pull/525), thanks @estherbolik)
115
+ - 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)
116
+ - "Priority Speaker" permission bit ([#530](https://github.com/meew0/discordrb/pull/530), thanks @Chewsterchew)
117
+ - 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))
118
+ - **(breaking change)** Methods for managing a `Channel`'s slowmode settings ([#573](https://github.com/meew0/discordrb/pull/573), thanks @badBlackShark)
119
+
120
+ ### Changed
121
+
122
+ - `Channel#make_invite` now accepts an argument to always return a unique invite code ([#312](https://github.com/meew0/discordrb/pull/312))
123
+ - 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)
124
+ - **(breaking change)** `Channel#history` and `API::Channel.messages` now accepts `around_id` ([#314](https://github.com/meew0/discordrb/pull/314))
125
+ - **(breaking change)** `API::Server.prune_count` accepts `days` ([#315](https://github.com/meew0/discordrb/pull/315))
126
+ - **(breaking change)** Methods for creating channels accept additional arguments ([#321](https://github.com/meew0/discordrb/pull/321))
127
+ - `Channel` overwrite-related API now returns an `Overwrite` object ([#321](https://github.com/meew0/discordrb/pull/321))
128
+ - **(breaking change)** Creating roles now accepts more parameters ([#323](https://github.com/meew0/discordrb/pull/323), thanks @Reaver01)
129
+ - Rate limits are now logged to a `:ratelimit` logging level and can be configured
130
+ - `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))
131
+ - `Voice::Encoder#encode_file` now accepts options for ffmpeg ([#341](https://github.com/meew0/discordrb/pull/341), thanks @oyisre)
132
+ - Objects that implement `IDObject` can now be compared using more operators ([#346](https://github.com/meew0/discordrb/pull/346), thanks @mattantonelli)
133
+ - Filled in permissions bit for viewing a server's audit log ([#349](https://github.com/meew0/discordrb/pull/349), thanks @Daniel-Worrall)
134
+ - 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))
135
+ - Reaction events raised from the bot's actions will respect `parse_self` ([#350](https://github.com/meew0/discordrb/pull/350), thanks @Daniel-Worrall)
136
+ - `Webhooks::Embed#initialize` parses its `color`/`colour` argument ([#364](https://github.com/meew0/discordrb/pull/364), thanks @Daniel-Worrall)
137
+ - Webhook related events can now be matched on webhook ID ([#363](https://github.com/meew0/discordrb/pull/363), thanks @Daniel-Worrall)
138
+ - Discord's default user avatar URLs will now be returned when applicable ([#375](https://github.com/meew0/discordrb/pull/375))
139
+ - `Cache#find_user` can now find individual users if name and discriminator is given ([#384](https://github.com/meew0/discordrb/pull/384))
140
+ - `ReactionEvent` provides both `server` and `member`, if possible ([#351](https://github.com/meew0/discordrb/pull/351), thanks @Daniel-Worrall)
141
+ - 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)
142
+ - **(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))
143
+ - Documentation around the conditions where our API returns `nil` is clarified ([#395](https://github.com/meew0/discordrb/pull/395), thanks @LikeLakers2)
144
+ - Whenever possible, we update cached data about a `Server` returned to us from making changes to it
145
+ - **(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)
146
+ - `Bucket#rate_limited?` now accepts an `increment` value for weighted rate limits ([#427](https://github.com/meew0/discordrb/pull/427), thanks @Lavode)
147
+ - **(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))
148
+ - `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)
149
+ - WSCS verions message is now only printed when using voice functionality ([#438](https://github.com/meew0/discordrb/pull/438), thanks @dreid)
150
+ - **(breaking change)** `API::Server.update_channel` is now `API::Server.update_channel_positions`
151
+ - CI is now tested against Ruby 2.3, 2.4, and 2.5 ([#476](https://github.com/meew0/discordrb/pull/476), thanks @nicolasleger)
152
+ - CI now tests with YARD to validate docstrings
153
+ - Specs for `Channel` are refactored ([#481](https://github.com/meew0/discordrb/pull/481), thanks @Daniel-Worrall)
154
+ - Specs are refactored to not use `module` namespaces ([#520](https://github.com/meew0/discordrb/pull/520), thanks @Daniel-Worrall)
155
+ - `Bot` now logs to `LOGGER.info` when the bot successfully resumes
156
+ - Code climate tooling is updated ([#489](https://github.com/meew0/discordrb/pull/489), thanks @ChallahuAkbar)
157
+ - `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))
158
+ - The changelog now follows the "Keep a Changelog" format ([#504](https://github.com/meew0/discordrb/pull/504), thanks @connorshea)
159
+ - `Bot#run` documentation is adjusted to clarify the use of its async argument ([#521](https://github.com/meew0/discordrb/pull/521))
160
+ - **(breaking change)** `Bot#join` is renamed to `Bot#accept_invite` ([#521](https://github.com/meew0/discordrb/pull/521))
161
+ - `Embed#colour=`/`Embed#color=` now accepts instances of `ColourRGB`/`ColorRGB` ([#523](https://github.com/meew0/discordrb/pull/523))
162
+ - `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)
163
+ - Documentation clarifications around `voice_state_update`, `member_update`, and `server_create` ([#531](https://github.com/meew0/discordrb/pull/531))
164
+ - URLs listed across the code base now use https, various other cleanups ([#540](https://github.com/meew0/discordrb/pull/540), thanks @ChallahuAkbar)
165
+ - 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))
166
+ - 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)
167
+
168
+ ### Deprecated
169
+
170
+ - 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))
171
+
172
+ ### Removed
173
+
174
+ - **(breaking change)** Unsupported `mentions` argument in Create Message API ([#420](https://github.com/meew0/discordrb/pull/420))
175
+ - **(breaking change)** `TrueClass` is no longer an alias for `:debug` logging in `Bot#initialize`
176
+
177
+ ### Fixed
178
+
179
+ - `Errors::MessageTooLong` is now raised correctly ([#325](https://github.com/meew0/discordrb/pull/325), thanks @Daniel-Worrall)
180
+ - Certain `Reaction` related events properly inherit `Event` ([#329](https://github.com/meew0/discordrb/pull/329), thanks @valeth)
181
+ - 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)
182
+ - `Role#members` had a typo preventing it from working ([#340](https://github.com/meew0/discordrb/pull/340))
183
+ - `Message#my_reactions` now correctly returns `Array<Reaction>` ([#342](https://github.com/meew0/discordrb/pull/342))
184
+ - Several internal checks have been added to make bots more resilient to zombie connections
185
+ - Documentation for `TypingEvent` is now more accurate ([#367](https://github.com/meew0/discordrb/pull/367), thanks @Snazzah)
186
+ - Corrected implementation of the `reason` parameter in various API ([#372](https://github.com/meew0/discordrb/pull/372))
187
+ - `CommandBot`'s advanced functionality properly handles empty strings in certain settings ([#379](https://github.com/meew0/discordrb/pull/379), thanks @LikeLakers2)
188
+ - Rate limit headers are processed correctly when running into certain API exceptions ([#440](https://github.com/meew0/discordrb/pull/440), thanks @unleashy)
189
+ - Typos preventing `ArgumentError` from being raised when processing `arg_types` ([#400](https://github.com/meew0/discordrb/pull/400), thanks @Daniel-Worrall)
190
+ - `Server#create_role` correctly accepts a `ColourRGB`/`ColorRGB` via `#combined`
191
+ - `EventContainer#add_handler` correctly adds handlers for events that haven't had internal storage created for them yet
192
+ - 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))
193
+ - 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))
194
+ - Bulk deleting messages properly filters out messages older than two weeks ([#439](https://github.com/meew0/discordrb/pull/439), thanks @Emberwalker)
195
+ - Rate limiting when certain API errors occur are handled properly ([#440](https://github.com/meew0/discordrb/pull/440), thanks @unleashy)
196
+ - Querying the cache for an unknown member no longer adds `nil` elements, which caused unexpected behavior ([#456](https://github.com/meew0/discordrb/pull/456))
197
+ - Logging behaves correctly when token is an empty string ([#449](https://github.com/meew0/discordrb/pull/449), thanks @Daniel-Worrall)
198
+ - Several typos in documentation ([#444](https://github.com/meew0/discordrb/pull/444), thanks @ToppleKek)
199
+ - When possible, `User` objects are now cached from messages instead of making an API request that may fail
200
+ - `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)
201
+ - `EmbedAuthor` sets the correct instance variable for `proxy_icon_url`
202
+ - `ReactionEvent` correctly returns the server on which it occurred ([#484](https://github.com/meew0/discordrb/pull/484), thanks @charagarlnad)
203
+ - `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)
204
+ - `PlayingEvent` now correctly returns `server` ([#486](https://github.com/meew0/discordrb/pull/486), thanks @xTVaser)
205
+ - Roles will no longer be cached twice when using `Server#create_role` ([#488](https://github.com/meew0/discordrb/pull/488))
206
+ - Race condition when creating event handlers inside of other event handlers ([#514](https://github.com/meew0/discordrb/pull/514))
207
+ - 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)
208
+ - 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))
209
+ - `end_with` attribute in `MessageEventHandler` now accepts group-less regular expressions without throwing exceptions ([#571](https://github.com/meew0/discordrb/pull/571), thanks @badBlackShark)
210
+ - `PresenceEvent` is correctly raised when dispatched ([#574](https://github.com/meew0/discordrb/pull/574))
211
+ - `Attachment#initialize` correctly sets `@id` instance variable ([#575](https://github.com/meew0/discordrb/pull/575), thanks @kandayo)
212
+
213
+ ## [3.2.1] - 2017-02-18
214
+ [3.2.1]: https://github.com/meew0/discordrb/releases/tag/v3.2.1
215
+
216
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v3.2.0.1...v3.2.1)
217
+
218
+ ### Changed
219
+ - `Bot#stop` and `Gateway#stop` now explicitly return `nil`, for more convenient use in commands
220
+ - The API method to query for users has been removed as the endpoint no longer exists
221
+ - 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)
222
+ - 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))
223
+
224
+ ### Fixed
225
+ - Fixed another bug with resumes that caused issues when resuming a zombie connection
226
+ - Fixed a bug that caused issues when playing short files ([#326](https://github.com/meew0/discordrb/issues/316))
227
+
228
+ ## [3.2.0.1] - 2017-01-29
229
+ [3.2.0.1]: https://github.com/meew0/discordrb/releases/tag/v3.2.0.1
230
+
231
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v3.2.0...v3.2.0.1)
232
+
233
+ ### Fixed
234
+ - Attempt to fix an issue that causes a strange problem with dependencies when installing discordrb
235
+
236
+ ## [3.2.0] - 2017-01-29
237
+ [3.2.0]: https://github.com/meew0/discordrb/releases/tag/v3.2.0
238
+
239
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v3.1.1...v3.2.0)
240
+
241
+ ### Added
242
+ - Various parts of gateway error handling were improved, leading to significant stability improvements:
243
+ - A long standing bug was fixed that prevented resumes in most cases, which caused unnecessary reconnections.
244
+ - The error handler that handles problems with sending the raw data over TCP now catches errors more broadly.
245
+ - Heartbeat ACKs (opcode 11) are now checked, which allows the client to detect zombie connections early on. If this causes problems for you you can disable it using `bot.gateway.check_heartbeat_acks = false`.
246
+ - Received heartbeats are now properly handled again
247
+ - Added a client for webhooks, implemented as a separate gem `discordrb-webhooks`. This allows the creation of applications that only use webhooks without the overhead provided by the rest of discordrb. The gem is added as a dependency by normal discordrb so you don't need to install it separately if you're already using that.
248
+ - Adding, updating or deleting custom emoji is now supported ([#285](https://github.com/meew0/discordrb/pull/285), thanks @Daniel-Worrall)
249
+ - 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`
250
+ - `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)
251
+ - Added type checking and conversion for commands ([#298](https://github.com/meew0/discordrb/pull/298), thanks @ohtaavi)
252
+ - 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.
253
+ - 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)).
254
+ - Game types and stream URLs are now cached ([#297](https://github.com/meew0/discordrb/issues/297))
255
+ - The default non-streaming game was changed to be `0` instead of `nil` ([#277](https://github.com/meew0/discordrb/pull/277), thanks @zeyla)
256
+ - A method `Channel#delete_message` was added to support deleting single messages by ID without prior resolution.
257
+ - Permission overwrites can now be deleted from channels ([#268](https://github.com/meew0/discordrb/pull/268), thanks @greenbigfrog)
258
+ - There is now a utility method `IDObject.synthesise` that creates snowflakes with specific timestamps out of thin air.
259
+ - Typing events are now respondable, so you can call `#respond` on them for example ([#270](https://github.com/meew0/discordrb/pull/270), thanks @VxJasonxV)
260
+ - 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))
261
+ - 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.
262
+ - Bots can now be set to fully ignore other bots ([#257](https://github.com/meew0/discordrb/pull/257), thanks @greenbigfrog)
263
+ - 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.
264
+ - The default help command no longer shows commands the user can't use ([#275](https://github.com/meew0/discordrb/pull/275), thanks @FormalHellhound)
265
+ - Updated the command example to no longer include user-specific stuff ([#260](https://github.com/meew0/discordrb/issues/260))
266
+ - `Server#role` now resolves IDs, so they can be passed as strings if necessary.
267
+
268
+ ### Fixed
269
+ - Fixed bots' shard settings being ignored in certain cases
270
+ - Parsing role mentions using `Bot#parse_mention` works properly now.
271
+ - Fixed some specific REST methods that were broken by the API module refactor ([#302](https://github.com/meew0/discordrb/pull/302), thanks @LikeLakers2)
272
+ - Cached channel data is now updated properly on change ([#272](https://github.com/meew0/discordrb/issues/272))
273
+ - Users' avatars are now updated properly on change ([#265](https://github.com/meew0/discordrb/pull/265), thanks @Roughsketch)
274
+ - Fixed voice state tracking for newly created channels ([#292](https://github.com/meew0/discordrb/issues/292))
275
+ - Fixed event attribute handling for PlayingEvent ([#303](https://github.com/meew0/discordrb/pull/303), thanks @sven-strothoff)
276
+ - Getting specific emoji by ID no longer fails to resolve non-cached emoji ([#283](https://github.com/meew0/discordrb/pull/283), thanks @greenbigfrog)
277
+ - Voice state update events no longer fail to be raised for users leaving channels, if the event handler had a channel attribute set ([#301](https://github.com/meew0/discordrb/issues/301))
278
+ - Bots that don't define any events should work properly again
279
+ - Fixed error handling for messages over the character limit ([#276](https://github.com/meew0/discordrb/issues/276))
280
+ - Fixed some specific log messages not being called properly ([#263](https://github.com/meew0/discordrb/pull/263), thanks @Roughsketch)
281
+ - Fixed some edge case bugs in the default help command:
282
+ - In the case of too many commands to be sent in the channel, it no longer replies with "Sending help in PM!" when called from PM
283
+ - 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))
284
+ - Fixed a slight formatting mistake
285
+ - Quoted command arguments in `advanced_functionality` are no longer split by newline
286
+ - Fixed a specific edge case in command chain handling where handling commands with the same name as the chain delimiter was broken
287
+
288
+ ## [3.1.1] - 2016-10-21
289
+ [3.1.1]: https://github.com/meew0/discordrb/releases/tag/v3.1.1
290
+
291
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v3.1.0...v3.1.1)
292
+
293
+ ### Fixed
294
+ - An oversight where a `GUILD_DELETE` dispatch would cause an internal error was fixed. ([#256](https://github.com/meew0/discordrb/pull/256), thanks @greenbigfrog)
295
+
296
+ ## [3.1.0] - 2016-10-20
297
+ [3.1.0]: https://github.com/meew0/discordrb/releases/tag/v3.1.0
298
+
299
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v3.0.2...v3.1.0)
300
+
301
+ ### Added
302
+ - Emoji handling support ([#226](https://github.com/meew0/discordrb/pull/226), thanks @greenbigfrog)
303
+ - 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)
304
+ - The bulk deletion endpoint is now exposed directly using the `Channel#delete_messages` method ([#235](https://github.com/meew0/discordrb/pull/235), thanks @z64)
305
+ - The internal settings fields for user statuses that cause statuses to persist across restarts can now be modified ([#233](https://github.com/meew0/discordrb/pull/233), thanks @Daniel-Worrall)
306
+ - A few examples have been added to the docs ([#250](https://github.com/meew0/discordrb/pull/250), thanks @SunDwarf)
307
+ - The specs have been improved; they're still not exhaustive by far but there are at least slightly more now.
308
+
309
+ ### Fixed
310
+ - 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)
311
+ - Fixed logger token redaction.
312
+ - `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)
313
+ - `Profile#on` for member resolution is now no longer overwritten by an alias for `#online` ([#247](https://github.com/meew0/discordrb/pull/247), thanks @Daniel-Worrall)
314
+ - A `CommandBot` without any commands should no longer crash when receiving a message that triggers it ([#242](https://github.com/meew0/discordrb/issues/242))
315
+ - Changing nicknames works again, it has apparently been broken in 3.0.0.
316
+
317
+ ## [3.0.2] - 2016-10-07
318
+ [3.0.2]: https://github.com/meew0/discordrb/releases/tag/v3.0.2
319
+
320
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v3.0.1...v3.0.2)
321
+
322
+ ### Changed
323
+ - A small change to how CommandBot parameter lists are formatted ([#240](https://github.com/meew0/discordrb/pull/240), thanks @FormalHellhound)
324
+
325
+ ### Fixed
326
+ - 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)
327
+
328
+ ## [3.0.1] - 2016-10-01
329
+ [3.0.1]: https://github.com/meew0/discordrb/releases/tag/v3.0.1
330
+
331
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v3.0.0...v3.0.1)
332
+
333
+ A tiny update to support webhook-sent messages properly!
334
+
335
+ ### Added
336
+ - Added the utility methods `Message#webhook?` and `User#webhook?` to check whether a message or a user belongs to a webhook
337
+ - Added `Message#webhook_id` to get the ID of the sending webhook for webhook messages
338
+ - Added the `webhook_commands` parameter to CommandBot that, if false (default true), prevents webhook-sent messages from being parsed and handled as commands.
339
+
340
+ ### Fixed
341
+ - Fixed webhook-sent messages being ignored because their author couldn't be resolved.
342
+ - Fixed a minor performance problem where a CommandBot would create unnecessarily create redundant objects for every received message.
343
+
344
+ ## [3.0.0] - 2016-09-30
345
+ [3.0.0]: https://github.com/meew0/discordrb/releases/tag/v3.0.0
346
+
347
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v2.1.3...v3.0.0)
348
+
349
+ 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.
350
+
351
+ As with 2.0.0, there are some breaking changes! They are, as always, highlighted in bold.
352
+
353
+ ### Added
354
+ - **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).
355
+ - 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.**
356
+ - **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).
357
+ - 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)
358
+ - **Custom prefix handlers for `CommandBot`s now get the full message object as their parameter rather than only the content**, for even more flexibility.
359
+ - 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.
360
+ - **The API module has undergone a refactor**, if you were using any manual API calls you will have to update them to the new format. Specifically, endpoints dealing with channels have been moved to `API::Channel`, ones dealing with users to `API::User` and so on. ([#203](https://github.com/meew0/discordrb/pull/203), thanks @depl0y)
361
+ - **Calling `users` on a text channel will now only return users who have permission to read it** ([#186](https://github.com/meew0/discordrb/issues/186))
362
+ - A variety of new fields have been added to `Message` objects, specifically embeds (`Message#embeds`), when it was last edited (`#edited_timestamp`), whether it uses TTS (`#tts?`), its nonce (`#nonce`), whether it was ever edited (`#edited?`), and whether it mentions everyone (`mention_everyone?`) ([#206](https://github.com/meew0/discordrb/pull/206), thanks @SnazzyPine25)
363
+ - A variety of new functionality has been added to `Server` and `Channel` objects ([#181](https://github.com/meew0/discordrb/pull/181), thanks @SnazzyPine25):
364
+ - Bitrate and user limit can now be read and set for voice channels
365
+ - Server integrations can now be read
366
+ - Server features and verification level can now be read
367
+ - Utility functions to generate widget, widget banner and splash URLs
368
+ - Message pinning is now supported, both reading pin status and pinning existing messages ([#145](https://github.com/meew0/discordrb/issues/145) / [#146](https://github.com/meew0/discordrb/pull/146), thanks @hlaaftana)
369
+ - Support for the new available statuses:
370
+ - `Bot#dnd` to make the bot show up as DnD (red dot)
371
+ - `Bot#invisible` to make the bot show up as offline
372
+ - Setting the bot's status to streaming is now supported ([#128](https://github.com/meew0/discordrb/pull/128) and [#143](https://github.com/meew0/discordrb/pull/143), thanks @SnazzyPine25 and @barkerja)
373
+ - You can now set a message to be sent when a `CommandBot`'s command fails with a `NoPermission` error ([#200](https://github.com/meew0/discordrb/pull/200), thanks @PoVa)
374
+ - There is now an optional field to list the parameters a command can accept ([#201](https://github.com/meew0/discordrb/pull/201), thanks @FormalHellhound)
375
+ - Commands can now have an array of roles set that are required to be able to use it ([#178](https://github.com/meew0/discordrb/pull/178), thanks @PoVa)
376
+ - Methods like `CommandEvent#<<` for quickly responding to an event are now available in `MessageEvent` too ([#154](https://github.com/meew0/discordrb/pull/154), thanks @hlaaftana)
377
+ - Temporary messages, that automatically delete after some time, can now be sent to channels ([#136](https://github.com/meew0/discordrb/issues/136) / [#139](https://github.com/meew0/discordrb/pull/139), thanks @unleashy)
378
+ - Captions can now be sent together with files, and files can be attached to events to be sent on completion ([#130](https://github.com/meew0/discordrb/pull/130), thanks @SnazzyPine25)
379
+ - There is now a `Channel#load_message` method to get a single message by its ID ([#174](https://github.com/meew0/discordrb/pull/174), thanks @z64)
380
+ - `Channel#define_overwrite` can now be used with a `Profile` object, together with some internal changes ([#232](https://github.com/meew0/discordrb/issues/232))
381
+ - There are now endpoint methods to list a server's channels and channel invites ([#197](https://github.com/meew0/discordrb/pull/197))
382
+ - Two methods, `Member#roles=` and `Member#modify_roles` to manipulate a member's roles in a more advanced way have been added ([#223](https://github.com/meew0/discordrb/pull/223), thanks @z64)
383
+ - Role mentionability can now be set using `Role#mentionable=`
384
+ - The current bot's OAuth application can now be read ([#175](https://github.com/meew0/discordrb/pull/175), thanks @SnazzyPine25)
385
+ - You can now mute and deafen other members ([#157](https://github.com/meew0/discordrb/pull/157), thanks @SnazzyPine25)
386
+ - The internal `Logger` now supports writing to a file instead of STDOUT ([#171](https://github.com/meew0/discordrb/issues/171))
387
+ - Building on top of that, you can also write to multiple streams at the same time now, in case you want to have input on both a file and STDOUT, or even more advanced setups. ([#217](https://github.com/meew0/discordrb/pull/217), thanks @PoVa)
388
+ - Roles can now have their permissions bitfield set directly ([#177](https://github.com/meew0/discordrb/issues/177))
389
+ - The `Bot#invite_url` method now supports adding permission bits into the generated URL ([#218](https://github.com/meew0/discordrb/pull/218), thanks @PoVa)
390
+ - A utility method `User#send_file` has been added to directly send a file to a user in PM ([#168](https://github.com/meew0/discordrb/issues/168) / [#172](https://github.com/meew0/discordrb/pull/172), thanks @SnazzyPine25)
391
+ - You can now get the list of members that have a particular role assigned using `Role#members` ([#147](https://github.com/meew0/discordrb/pull/147), thanks @hlaaftana)
392
+ - You can now check whether a `VoiceBot` is playing right now using `#playing?` ([#137](https://github.com/meew0/discordrb/pull/137), thanks @SnazzyPine25)
393
+ - You can now get the channel a `VoiceBot` is playing on ([#138](https://github.com/meew0/discordrb/pull/138), thanks @snapcase)
394
+ - The permissions bit map has been updated for emoji, "Administrator" and nickname changes ([#180](https://github.com/meew0/discordrb/pull/180), thanks @megumisonoda)
395
+ - A method `Bot#connected?` has been added to check whether the bot is currently connected to the gateway.
396
+ - 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.
397
+ - 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)
398
+ - 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).
399
+ - Rogue presences, i.e. presences without an associated cached member, now print a log message instead of being completely ignored
400
+ - A variety of aliases have been added to existing methods.
401
+ - An example to show off voice sending has been added to the repo, and existing examples have been improved.
402
+ - A large amount of fixes and clarifications have been made to the docs.
403
+
404
+ ### Fixed
405
+ - The almost a year old bug where changing the own user's username would reset its avatar has finally been fixed.
406
+ - 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)
407
+ - 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.
408
+ - A message's author will be resolved over the REST API like other objects in case it's not cached yet. This should fix all instances of "Member not cached even thought it should be". ([#210](https://github.com/meew0/discordrb/pull/210), thanks @megumisonoda)
409
+ - Voice state handling has been completely redone, fixing a variety of caching issues. ([#159](https://github.com/meew0/discordrb/issues/159))
410
+ - Getting a voice channel's users no longer does a chunk request ([#142](https://github.com/meew0/discordrb/issues/142))
411
+ - `Channel#define_overwrite` can now be used to define user overwrites, apparently that didn't work at all before
412
+ - Nested command chains where an inner command doesn't exist now no longer crash the command chain handler ([#215](https://github.com/meew0/discordrb/issues/215))
413
+ - Gateway errors should no longer spam the console ([#141](https://github.com/meew0/discordrb/issues/141) / [#148](https://github.com/meew0/discordrb/pull/148), thanks @meew0)
414
+ - Role hoisting (both setting and reading it) should now work properly
415
+ - The `VoiceBot#stop_playing` method should now work more predictably
416
+ - Voice states with a nil channel should no longer crash when accessed ([#183](https://github.com/meew0/discordrb/pull/183), thanks @Apexal)
417
+ - A latent bug in how PM channels were cached is fixed, previously they were cached twice - once by channel ID and once by recipient ID. Now they're only cached by recipient ID.
418
+ - Two problems in how Discord outages are handled are now fixed; the bot should now no longer break when one happens. Specifically, the fixed problems are:
419
+ - `GUILD_DELETE` events for unavailable servers are now ignored
420
+ - Opcode 9 packets which are received while no session currently exists are handled correctly
421
+ - 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)
422
+
423
+ ## [2.1.3] - 2016-06-11
424
+ [2.1.3]: https://github.com/meew0/discordrb/releases/tag/v2.1.3
425
+
426
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v2.1.2...v2.1.3)
427
+
428
+ ### Fixed
429
+ - 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)
430
+ - A mistake in the documentation was fixed ([#140](https://github.com/meew0/discordrb/issues/140))
431
+ - 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))
432
+ - 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))
433
+
434
+ ## [2.1.2] - 2016-05-29
435
+ [2.1.2]: https://github.com/meew0/discordrb/releases/tag/v2.1.2
436
+
437
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v2.1.1...v2.1.2)
438
+
439
+ ### Added
440
+ - A reader was added (`Bot#awaits`) to read the hash of awaits, so ones that aren't necessary anymore can be deleted.
441
+ - `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)
442
+
443
+ ### Fixed
444
+ - A few unresolved links in the documentation were fixed.
445
+ - The tracking of streamed servers was updated so that very long lists of servers should now all be processed.
446
+ - 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)
447
+ - In the rare event that Discord sends a voice state update for a nonexistent member, there should no longer be a gateway error ([#125](https://github.com/meew0/discordrb/issues/125))
448
+ - Network errors (`EPIPE` and the like) should no longer cause an exception while processing ([#127](https://github.com/meew0/discordrb/issues/127))
449
+ - Uncached members in messages are now logged.
450
+
451
+ ## [2.1.1] - 2016-05-08
452
+ [2.1.1]: https://github.com/meew0/discordrb/releases/tag/v2.1.1
453
+
454
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v2.1.0...v2.1.1)
455
+
456
+ ### Fixed
457
+ - Fixed a caching error that occurred when deleting roles ([#113](https://github.com/meew0/discordrb/issues/113))
458
+ - Commands should no longer be triggered with nil authors ([#114](https://github.com/meew0/discordrb/issues/114))
459
+
460
+ ## [2.1.0] - 2016-04-30
461
+ [2.1.0]: https://github.com/meew0/discordrb/releases/tag/v2.1.0
462
+
463
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v2.0.4...v2.1.0)
464
+
465
+ ### Added
466
+ - 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))
467
+ - Members' nicknames can now be set and read (`Member#nick`) and updates to them are being tracked.
468
+ - Roles now have a `mentionable?` property and a `mention` utility method.
469
+ - `Message` now tracks a message's role mentions.
470
+ - The internal REST rate limit handler was updated:
471
+ - It now tracks message rate limits server wide to properly handle new bot account rate limits. ([#100](https://github.com/meew0/discordrb/issues/100))
472
+ - 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.
473
+ - 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))
474
+ - 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))
475
+ - 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))
476
+ - 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))
477
+
478
+ ## [2.0.4] - 2016-04-19
479
+ [2.0.4]: https://github.com/meew0/discordrb/releases/tag/v2.0.4
480
+
481
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v2.0.3...v2.0.4)
482
+
483
+ ### Added
484
+ - Added a utility method `Invite#url` ([#86](https://github.com/meew0/discordrb/issues/86)/[#101](https://github.com/meew0/discordrb/pull/101), thanks @PoVa)
485
+
486
+ ### Fixed
487
+ - 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))
488
+ - Setting avatars should now work again on Windows ([#96](https://github.com/meew0/discordrb/issues/96))
489
+ - Message edit events should no longer be raised with nil authors ([#95](https://github.com/meew0/discordrb/issues/95))
490
+ - Invites can now be created again ([#87](https://github.com/meew0/discordrb/issues/87))
491
+ - 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))
492
+ - Fixed some possible problems with heartbeats not being sent with unstable connections
493
+
494
+ ## [2.0.3] - 2016-04-15
495
+ [2.0.3]: https://github.com/meew0/discordrb/releases/tag/v2.0.3
496
+
497
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v2.0.2...v2.0.3)
498
+
499
+ ### Added
500
+ - All examples now fully use v2 ([#92](https://github.com/meew0/discordrb/pull/92), thanks @snapcase)
501
+ - 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)
502
+ - The log message that occurs when you disconnect from the WebSocket is now more compact ([#90](https://github.com/meew0/discordrb/issues/90))
503
+ - `Bot#ignored?` now exists to check whether a user is ignored
504
+
505
+ ### Fixed
506
+ - A problem where getting channel history would sometimes cause an exception has been fixed ([#88](https://github.com/meew0/discordrb/issues/88))
507
+ - `split_message` should now behave correctly in a specific edge case ([#85](https://github.com/meew0/discordrb/pull/85), thanks @AnhNhan)
508
+ - DCA playback should no longer cause an error when playback ends due to a specific reason
509
+
510
+ ## [2.0.2] - 2016-04-10
511
+ [2.0.2]: https://github.com/meew0/discordrb/releases/tag/v2.0.2
512
+
513
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v2.0.1...v2.0.2)
514
+
515
+ ### Added
516
+ - Added `Server#text_channels` and `#voice_channels` ([#79](https://github.com/meew0/discordrb/issues/79))
517
+ - Added `Server#online_users` ([#80](https://github.com/meew0/discordrb/issues/80))
518
+ - Added `Member#role?` ([#83](https://github.com/meew0/discordrb/issues/83))
519
+ - Added three utility methods `User#online?`, `#offline?`, and `#idle?`
520
+ - `Bot#send_message` can now take channel objects as well as the ID
521
+
522
+ ### Fixed
523
+ - Removing the bot from a server will no longer result in a gateway message error
524
+ - Fixed an exception raised if a previously unavailable guild goes online after the stream timeout
525
+ - `server_create` will no longer be raised for newly available guilds
526
+ - Fixed the annoying message about constant reassignment at startup
527
+ - Fixed an error where rarely a server's owner wouldn't be initialized correctly
528
+
529
+ ## [2.0.1] - 2016-04-10
530
+ [2.0.1]: https://github.com/meew0/discordrb/releases/tag/v2.0.1
531
+
532
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v2.0.0...v2.0.1)
533
+
534
+ ### Added
535
+ - Added some more examples ([#75](https://github.com/meew0/discordrb/pull/75), thanks @greenbigfrog)
536
+ - Users can now be ignored from messages at gateway level (`Bot#ignore_user`, `Bot#unignore_user`)
537
+ - `Member#add_role` and `Member#remove_role` were re-added from User - they were missing before
538
+
539
+ ### Fixed
540
+ - Fixed some typos in the documentation
541
+ - If a server is actually unavailable it will no longer spam the console with timeout messages
542
+ - 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.
543
+ - Fixed a bug where playing something right after connecting to voice would sometimes cause the encryption key to not be set
544
+
545
+ ## [2.0.0] - 2016-04-08
546
+ [2.0.0]: https://github.com/meew0/discordrb/releases/tag/v2.0.0
547
+
548
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.8.1...v2.0.0)
549
+
550
+ ### Added
551
+ 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.
552
+
553
+ - **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:
554
+ ```rb
555
+ # Previously
556
+ bot = Discordrb::Bot.new 'email@example.com', 'hunter2', true
557
+
558
+ # Now
559
+ bot = Discordrb::Bot.new email: 'email@example.com', password: 'hunter2', log_mode: :debug
560
+ ```
561
+ ```rb
562
+ # Previously
563
+ bot = Discordrb::Bot.new :token, 'TOKEN HERE'
564
+
565
+ # Now
566
+ bot = Discordrb::Bot.new token: 'TOKEN HERE', application_id: 163456789123456789
567
+ ```
568
+ ```rb
569
+ # Previously
570
+ bot = Discordrb::Commands::CommandBot.new :token, 'TOKEN HERE', '!', nil, {advanced_functionality: false}
571
+
572
+ # Now
573
+ bot = Discordrb::Commands::CommandBot.new token: 'TOKEN HERE', application_id: 163456789123456789, prefix: '!', advanced_functionality: false
574
+ ```
575
+ - Connecting to multiple voice channels at once (only available with bot accounts) is now supported. **This means `bot.voice` now takes the server ID as the parameter**. For a seamless switch, the utility method `MessageEvent#voice` was added - simply replace `bot.voice` with `event.voice` in all instances.
576
+ - **The `Member` and `Recipient` classes were split off from `User`**. Members are users on servers and recipients are partners in private messages. Since both are delegates to `User`, most things will work as before, but most notably roles were changed to no longer be by ID (for example, instead of `event.author.roles(event.server.id)`, you'd just use `event.author.roles` instead).
577
+ - **All previously deprecated methods were removed.** This includes:
578
+ - `Server#afk_channel_id=` (use `afk_channel=`, it works with the ID too)
579
+ - `Channel#is_private` (use `private?` instead, it's more reliable with edge cases like Twitch subscriber-only channels)
580
+ - `Bot#find` (use `find_channel` instead, it does the exact same thing without confusion with `find_user`)
581
+ - **`Server` is now used instead of `Guild` in all external methods and classes.** Previously, all the events regarding roles and such were called `GuildRoleXYZEvent`, now they're all called `ServerRoleXYZEvent` for consistency with other attributes and methods.
582
+ - **`advanced_functionality` is now disabled by default.** If you absolutely need it, you can easily re-enable it by just setting that parameter in the CommandBot initializer, but for most people that didn't need it this will fix some bugs with mentions in commands and such.
583
+ - **`User#bot?` was renamed to `User#current_bot?`** with the addition of the `User#bot_account?` reader to check for bot account-ness (the "BOT" tag visible on Discord)
584
+ - Member chunks will no longer automatically be requested on startup, but rather once they're actually needed (`event.server.members`). This is both a performance change (much faster startup for large bots especially) and an important API compliance one - this is what the Discord devs have requested.
585
+ - Initial support for bots that have no WebSocket connection was started. This is useful for web apps that need to get information on something without having to run something in the background all the time. A tutorial on these will be coming soon, in the meantime, use this short example:
586
+ ```rb
587
+ require 'discordrb'
588
+ require 'discordrb/light'
589
+
590
+ bot = Discordrb::Light::LightBot.new 'token here'
591
+ puts bot.profile.username
592
+ ```
593
+ - OAuth bot accounts are now better supported using a method `Bot#invite_url` to get a bot's invite URL and sending tokens using the new `Bot` prefix.
594
+ - discordrb now fully uses [websocket-client-simple](https://github.com/shokai/websocket-client-simple) (a.k.a. WSCS) instead of Faye::WebSocket, this means that the annoying OpenSSL library thing won't have to be done anymore.
595
+ - The new version of the Discord gateway (v4) is supported and used by default. This should bring more stability and possibly slight performance improvements.
596
+ - Some older v3 features that weren't supported before are now:
597
+ - Compressed ready packets (should decrease network overhead for very large bots)
598
+ - Discord rate limits are now supported better - the client will never send a message if it knows it's going to be rate limited, instead it's going to wait for the correct time.
599
+ - Requests will now automatically be retried if a 502 (cloudflare error) is received.
600
+ - `MessageEditEvent`s now have a whole message instead of just the ID to allow for checking the content of edited messages.
601
+ - `Message`s now have an `attachments` array with files attached to the message.
602
+ - `ReadyEvent` and `DisconnectEvent` now have the bot as a readable attribute - useful for container-based bots that don't have a way to get them otherwise.
603
+ - `Bot#find_channel` can now parse channel mentions and search for specific types of channels (text or voice).
604
+ - `Server#create_channel` can now create voice channels.
605
+ - A utility function `User#distinct` was added to get the distinct representation of a user (i.e. name + discrim, for example "meew0#9811")
606
+ - The `User#discriminator` attribute now has more aliases (`#tag`, `#discord_tag`, `#discrim`)
607
+ - `Permission` objects can now be created or set even without a role writer, useful to quickly get byte representations of permissions
608
+ - Permission overwrites can now be defined more easily using the utility method `Channel#define_overwrite`
609
+ - `Message`s returned at the end of commands (for example using `User#pm` or `Message#edit`) will now no longer be sent ([#66](https://github.com/meew0/discordrb/issues/66))
610
+ - The `:with_text` event attribute is now aliased to `:exact_text` ([#65](https://github.com/meew0/discordrb/issues/65))
611
+ - Server icons (`Server#icon=`) can now be set just like avatars (`Profile#avatar=`)
612
+ - Lots of comments were added to the examples and some bugs fixed
613
+ - The overall performance and memory usage was improved, especially on Ruby 2.3 (using the new frozen string literal comment)
614
+ - The documentation was slightly improved.
615
+
616
+ ### Fixed
617
+ - 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.
618
+ - **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.
619
+ - Permission calculation (`User#permission?`) has been thoroughly rewritten and should now account for edge cases like server owners and Manage Permissions.
620
+ - 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.
621
+ - Commands with aliases now show up correctly in the auto-generated help command ([#72](https://github.com/meew0/discordrb/issues/72))
622
+ - 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))
623
+ - Including empty containers now does nothing instead of raising an error
624
+ - Command bots now obey `should_parse_self`
625
+
626
+ ## [1.8.1] - 2016-03-11
627
+ [1.8.1]: https://github.com/meew0/discordrb/releases/tag/v1.8.1
628
+
629
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.8.0...v1.8.1)
630
+
631
+ ### Fixed
632
+ * 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.
633
+
634
+ ## [1.8.0] - 2016-03-11
635
+ [1.8.0]: https://github.com/meew0/discordrb/releases/tag/v1.8.0
636
+
637
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.7.5...v1.8.0)
638
+
639
+ ### Added
640
+ * The built-in logger has been somewhat redone.
641
+ * 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.
642
+ * It now supports more things than just `debug`, there's also `warn`, `error`, `good`, `info`, `in`, and `out`.
643
+ * You now have finer control over what gets output, using `Discordrb::LOGGER.mode=` which accepts one of `:debug`, `:verbose`, `:normal`, `:quiet`, `:silent`.
644
+ * You can now log in with just a token by setting the email parameter to `:token` and the password to the token you want to log in with.
645
+ * DCA playback now supports `DCA1`.
646
+ * All data classes (now generalized using the `IDObject` mixin) have a `creation_date` parameter that specifies when the object was created.
647
+ * `Channel#mention` was added that mentions a channel analogous to `User#mention`.
648
+ * The aliases `tag` and `discord_tag` have been added to the discriminator because that's what Discord calls them now.
649
+
650
+ ### Fixed
651
+ * A problem some users had where voice playback would leak FFmpeg processes has been fixed.
652
+ * The VWS internal thread now has a name in debug messages (`vws-i`)
653
+ * Users' voice channels should now always be set if they are in one
654
+
655
+ ## [1.7.5] - 2016-03-03
656
+ [1.7.5]: https://github.com/meew0/discordrb/releases/tag/v1.7.5
657
+
658
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.7.4...v1.7.5)
659
+
660
+ ### Changed
661
+ * `Channel#send_message` and `Bot#send_message` now have an extra `tts` parameter (false by default) to specify whether the message should use TTS.
662
+
663
+ ### Fixed
664
+ * Attempting to `p` a data class, especially a `User` or `Profile`, should no longer lock up the interpreter due to very deep recursion.
665
+ * Manual TTS using `API.send_message` will now work correctly.
666
+
667
+ ## [1.7.4] - 2016-02-28
668
+ [1.7.4]: https://github.com/meew0/discordrb/releases/tag/v1.7.4
669
+
670
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.7.3...v1.7.4)
671
+
672
+ ### Added
673
+ * Added methods `Channel#text?` and `Channel#voice?` to check a channel's type.
674
+ * Frequently allocated strings have been turned into symbols or frozen constants, this should improve performance slightly.
675
+
676
+ ### Fixed
677
+ * `VoiceBot#destroy` will now properly disconnect you and should no longer cause segfaults.
678
+ * Fixed a bug where you couldn't set any settings on a role created using `Server#create_role`.
679
+ * Fixed `Profile#avatar=` doing absolutely nothing.
680
+
681
+ ## [1.7.3] - 2016-02-27
682
+ [1.7.3]: https://github.com/meew0/discordrb/releases/tag/v1.7.3
683
+
684
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.7.2...v1.7.3)
685
+
686
+ ### Added
687
+ * The server banlist can now be accessed more nicely using `Server#bans`.
688
+ * 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.
689
+
690
+ ## [1.7.2] - 2016-02-25
691
+ [1.7.2]: https://github.com/meew0/discordrb/releases/tag/v1.7.2
692
+
693
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.7.1...v1.7.2)
694
+
695
+ ### Changed
696
+ * The `bot` object can now be read from all events, not just from command ones.
697
+ * 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.
698
+
699
+ ## [1.7.1] - 2016-02-23
700
+ [1.7.1]: https://github.com/meew0/discordrb/releases/tag/v1.7.1
701
+
702
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.7.0...v1.7.1)
703
+
704
+ ### Added
705
+ * 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.)
706
+
707
+ ### Fixed
708
+ * The tokens will now be verified correctly when obtained from the cache. (I messed up last time)
709
+ * Events of the same type in different containers will now be merged correctly when including both containers.
710
+ * 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)
711
+
712
+ ## [1.7.0] - 2016-02-23
713
+ [1.7.0]: https://github.com/meew0/discordrb/releases/tag/v1.7.0
714
+
715
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.6.6...v1.7.0)
716
+
717
+ ### Added
718
+ * **`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.
719
+ * 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.
720
+ * Events and commands can now be thoroughly modularized using a system I call 'containers'. (TODO: Add a tutorial here later)
721
+ * Support for the latest API changes:
722
+ * `Server.leave` does something different than `Server.delete`
723
+ * The WebSocket connection now uses version 3 of the protocol
724
+ * 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)
725
+ * 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.
726
+ * 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.)
727
+ * [`Server#members`](https://www.rubydoc.info/github/meew0/discordrb/master/Discordrb%2FServer%3Amembers) is now aliased to `users`.
728
+ * 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.
729
+ * 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.
730
+ * Some more specific error classes have been added to replace the RestClient generic ones.
731
+ * Quickly sending a message using the `event << 'text'` syntax now works in every type of message event, not just commands.
732
+ * 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.
733
+ * 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).
734
+ * 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)
735
+ * Connecting to the WebSocket now uses an exponential falloff system so we don't spam Discord with requests anymore.
736
+ * Debug timestamps are now accurate to milliseconds.
737
+
738
+ ### Fixed
739
+ * The token cacher will now detect whether a cached token has been invalidated due to a password change.
740
+ * `break`ing from an event or command will no longer spew `LocalJumpError`s to the console.
741
+
742
+ ## [1.6.6] - 2016-02-13
743
+ [1.6.6]: https://github.com/meew0/discordrb/releases/tag/v1.6.6
744
+
745
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.6.5...v1.6.6)
746
+
747
+ ### Fixed
748
+ * Fixed a problem that would cause an incompatibility with Ruby 2.1
749
+ * Fixed servers sometimes containing duplicate members
750
+
751
+ ## [1.6.5] - 2016-02-12
752
+ [1.6.5]: https://github.com/meew0/discordrb/releases/tag/v1.6.5
753
+
754
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.6.4...v1.6.5)
755
+
756
+ ### Changed
757
+ * 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).
758
+
759
+ ## [1.6.4] - 2016-02-10
760
+ [1.6.4]: https://github.com/meew0/discordrb/releases/tag/v1.6.4
761
+
762
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.6.3...v1.6.4)
763
+
764
+ ### Fixed
765
+ * Fixed a bug that made the joining of servers using an invite impossible.
766
+
767
+ ## [1.6.3] - 2016-02-08
768
+ [1.6.3]: https://github.com/meew0/discordrb/releases/tag/v1.6.3
769
+
770
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.6.2...v1.6.3)
771
+
772
+ ### Fixed
773
+ * Fixed a bug that prevented the banning of users over the API
774
+
775
+ ## [1.6.2] - 2016-02-06
776
+ [1.6.2]: https://github.com/meew0/discordrb/releases/tag/v1.6.2
777
+
778
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.6.1...v1.6.2)
779
+
780
+ ### Fixed
781
+ * 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.
782
+
783
+ ## [1.6.1] - 2016-02-04
784
+ [1.6.1]: https://github.com/meew0/discordrb/releases/tag/v1.6.1
785
+
786
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.6.0...v1.6.1)
787
+
788
+ ### Changed
789
+ * 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.
790
+
791
+ ### Fixed
792
+ * Token cache files with invalid JSON syntax will no longer crash the bot at login.
793
+
794
+ ## [1.6.0] - 2016-02-01
795
+ [1.6.0]: https://github.com/meew0/discordrb/releases/tag/v1.6.0
796
+
797
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.5.4...v1.6.0)
798
+
799
+ ### Added
800
+ * 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/).
801
+ * 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.
802
+ * The [new library comparison](https://discordapi.com/unofficial/comparison.html) is now fully supported, barring voice receive and multi-send: (#39)
803
+ * `bot.invite` will create an `Invite` object from a code containing information about it.
804
+ * `server.move(user, channel)` will move a user to a different voice channel.
805
+ * The events `bot.message_edit` and `bot.message_delete` are now available for message editing and deletion. Note that Discord doesn't provide the content of edited/deleted messages, so you'll have to implement message caching yourself if you really need it.
806
+ * The events `bot.user_ban` and `bot.user_unban` are now available for users getting banned/unbanned from servers.
807
+ * A bot's name can now be sent using `bot.name=`. This data will be sent to Discord with the user-agent and it might be used for cool statistics in the future.
808
+ * Discord server ownership transfer is now implemented using the writer `server.owner=`. (#41)
809
+ * `CommandBot`s can now have command aliases by simply using an array of symbols as the command name.
810
+ * A utility method `server.default_channel` was implemented that returns the default text channel of a server, usually called #general. (An alias `general_channel` is available too.)
811
+ * Tokens will no longer appear in debug output, so you're safe sending output logs to other people.
812
+ * A reader `server.owner` that returns the server's owner as a `User` was added. Previously, users had to manually get the `User` object using `bot.user`.
813
+ * Most methods that accept IDs or data objects now also accept `Integer`s or `String`s containing the IDs now. This is implemented by adding a method `resolve_id` to all objects that could potentially contain an ID. (Note that this change is not complete yet and I might have missed some methods.) (#40)
814
+ * The writer `server.afk_channel_id=` is now deprecated as its functionality is now covered by `server.afk_channel=`.
815
+ * A new reader `user.avatar_url` was added that returns the full image URL to a user's avatar.
816
+ * To avoid confusion with `avatar_url`, the reader `user.avatar` was renamed to `avatar_id`. (`user.avatar` still exists but is now deprecated.)
817
+ * Symbols are now used instead of strings as hash keys in all methods that send JSON data to somewhere. This might improve performance slightly.
818
+
819
+ ### Fixed
820
+ * Fixed the reader `server.afk_channel_id` not containing a value sometimes.
821
+ * 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.
822
+ * 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.
823
+ * The `inviter` of an `Invite` will now be `nil` instead of causing an exception when it doesn't exist in the invite data.
824
+
825
+ ## [1.5.4] - 2016-01-16
826
+ [1.5.4]: https://github.com/meew0/discordrb/releases/tag/v1.5.4
827
+
828
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.5.3...v1.5.4)
829
+
830
+ ### Changed
831
+ * 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)
832
+
833
+ ### Fixed
834
+ * Voice volume can now be properly set when using avconv (#37, thanks @purintai)
835
+ * `websocket-client-simple`, which is required for voice, is now specified in the dependencies.
836
+
837
+ ## [1.5.3] - 2016-01-11
838
+ [1.5.3]: https://github.com/meew0/discordrb/releases/tag/v1.5.3
839
+
840
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.5.2...v1.5.3)
841
+
842
+ ### Added
843
+ * 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)
844
+ * 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)
845
+
846
+ ## [1.5.2] - 2016-01-11
847
+ [1.5.2]: https://github.com/meew0/discordrb/releases/tag/v1.5.2
848
+
849
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.5.1...v1.5.2)
850
+
851
+ ### Added
852
+ * `bot.voice_connect` can now use a channel ID directly.
853
+ * A reader `bot.volume` now exists for the corresponding writer.
854
+ * The attribute `bot.encoder.use_avconv` was added that makes the bot use avconv instead of ffmpeg (for those on Ubuntu 14.x)
855
+ * The PBKDF2 iteration count for token caching was increased to 300,000 for extra security.
856
+
857
+ ### Fixed
858
+ * Fix a bug where `play_file` wouldn't properly accept string file paths (#36, thanks @purintai)
859
+ * Fix a concurrency issue where `VoiceBot` would try to read from nil
860
+
861
+ ## [1.5.1] - 2016-01-10
862
+ [1.5.1]: https://github.com/meew0/discordrb/releases/tag/v1.5.1
863
+
864
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.5.0...v1.5.1)
865
+
866
+ ### Added
867
+ * 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`.
868
+
869
+ ## [1.5.0] - 2016-01-10
870
+ [1.5.0]: https://github.com/meew0/discordrb/releases/tag/v1.5.0
871
+
872
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.4.8...v1.5.0)
873
+
874
+ ### Added
875
+ * Voice support: discordrb can now connect to voice using `bot.voice_connect` and do the following things:
876
+ * Play files and URLs using `VoiceBot.play_file`
877
+ * Play arbitrary streams using `VoiceBot.play_io`
878
+ * Set the volume of future playbacks using `VoiceBot.volume=`
879
+ * Pause and resume playback (`VoiceBot.pause` and `VoiceBot.continue`)
880
+ * 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.
881
+
882
+ ### Fixed
883
+ * Some latent ID casting errors were fixed - those would probably never have been noticed anyway, but they're fixed now.
884
+ * `Bot.parse_mention` now works, it didn't work at all previously
885
+
886
+ ## [1.4.8] - 2016-01-06
887
+ [1.4.8]: https://github.com/meew0/discordrb/releases/tag/v1.4.8
888
+
889
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.4.7...v1.4.8)
890
+
891
+ ### Added
892
+ * The `User` class now has the methods `add_role` and `remove_role` which add a role to a user and remove it, respectively.
893
+ * All data classes now have a useful `==` implementation.
894
+ * **The `Game` class and all references to it were removed**. Games are now only identified by their name.
895
+
896
+ ### Fixed
897
+ * When a role is deleted, the ID is now obtained correctly. (#30)
898
+
899
+ ## [1.4.7] - 2016-01-03
900
+ [1.4.7]: https://github.com/meew0/discordrb/releases/tag/v1.4.7
901
+
902
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.4.6...v1.4.7)
903
+
904
+ ### Added
905
+ * Presence event handling is now divided into two separate events; `PresenceEvent` to handle online/offline/idle statuses and `PlayingEvent` to handle users playing games.
906
+ * 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.
907
+ * `Message` now has a useful `to_s` method that just returns the content.
908
+
909
+ ### Fixed
910
+ * The `TypingEvent` `user` property is now initialized correctly (#29, thanks @purintai)
911
+
912
+ ## [1.4.6] - 2015-12-25
913
+ [1.4.6]: https://github.com/meew0/discordrb/releases/tag/v1.4.6
914
+
915
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.4.4...v1.4.6)
916
+
917
+ ### Fixed
918
+ * The `user` and `server` properties of `PresenceEvent` are now initialized correctly.
919
+
920
+ ## 1.4.5
921
+ <!-- This was never tagged in the git repo -->
922
+ ### Changed
923
+ * The `Bot.game` property can now be set to an arbitrary string.
924
+ * Discord mentions are handled in the old way again, after Discord reverted an API change.
925
+
926
+ ## [1.4.4] - 2015-12-18
927
+ [1.4.4]: https://github.com/meew0/discordrb/releases/tag/v1.4.4
928
+
929
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.4.3...v1.4.4)
930
+
931
+ ### Added
932
+ * Add `Server.leave_server` as an alias for `delete_server`
933
+ * Use the new Discord mention format (mentions array). **Reverted in 1.4.5**
934
+ * Discord rate limited API calls are now handled correctly - discordrb will try again after the specified time.
935
+ * Debug logging is now handled by a separate `Logger` class
936
+
937
+ ### Fixed
938
+ * Message timestamps are now parsed correctly.
939
+ * The quickadders for awaits (`User.await`, `Channel.await` etc.) now add the correct awaits.
940
+
941
+ ## [1.4.3] - 2015-12-11
942
+ [1.4.3]: https://github.com/meew0/discordrb/releases/tag/v1.4.3
943
+
944
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.4.2...v1.4.3)
945
+
946
+ ### Added
947
+ * Added a method `Bot.find_user` analogous to `Bot.find`.
948
+
949
+ ### Fixed
950
+ * Remove a leftover debug line (#23, thanks @VxJasonxV)
951
+
952
+ ## [1.4.2] - 2015-12-10
953
+ [1.4.2]: https://github.com/meew0/discordrb/releases/tag/v1.4.2
954
+
955
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.4.1...v1.4.2)
956
+
957
+ ### Changed
958
+ * discordrb will now send a user agent in the format requested by the Discord devs.
959
+
960
+ ## [1.4.1] - 2015-12-07
961
+ [1.4.1]: https://github.com/meew0/discordrb/releases/tag/v1.4.1
962
+
963
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.4.0...v1.4.1)
964
+
965
+ ### Fixed
966
+ * Empty messages will now never be sent
967
+ * The command-not-found message in `CommandBot` can now be disabled properly
968
+
969
+ ## [1.4.0] - 2015-12-04
970
+ [1.4.0]: https://github.com/meew0/discordrb/releases/tag/v1.4.0
971
+
972
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.3.12...v1.4.0)
973
+
974
+ ### Added
975
+ * 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).
976
+ * discordrb now supports everything on the Discord API comparison, except for voice (see also #22)
977
+ * Roles can now be created, edited and deleted and their permissions modified.
978
+ * There is now a method to get a channel's message history.
979
+ * The bot's user profile can now be edited.
980
+ * Servers can now be created, edited and deleted.
981
+ * The user can now display a "typing" message in a channel.
982
+ * Invites can now be created and deleted, and an `Invite` class was made to represent them.
983
+ * Command and event handling is now threaded, with each command/event handler execution in a separate thread.
984
+ * Debug messages now specify the current thread's name.
985
+ * discordrb now handles created/updated/deleted servers properly with events added to handle them.
986
+ * The list of games handled by Discord will now be updated automatically.
987
+
988
+ ### Fixed
989
+ * Fixed a bug where command handling would crash if the command didn't exist.
990
+
991
+ ## [1.3.12] - 2015-11-30
992
+ [1.3.12]: https://github.com/meew0/discordrb/releases/tag/v1.3.12
993
+
994
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.3.11...v1.3.12)
995
+
996
+ ### Added
997
+ * 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.
998
+ * `User.bot?` and `Message.from_bot?` were implemented to check whether the user is the bot or the message was sent by it.
999
+ * Add an event for private messages specifically (`Bot.pm` and `PrivateMessageEvent`)
1000
+
1001
+ ### Fixed
1002
+ * Fix the `MessageEvent` attribute that checks whether the message is from the bot not working at all.
1003
+
1004
+ ## [1.3.11] - 2015-11-29
1005
+ [1.3.11]: https://github.com/meew0/discordrb/releases/tag/v1.3.11
1006
+
1007
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.3.10...v1.3.11)
1008
+
1009
+ ### Added
1010
+ * Add a user selector (`:bot`) that is usable in the `from:` `MessageEvent` attribute to check whether the message was sent by a bot.
1011
+
1012
+ ### Fixed
1013
+ * `Channel.private?` now checks for the server being nil instead of the `is_private` attribute provided by Discord as the latter is unreliable. (wtf)
1014
+
1015
+ ## [1.3.10] - 2015-11-28
1016
+ [1.3.10]: https://github.com/meew0/discordrb/releases/tag/v1.3.10
1017
+
1018
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.3.9...v1.3.10)
1019
+
1020
+ ### Added
1021
+ * Add a method `Channel.private?` to check for a PM channel
1022
+ * Add a `MessageEvent` attribute (`:private`) to check whether a message was sent in a PM channel
1023
+ * Add various aliases to `MessageEvent` attributes
1024
+ * Allow regexes to check for strings in `MessageEvent` attributes
1025
+
1026
+ ### Fixed
1027
+ * 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
1028
+
1029
+ ## [1.3.9] - 2015-11-27
1030
+ [1.3.9]: https://github.com/meew0/discordrb/releases/tag/v1.3.9
1031
+
1032
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.3.8...v1.3.9)
1033
+
1034
+ ### Added
1035
+ * Add awaits, a powerful way to add temporary event handlers.
1036
+ * Add a `Bot.find` method to fuzzy-search for channels.
1037
+ * Add methods to kick, ban and unban users.
1038
+
1039
+ ### Fixed
1040
+ * Permission overrides now work correctly for private channels (i. e. they don't exist at all)
1041
+ * Users joining and leaving servers are now handled correctly.
1042
+
1043
+ ## [1.3.8] - 2015-11-12
1044
+ [1.3.8]: https://github.com/meew0/discordrb/releases/tag/v1.3.8
1045
+
1046
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.3.7...v1.3.8)
1047
+
1048
+ ### Added
1049
+ * Added `Bot.users` and `Bot.servers` readers to get the list of users and servers.
1050
+
1051
+ ### Fixed
1052
+ * 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)
1053
+
1054
+ ## [1.3.7] - 2015-11-07
1055
+ [1.3.7]: https://github.com/meew0/discordrb/releases/tag/v1.3.7
1056
+
1057
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.3.6...v1.3.7)
1058
+
1059
+ ### Fixed
1060
+ * Fix the command bot being included wrong, which caused crashes upon startup.
1061
+
1062
+ ## [1.3.6] - 2015-11-07
1063
+ [1.3.6]: https://github.com/meew0/discordrb/releases/tag/v1.3.6
1064
+
1065
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.3.5...v1.3.6)
1066
+
1067
+ ### Added
1068
+ * The bot can now be stopped from the script using the new method `Bot.stop`.
1069
+
1070
+ ### Fixed
1071
+ * Fix some wrong file requires which caused crashes sometimes.
1072
+
1073
+ ## [1.3.5] - 2015-11-07
1074
+ [1.3.5]: https://github.com/meew0/discordrb/releases/tag/v1.3.5
1075
+
1076
+ [View diff for this release.](https://github.com/meew0/discordrb/compare/v1.3.4...v1.3.5)
1077
+
1078
+ ### Added
1079
+ * The bot can now be run asynchronously using `Bot.run(:async)` to do further initialization after the bot was started.