Skip to content

Commit

Permalink
Add since 0.10.0 tags to changes since 0.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Th3-M4jor committed Jun 2, 2024
1 parent 1a695c0 commit 51a184a
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/nostrum/api.ex
Original file line number Diff line number Diff line change
Expand Up @@ -1424,6 +1424,7 @@ defmodule Nostrum.Api do
Returns a `t:Nostrum.Struct.Sticker.t/0`.
"""
@doc since: "0.10.0"
@spec get_sticker(Snowflake.t()) :: {:ok, Sticker.t()} | error
def get_sticker(sticker_id) do
request(:get, Constants.sticker(sticker_id))
Expand All @@ -1435,6 +1436,7 @@ defmodule Nostrum.Api do
Returns a list of `t:Nostrum.Struct.Sticker.t/0`.
"""
@doc since: "0.10.0"
@spec list_guild_stickers(Guild.id()) :: {:ok, [Sticker.t()]} | error
def list_guild_stickers(guild_id) do
request(:get, Constants.guild_stickers(guild_id))
Expand All @@ -1446,6 +1448,7 @@ defmodule Nostrum.Api do
Returns a `t:Nostrum.Struct.Sticker.t/0`.
"""
@doc since: "0.10.0"
@spec get_guild_sticker(Guild.id(), Sticker.id()) :: Sticker.t() | error
def get_guild_sticker(guild_id, sticker_id) do
request(:get, Constants.guild_sticker(guild_id, sticker_id))
Expand Down Expand Up @@ -1476,6 +1479,7 @@ defmodule Nostrum.Api do
Returns a `t:Nostrum.Struct.Sticker.t/0` on success.
"""
@doc since: "0.10.0"
@spec create_guild_sticker(
Guild.id(),
Sticker.name(),
Expand Down Expand Up @@ -1530,6 +1534,7 @@ defmodule Nostrum.Api do
Returns an updated sticker on update completion.
"""
@doc since: "0.10.0"
@spec modify_guild_sticker(Guild.id(), Sticker.id(), %{
name: Sticker.name() | nil,
description: Sticker.description() | nil,
Expand All @@ -1543,6 +1548,7 @@ defmodule Nostrum.Api do
@doc ~S"""
Delete a guild sticker with the specified ID.
"""
@doc since: "0.10.0"
@spec delete_guild_sticker(Guild.id(), Sticker.id()) :: {:ok} | error
def delete_guild_sticker(guild_id, sticker_id) do
request(:delete, Constants.guild_sticker(guild_id, sticker_id))
Expand All @@ -1551,6 +1557,7 @@ defmodule Nostrum.Api do
@doc ~S"""
Get a list of available sticker packs.
"""
@doc since: "0.10.0"
@spec get_sticker_packs() :: {:ok, [Sticker.Pack.t()]} | error
def get_sticker_packs do
resp =
Expand Down
2 changes: 2 additions & 0 deletions lib/nostrum/cache/base.ex
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ defmodule Nostrum.Cache.Base do
To retrieve the table name used by this cache, use `table/0`.
"""

@moduledoc since: "0.10.0"
def get_cache_module(cache_name, default) do
case @cache_map do
%{^cache_name => nil} -> default
Expand All @@ -41,6 +42,7 @@ defmodule Nostrum.Cache.Base do
end
end

@moduledoc since: "0.10.0"
def get_cache_options(cache_name) do
case @cache_map do
%{^cache_name => nil} -> []
Expand Down
1 change: 1 addition & 0 deletions lib/nostrum/cache/guild_cache.ex
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ defmodule Nostrum.Cache.GuildCache do
Return the old list of stickers before the update, and the updated list of stickers.
"""
@doc since: "0.10.0"
@callback stickers_update(Guild.id(), stickers :: [map()]) ::
{old_stickers :: [Sticker.t()], new_stickers :: [Sticker.t()]}

Expand Down
1 change: 1 addition & 0 deletions lib/nostrum/cache/message_cache.ex
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ defmodule Nostrum.Cache.MessageCache do
You need to implement both of them for nostrum to work with your custom
cache.
"""
@moduledoc since: "0.10.0"

@configured_cache Nostrum.Cache.Base.get_cache_module(:messages, @default_cache_implementation)

Expand Down
1 change: 1 addition & 0 deletions lib/nostrum/cache/message_cache/mnesia.ex
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ if Code.ensure_loaded?(:mnesia) do
You can also change the table name used by the cache by setting the
`table_name` field in the configuration for the `messages` cache.
"""
@moduledoc since: "0.10.0"

@config Nostrum.Cache.Base.get_cache_options(:messages)

Expand Down
1 change: 1 addition & 0 deletions lib/nostrum/cache/message_cache/noop.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ defmodule Nostrum.Cache.MessageCache.Noop do
This cache does not store any messages and always returns `{:error, :not_found}`
for any operation.
"""
@moduledoc since: "0.10.0"

@behaviour Nostrum.Cache.MessageCache

Expand Down
2 changes: 2 additions & 0 deletions lib/nostrum/shard/supervisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ defmodule Nostrum.Shard.Supervisor do
%{shard_num: 4, ...}
```
"""
@doc since: "0.10.0"
@spec disconnect(shard_num()) :: resume_information()
def disconnect(shard_num) do
:"Nostrum.Shard-#{shard_num}"
Expand Down Expand Up @@ -194,6 +195,7 @@ defmodule Nostrum.Shard.Supervisor do
iex> Nostrum.Shard.Supervisor.reconnect(resume)
```
"""
@doc since: "0.10.0"
@spec reconnect(resume_information()) :: DynamicSupervisor.on_start_child()
def reconnect(
%{
Expand Down
1 change: 1 addition & 0 deletions lib/nostrum/struct/guild.ex
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ defmodule Nostrum.Struct.Guild do
@type threads :: %{required(Channel.id()) => Channel.t()} | nil

@typedoc "Custom stickers registered to the guild"
@typedoc since: "0.10.0"
@type stickers :: [Sticker.t()]

@typedoc "Hash of the Discovery splash screen"
Expand Down
1 change: 1 addition & 0 deletions lib/nostrum/struct/sticker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ defmodule Nostrum.Struct.Sticker do
A `Nostrum.Struct.Sticker` represents a sticker that can be sent inside a
`Nostrum.Struct.Message`.
"""
@moduledoc since: "0.10.0"

alias Nostrum.Struct.{Guild, User}
alias Nostrum.{Constants, Snowflake, Util}
Expand Down
1 change: 1 addition & 0 deletions lib/nostrum/struct/sticker/pack.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ defmodule Nostrum.Struct.Sticker.Pack do
@moduledoc """
Represents a platform-curated sticker pack on Discord
"""
@moduledoc since: "0.10.0"

defstruct [
:id,
Expand Down
1 change: 1 addition & 0 deletions lib/nostrum/voice/crypto/aes.ex
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ defmodule Nostrum.Voice.Crypto.Aes do
AES operations. While the Salsa20 and ChaCha20 stream ciphers are typically faster with pure
software implementations, hardware acceleration will typically give AES the leg up for performance.
"""
@moduledoc since: "0.10.0"

@spec encrypt(binary(), <<_::256>>, <<_::96>>, binary()) :: iolist()
def encrypt(plain_text, <<key::bytes-32>> = _key, <<nonce::bytes-12>> = _nonce, aad) do
Expand Down
1 change: 1 addition & 0 deletions lib/nostrum/voice/crypto/chacha.ex
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ defmodule Nostrum.Voice.Crypto.Chacha do
heavy lifting. If your bot is running on a machine without AES hardware acceleration, you
may find that using the chacha encryption mode yields better performance.
"""
@moduledoc since: "0.10.0"

import Bitwise

Expand Down
1 change: 1 addition & 0 deletions lib/nostrum/voice/crypto/salsa.ex
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ defmodule Nostrum.Voice.Crypto.Salsa do
as thoughtfully and explicitly as possible with memory usage and performance in mind, using any
of the Salsa modes will likely be less performant than ChaCha or AES.
"""
@moduledoc since: "0.10.0"

import Bitwise

Expand Down

0 comments on commit 51a184a

Please # to comment.