discorb 0.12.0 → 0.12.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d57f5fd6920be7c5549687ec85d3012dede743981482fc806099789d3d9f4048
4
- data.tar.gz: 513c3e45c0da27f8e509c4ed7238c5f6da3cd39b61a0681874a97d507068ffc6
3
+ metadata.gz: 2f43c7785e34661458d9837fd1e75877b8d343f8c920021624d92d0fb87c5ee3
4
+ data.tar.gz: f5b1ed37f600c0b2945d737a154c9d07155d38dad1b8c3da58fc209fa2db99a9
5
5
  SHA512:
6
- metadata.gz: 7603b6c7017898fbd705ffaa602f370111c6d122a2e68a7b6c017c6fa622d9b6990e684bf574104844e8dc6601176a47894815cfb3756ae16305fe74709da118
7
- data.tar.gz: 0fa148e0c26c45a8aa0c3a9e2dbdfb4995bc9e939c9588d93b575b711baccc906b20ba3f8edfe4906ae5838565bd0be6befc5cf7e6b2ca25f1f465e21fa6622a
6
+ metadata.gz: 42f7ffe2b1a851123d883f98223b7c8a755d40faff16a29c1eeecc58e3e023817c5a865bd2aaab52001a8311458a656e034de1f3349ed7778b033afd49840634
7
+ data.tar.gz: 3a6789362788a6c16e38ead2f6d463162f6e852da84df703ef90e32e27477fafb3ce611c931c9f1d9516275f21fb7229e4cec51b0110720b870a2d30f474120d
@@ -0,0 +1,30 @@
1
+ ## What does this PR do?
2
+
3
+ <!--
4
+ Please describe the changes you are making (be as descriptive as possible).
5
+ Ex: Fix `Foo#bar`
6
+ Add `Hoge#fuga`
7
+ -->
8
+
9
+ ## Information
10
+
11
+ - [ ] This PR fixes an issue.
12
+ - [ ] This PR adds a new feature.
13
+ - [ ] This PR refactors code.
14
+ - [ ] This PR has breaking changes.
15
+ - [ ] This PR **won't** change the behavior of the code. (e.g. documentation)
16
+ <!-- If you need to add more information, please add it here. -->
17
+
18
+
19
+ ## Checklist
20
+
21
+ - [ ] I have reviewed the code and it is clean and well documented.
22
+ - [ ] I have ran bot and it is working as expected.
23
+ - [ ] I have updated the document.
24
+
25
+ ## Related issues
26
+
27
+ <!--
28
+ If there are any related issues, please add them here.
29
+ If there are no related issues, please write `None`.
30
+ -->
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,25 @@
1
+ # Contributing to the project
2
+
3
+ ## Submitting a bug report
4
+
5
+ Please follow these steps to report a bug:
6
+ 1. Check if the bug already exists in issue tracker. Don't forget to search closed issues too.
7
+ 2. Create issue from [the template](https://github.com/discorb-lib/discorb/issues/new?assignees=&labels=bug&template=bug_report.md).
8
+ 3. Fill in the issue with the information about the bug.
9
+ 4. Submit the issue.
10
+
11
+ ## Submitting a feature request
12
+
13
+ Please follow these steps to request a feature:
14
+ 1. Check if the feature already exists in main branch.
15
+ 2. Check if the request already exists in issue tracker. Don't forget to search closed issues too.
16
+ 3. Create issue from [the template](https://github.com/discorb-lib/discorb/issues/new?assignees=&labels=Feature+Request%2CEnhancement&template=feature_request.md).
17
+ 4. Fill in the issue with the information about the feature.
18
+ 5. Submit the issue.
19
+
20
+ ## Submitting a pull request
21
+
22
+ Please follow these steps to request a pull request:
23
+ 1. Check if the thing you want to request already exists in main branch.
24
+ 2. Check if the request already exists and is merged or closed.
25
+ 3. [Create a pull request](https://github.com/discorb-lib/discorb/compare).
data/Changelog.md CHANGED
@@ -4,6 +4,11 @@
4
4
 
5
5
  ## v0.12
6
6
 
7
+ ### v0.12.1
8
+
9
+ - Fix: Fix some texts
10
+ - Add: Add `User#mention`
11
+
7
12
  ### v0.12.0
8
13
 
9
14
  - Refactor: Refactor the code
@@ -420,11 +420,11 @@ module Discorb
420
420
  #
421
421
  # @param [String, nil] token The token to use.
422
422
  #
423
- # @note If the token is nil, you should use `discorb run` with the `-t` or `--token` option.
423
+ # @note If the token is nil, you should use `discorb run` with the `-e` or `--env` option.
424
424
  #
425
425
  def run(token = nil)
426
426
  token ||= ENV["DISCORB_CLI_TOKEN"]
427
- raise ArgumentError, "Token is not specified, and -t/--token is not specified" if token.nil?
427
+ raise ArgumentError, "Token is not specified, and -e/--env is not specified" if token.nil?
428
428
  case ENV["DISCORB_CLI_FLAG"]
429
429
  when nil
430
430
  start_client(token)
@@ -4,7 +4,7 @@ module Discorb
4
4
  # @return [String] The API base URL.
5
5
  API_BASE_URL = "https://discord.com/api/v9"
6
6
  # @return [String] The version of discorb.
7
- VERSION = "0.12.0"
7
+ VERSION = "0.12.1"
8
8
  # @return [String] The user agent for the bot.
9
9
  USER_AGENT = "DiscordBot (https://discorb-lib.github.io #{VERSION}) Ruby/#{RUBY_VERSION}"
10
10
 
data/lib/discorb/user.rb CHANGED
@@ -26,6 +26,9 @@ module Discorb
26
26
 
27
27
  include Discorb::Messageable
28
28
 
29
+ # @!attribute [r] mention
30
+ # @return [String] The user's mention.
31
+
29
32
  # @private
30
33
  def initialize(client, data)
31
34
  @client = client
@@ -43,6 +46,10 @@ module Discorb
43
46
  "#{@username}##{@discriminator}"
44
47
  end
45
48
 
49
+ def mention
50
+ "<@#{@id}>"
51
+ end
52
+
46
53
  alias to_s_user to_s
47
54
 
48
55
  def inspect
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discorb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sevenc-nanashi
@@ -77,11 +77,13 @@ files:
77
77
  - ".github/ISSUE_TEMPLATE/bug_report.md"
78
78
  - ".github/ISSUE_TEMPLATE/config.yml"
79
79
  - ".github/ISSUE_TEMPLATE/feature_request.md"
80
+ - ".github/PULL_REQUEST_TEMPLATE.md"
80
81
  - ".github/workflows/build_main.yml"
81
82
  - ".github/workflows/build_version.yml"
82
83
  - ".github/workflows/package_register.yml"
83
84
  - ".gitignore"
84
85
  - ".yardopts"
86
+ - CONTRIBUTING.md
85
87
  - Changelog.md
86
88
  - Gemfile
87
89
  - LICENSE.txt