to work with permissions:alias Nostrum.Cache.GuildCache
alias Nostrum.Struct.Guild.Member
-guild = GuildCache.get!(279093381723062272)
-member = Map.get(guild.members, 177888205536886784)
-member_perms = Member.guild_permissions(member, guild)
+guild = GuildCache.get!(279093381723062272)
+member = Map.get(guild.members, 177888205536886784)
+member_perms = Member.guild_permissions(member, guild)
-if :administrator in member_perms do
- IO.puts("This user has the administrator permission.")
-end
+if :administrator in member_perms do
+ IO.puts("This user has the administrator permission.")
+end
@@ -588,10 +588,10 @@ from_bit(bit)
Examples
-iex> Nostrum.Permission.from_bit(0x04000000)
-{:ok, :change_nickname}
+iex> Nostrum.Permission.from_bit(0x04000000)
+{:ok, :change_nickname}
-iex> Nostrum.Permission.from_bit(0)
+iex> Nostrum.Permission.from_bit(0)
:error
@@ -626,10 +626,10 @@ from_bit!(bit)
Examples
-iex> Nostrum.Permission.from_bit!(0x04000000)
+iex> Nostrum.Permission.from_bit!(0x04000000)
:change_nickname
-iex> Nostrum.Permission.from_bit!(0)
+iex> Nostrum.Permission.from_bit!(0)
** (ArgumentError) expected a valid bit, got: `0`
@@ -664,11 +664,11 @@ from_bitset(bitset)
Examples
-iex> Nostrum.Permission.from_bitset(0x08000002)
-[:manage_nicknames, :kick_members]
+iex> Nostrum.Permission.from_bitset(0x08000002)
+[:manage_nicknames, :kick_members]
-iex> Nostrum.Permission.from_bitset(0x4000000000000)
-[]
+iex> Nostrum.Permission.from_bitset(0x4000000000000)
+[]
@@ -698,10 +698,10 @@ is_permission(term)
Examples
-iex> Nostrum.Permission.is_permission(:administrator)
+iex> Nostrum.Permission.is_permission(:administrator)
true
-iex> Nostrum.Permission.is_permission(:not_a_permission)
+iex> Nostrum.Permission.is_permission(:not_a_permission)
false
@@ -736,7 +736,7 @@ to_bit(permission)
Examples
-iex> Nostrum.Permission.to_bit(:administrator)
+iex> Nostrum.Permission.to_bit(:administrator)
8
@@ -771,7 +771,7 @@ to_bitset(permissions)
Examples
-iex> Nostrum.Permission.to_bitset([:administrator, :create_instant_invite])
+iex> Nostrum.Permission.to_bitset([:administrator, :create_instant_invite])
9
diff --git a/Nostrum.Shard.Session.html b/Nostrum.Shard.Session.html
index a17ef0d8e..a344f30d9 100644
--- a/Nostrum.Shard.Session.html
+++ b/Nostrum.Shard.Session.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Shard.Supervisor.html b/Nostrum.Shard.Supervisor.html
index 9522fec18..e07e4ce21 100644
--- a/Nostrum.Shard.Supervisor.html
+++ b/Nostrum.Shard.Supervisor.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Snowflake.html b/Nostrum.Snowflake.html
index 3239f051c..7d6a975a5 100644
--- a/Nostrum.Snowflake.html
+++ b/Nostrum.Snowflake.html
@@ -14,7 +14,7 @@
-
+
@@ -366,19 +366,19 @@ cast(value)
Examples
-iex> Nostrum.Snowflake.cast(200317799350927360)
-{:ok, 200317799350927360}
+iex> Nostrum.Snowflake.cast(200317799350927360)
+{:ok, 200317799350927360}
-iex> Nostrum.Snowflake.cast("200317799350927360")
-{:ok, 200317799350927360}
+iex> Nostrum.Snowflake.cast("200317799350927360")
+{:ok, 200317799350927360}
-iex> Nostrum.Snowflake.cast(nil)
-{:ok, nil}
+iex> Nostrum.Snowflake.cast(nil)
+{:ok, nil}
-iex> Nostrum.Snowflake.cast(true)
+iex> Nostrum.Snowflake.cast(true)
:error
-iex> Nostrum.Snowflake.cast(-1)
+iex> Nostrum.Snowflake.cast(-1)
:error
@@ -441,7 +441,7 @@ creation_time(snowflake)
Examples
-iex> Nostrum.Snowflake.creation_time(177888205536886784)
+iex> Nostrum.Snowflake.creation_time(177888205536886784)
~U[2016-05-05 21:04:13.203Z]
@@ -476,7 +476,7 @@ dump(snowflake)
Examples
-iex> Nostrum.Snowflake.dump(109112383011581952)
+iex> Nostrum.Snowflake.dump(109112383011581952)
"109112383011581952"
@@ -512,12 +512,12 @@ from_datetime(datetime)
Examples
-iex> {:ok, dt, _} = DateTime.from_iso8601("2016-05-05T21:04:13.203Z")
-iex> Nostrum.Snowflake.from_datetime(dt)
-{:ok, 177888205536755712}
+iex> {:ok, dt, _} = DateTime.from_iso8601("2016-05-05T21:04:13.203Z")
+iex> Nostrum.Snowflake.from_datetime(dt)
+{:ok, 177888205536755712}
-iex> {:ok, dt, _} = DateTime.from_iso8601("1998-12-25T00:00:00.000Z")
-iex> Nostrum.Snowflake.from_datetime(dt)
+iex> {:ok, dt, _} = DateTime.from_iso8601("1998-12-25T00:00:00.000Z")
+iex> Nostrum.Snowflake.from_datetime(dt)
:error
@@ -576,16 +576,16 @@ is_snowflake(term)
Examples
-iex> Nostrum.Snowflake.is_snowflake(89918932789497856)
+iex> Nostrum.Snowflake.is_snowflake(89918932789497856)
true
-iex> Nostrum.Snowflake.is_snowflake(-1)
+iex> Nostrum.Snowflake.is_snowflake(-1)
false
-iex> Nostrum.Snowflake.is_snowflake(0xFFFFFFFFFFFFFFFF + 1)
+iex> Nostrum.Snowflake.is_snowflake(0xFFFFFFFFFFFFFFFF + 1)
false
-iex> Nostrum.Snowflake.is_snowflake("117789813427535878")
+iex> Nostrum.Snowflake.is_snowflake("117789813427535878")
false
diff --git a/Nostrum.StateMachineTranslator.html b/Nostrum.StateMachineTranslator.html
index cb22c430b..46ebb21bd 100644
--- a/Nostrum.StateMachineTranslator.html
+++ b/Nostrum.StateMachineTranslator.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Store.GuildShardMapping.ETS.html b/Nostrum.Store.GuildShardMapping.ETS.html
index f887380ae..f3590cbef 100644
--- a/Nostrum.Store.GuildShardMapping.ETS.html
+++ b/Nostrum.Store.GuildShardMapping.ETS.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Store.GuildShardMapping.Mnesia.html b/Nostrum.Store.GuildShardMapping.Mnesia.html
index 02344e4d5..c24c2071d 100644
--- a/Nostrum.Store.GuildShardMapping.Mnesia.html
+++ b/Nostrum.Store.GuildShardMapping.Mnesia.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Store.GuildShardMapping.html b/Nostrum.Store.GuildShardMapping.html
index 88830d433..291adad86 100644
--- a/Nostrum.Store.GuildShardMapping.html
+++ b/Nostrum.Store.GuildShardMapping.html
@@ -14,7 +14,7 @@
-
+
@@ -157,9 +157,9 @@
By default, nostrum will use Elixir.Nostrum.Store.GuildShardMapping.ETS
to store the
mapping. To override this, set the [:stores, :guild_shard_mapping]
setting
on nostrum's application configuration:
config :nostrum,
- stores: %{
+ stores: %{
guild_shard_mapping: MyBot.Nostrum.Store.GuildShardMapping
- }
This setting must be set at compile time.
+ }
This setting must be set at compile time.
diff --git a/Nostrum.Store.Supervisor.html b/Nostrum.Store.Supervisor.html
index 1d1c703d0..f771553bd 100644
--- a/Nostrum.Store.Supervisor.html
+++ b/Nostrum.Store.Supervisor.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Store.UnavailableGuild.ETS.html b/Nostrum.Store.UnavailableGuild.ETS.html
index 11f3e91bc..142e228b9 100644
--- a/Nostrum.Store.UnavailableGuild.ETS.html
+++ b/Nostrum.Store.UnavailableGuild.ETS.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Store.UnavailableGuild.Mnesia.html b/Nostrum.Store.UnavailableGuild.Mnesia.html
index b851c8b2a..50c09236b 100644
--- a/Nostrum.Store.UnavailableGuild.Mnesia.html
+++ b/Nostrum.Store.UnavailableGuild.Mnesia.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Store.UnavailableGuild.html b/Nostrum.Store.UnavailableGuild.html
index fb4fc98a4..e7b2380eb 100644
--- a/Nostrum.Store.UnavailableGuild.html
+++ b/Nostrum.Store.UnavailableGuild.html
@@ -14,7 +14,7 @@
-
+
@@ -158,9 +158,9 @@
By default, nostrum will use Elixir.Nostrum.Store.UnavailableGuild.ETS
to store
unavailable guilds. To override this, set the [:stores, :unavailable_guilds]
setting on nostrum's application configuration:
config :nostrum,
- stores: %{
+ stores: %{
unavailable_guilds: MyBot.Nostrum.Store.UnavailableGuild
- }
This setting must be set at compile time.
+
}
This setting must be set at compile time.
diff --git a/Nostrum.Struct.ApplicationCommand.html b/Nostrum.Struct.ApplicationCommand.html
index def625fc5..be271b8a2 100644
--- a/Nostrum.Struct.ApplicationCommand.html
+++ b/Nostrum.Struct.ApplicationCommand.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.ApplicationCommandInteractionData.html b/Nostrum.Struct.ApplicationCommandInteractionData.html
index da37bb4d4..f759f1873 100644
--- a/Nostrum.Struct.ApplicationCommandInteractionData.html
+++ b/Nostrum.Struct.ApplicationCommandInteractionData.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.ApplicationCommandInteractionDataOption.html b/Nostrum.Struct.ApplicationCommandInteractionDataOption.html
index a9fe0a792..39e193e5c 100644
--- a/Nostrum.Struct.ApplicationCommandInteractionDataOption.html
+++ b/Nostrum.Struct.ApplicationCommandInteractionDataOption.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.ApplicationCommandInteractionDataResolved.html b/Nostrum.Struct.ApplicationCommandInteractionDataResolved.html
index 31d2a9859..1d0fc681d 100644
--- a/Nostrum.Struct.ApplicationCommandInteractionDataResolved.html
+++ b/Nostrum.Struct.ApplicationCommandInteractionDataResolved.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.AutoModerationRule.Action.html b/Nostrum.Struct.AutoModerationRule.Action.html
index da0513364..abca13f7d 100644
--- a/Nostrum.Struct.AutoModerationRule.Action.html
+++ b/Nostrum.Struct.AutoModerationRule.Action.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.AutoModerationRule.ActionMetadata.html b/Nostrum.Struct.AutoModerationRule.ActionMetadata.html
index b90f8b8b2..0d41b2e25 100644
--- a/Nostrum.Struct.AutoModerationRule.ActionMetadata.html
+++ b/Nostrum.Struct.AutoModerationRule.ActionMetadata.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.AutoModerationRule.TriggerMetadata.html b/Nostrum.Struct.AutoModerationRule.TriggerMetadata.html
index 7bdcadfa8..9837c772d 100644
--- a/Nostrum.Struct.AutoModerationRule.TriggerMetadata.html
+++ b/Nostrum.Struct.AutoModerationRule.TriggerMetadata.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.AutoModerationRule.html b/Nostrum.Struct.AutoModerationRule.html
index 36bc3252f..13ee502a2 100644
--- a/Nostrum.Struct.AutoModerationRule.html
+++ b/Nostrum.Struct.AutoModerationRule.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Channel.html b/Nostrum.Struct.Channel.html
index 5e9235429..f6987b3ec 100644
--- a/Nostrum.Struct.Channel.html
+++ b/Nostrum.Struct.Channel.html
@@ -14,7 +14,7 @@
-
+
@@ -145,54 +145,38 @@
Channel Struct
-The channel struct is used by Nostrum to represent a Discord Channel Object. More information can be found on the Discord API Channel Documentation.
The struct can have one of several forms depending on the type of channel. You can read more about the individual channel types below.
A typical channel would appear as:
%Nostrum.Struct.Channel{
+The channel struct is used by Nostrum to represent a Discord Channel Object. More information can be found on the Discord API Channel Documentation.
The struct can have one of several forms depending on the type of channel. You can read more about the individual channel types below.
A typical channel would appear as:
%Nostrum.Struct.Channel{
guild_id: 766435015768539156,
id: 827333533688397865,
name: "announcements",
nsfw: false,
- permission_overwrites: [],
+ permission_overwrites: [],
position: 1,
type: 5,
-}
The channel struct implements String.Chars
protocol through the mention/1
function. This example uses our channel from the previous code block.
channel |> to_string()
-"<#766435015768539156>"
}
The channel struct implements String.Chars
protocol through the mention/1
function. This example uses our channel from the previous code block.
channel |> to_string()
+"<#766435015768539156>"
+
- Channel Cache
+ Channel Caching
-The ChannelCache
module provides functionality for you to retrieve information about any channel that your application can see. It provides two functions: get/1
and get!/1
.
+
Channels are cached within the guild object they are a member of. To fetch a cached channel you should use the Nostrum.Cache.ChannelGuildMapping
cache to map a cache to a guild ID.
Once you have a guild ID, you can use the Nostrum.Cache.GuildCache
to fetch the guild and all channels, then use the Nostrum.Struct.Guild.channels/0
field to find the channel.
Example
-
-Nostrum.Cache.ChannelCache.get!(827333533688397865)
-%Nostrum.Struct.Channel{
- application_id: nil,
- bitrate: nil,
- guild_id: 766435015768539156,
- icon: nil,
- id: 827333533688397865,
- last_message_id: nil,
- last_pin_timestamp: nil,
- name: "announcements",
- nsfw: false,
- owner_id: nil,
- parent_id: nil,
- permission_overwrites: [
- %Nostrum.Struct.Overwrite{
- allow: 0,
- deny: 2048,
- id: 766435015768539156,
- type: :role
- }
- ],
- position: 1,
- recipients: nil,
- topic: nil,
- type: 5,
- user_limit: nil
-}
More details of the cache can be found at Nostrum.Cache.ChannelCache
.
+
+> guild_id = Nostrum.Cache.ChannelGuildMapping.get(1229955694258684005)
+1226944827137069107
+> {:ok, guild} = Nostrum.Cache.GuildCache.get(guild_id)
+{:ok,
+ %Nostrum.Struct.Guild{
+ id: 1226944827137069107,
+ name: "Craig Cat Zone",
+ ...
+}}
+> guild.channels[channel_id].name
+"cat-general"
@@ -819,7 +803,7 @@
application_id()
-
+
View Source
@@ -847,7 +831,7 @@ application_id()
applied_tags()
-
+
View Source
@@ -877,7 +861,7 @@ applied_tags()
archive_timestamp()
-
+
View Source
@@ -907,7 +891,7 @@ archive_timestamp()
archived()
-
+
View Source
@@ -937,7 +921,7 @@ archived()
auto_archive_duration()
-
+
View Source
@@ -967,7 +951,7 @@ auto_archive_duration()
bitrate()
-
+
View Source
@@ -995,7 +979,7 @@ bitrate()
channel_mention()
-
+
View Source
@@ -1056,7 +1040,7 @@ channel_mention()
default_auto_archive_duration()
-
+
View Source
@@ -1086,7 +1070,7 @@ default_auto_archive_duration()
default_reaction_emoji()
-
+
View Source
@@ -1117,7 +1101,7 @@ default_reaction_emoji()
default_thread_rate_limit_per_user()
-
+
View Source
@@ -1147,7 +1131,7 @@ default_thread_rate_limit_per_user()
dm_channel()
-
+
View Source
@@ -1207,7 +1191,7 @@ dm_channel()
flags()
-
+
View Source
@@ -1237,7 +1221,7 @@ flags()
forum_tag()
-
+
View Source
@@ -1274,7 +1258,7 @@ forum_tag()
group_dm_channel()
-
+
View Source
@@ -1334,7 +1318,7 @@ group_dm_channel()
guild_category_channel()
-
+
View Source
@@ -1394,7 +1378,7 @@ guild_category_channel()
guild_channel()
-
+
View Source
@@ -1427,7 +1411,7 @@ guild_channel()
guild_forum_channel()
-
+
View Source
@@ -1489,7 +1473,7 @@ guild_forum_channel()
guild_id()
-
+
View Source
@@ -1517,7 +1501,7 @@ guild_id()
guild_news_channel()
-
+
View Source
@@ -1579,7 +1563,7 @@ guild_news_channel()
guild_news_thread_channel()
-
+
View Source
@@ -1641,7 +1625,7 @@ guild_news_thread_channel()
guild_private_thread_channel()
-
+
View Source
@@ -1703,7 +1687,7 @@ guild_private_thread_channel()
guild_public_thread_channel()
-
+
View Source
@@ -1765,7 +1749,7 @@ guild_public_thread_channel()
guild_stage_voice_channel()
-
+
View Source
@@ -1827,7 +1811,7 @@ guild_stage_voice_channel()
guild_store_channel()
-
+
View Source
@@ -1889,7 +1873,7 @@ guild_store_channel()
guild_text_channel()
-
+
View Source
@@ -1949,7 +1933,7 @@ guild_text_channel()
guild_voice_channel()
-
+
View Source
@@ -2009,7 +1993,7 @@ guild_voice_channel()
icon()
-
+
View Source
@@ -2037,7 +2021,7 @@ icon()
id()
-
+
View Source
@@ -2065,7 +2049,7 @@ id()
join_timestamp()
-
+
View Source
@@ -2095,7 +2079,7 @@ join_timestamp()
last_message_id()
-
+
View Source
@@ -2123,7 +2107,7 @@ last_message_id()
last_pin_timestamp()
-
+
View Source
@@ -2151,7 +2135,7 @@ last_pin_timestamp()
locked()
-
+
View Source
@@ -2181,7 +2165,7 @@ locked()
member()
-
+
View Source
@@ -2216,7 +2200,7 @@ member()
member_count()
-
+
View Source
@@ -2246,7 +2230,7 @@ member_count()
message_count()
-
+
View Source
@@ -2276,7 +2260,7 @@ message_count()
name()
-
+
View Source
@@ -2304,7 +2288,7 @@ name()
newly_created()
-
+
View Source
@@ -2334,7 +2318,7 @@ newly_created()
nsfw()
-
+
View Source
@@ -2362,7 +2346,7 @@ nsfw()
owner_id()
-
+
View Source
@@ -2390,7 +2374,7 @@ owner_id()
parent_id()
-
+
View Source
@@ -2418,7 +2402,7 @@ parent_id()
permission_overwrites()
-
+
View Source
@@ -2446,7 +2430,7 @@ permission_overwrites()
permissions()
-
+
View Source
@@ -2476,7 +2460,7 @@ permissions()
position()
-
+
View Source
@@ -2504,7 +2488,7 @@ position()
rate_limit_per_user()
-
+
View Source
@@ -2534,7 +2518,7 @@ rate_limit_per_user()
recipients()
-
+
View Source
@@ -2562,7 +2546,7 @@ recipients()
rtc_region()
-
+
View Source
@@ -2592,7 +2576,7 @@ rtc_region()
t()
-
+
View Source
@@ -2632,7 +2616,7 @@ t()
text_channel()
-
+
View Source
@@ -2664,7 +2648,7 @@ text_channel()
thread_metadata()
-
+
View Source
@@ -2701,7 +2685,7 @@ thread_metadata()
topic()
-
+
View Source
@@ -2729,7 +2713,7 @@ topic()
type()
-
+
View Source
@@ -2757,7 +2741,7 @@ type()
user_id()
-
+
View Source
@@ -2787,7 +2771,7 @@ user_id()
user_limit()
-
+
View Source
@@ -2815,7 +2799,7 @@ user_limit()
video_quality_mode()
-
+
View Source
@@ -2845,7 +2829,7 @@ video_quality_mode()
voice_channel()
-
+
View Source
@@ -2889,7 +2873,7 @@
mention(channel)
-
+
View Source
@@ -2917,8 +2901,8 @@ mention(channel)
Examples
-Nostrum.Cache.ChannelCache.get(381889573426429952)
-|> Nostrum.Struct.Channel.mention()
+channel
+|> Nostrum.Struct.Channel.mention()
"<#381889573426429952>"
diff --git a/Nostrum.Struct.Component.ActionRow.html b/Nostrum.Struct.Component.ActionRow.html
index 6ab543e94..26e1fc7a2 100644
--- a/Nostrum.Struct.Component.ActionRow.html
+++ b/Nostrum.Struct.Component.ActionRow.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Component.Button.html b/Nostrum.Struct.Component.Button.html
index cfa3b1eb1..7773eeb01 100644
--- a/Nostrum.Struct.Component.Button.html
+++ b/Nostrum.Struct.Component.Button.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Component.Option.html b/Nostrum.Struct.Component.Option.html
index e28c98344..4eb62c975 100644
--- a/Nostrum.Struct.Component.Option.html
+++ b/Nostrum.Struct.Component.Option.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Component.SelectMenu.html b/Nostrum.Struct.Component.SelectMenu.html
index 78665d072..a5395a597 100644
--- a/Nostrum.Struct.Component.SelectMenu.html
+++ b/Nostrum.Struct.Component.SelectMenu.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Component.TextInput.html b/Nostrum.Struct.Component.TextInput.html
index 245f77691..7fcfea74d 100644
--- a/Nostrum.Struct.Component.TextInput.html
+++ b/Nostrum.Struct.Component.TextInput.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Component.html b/Nostrum.Struct.Component.html
index 159248ff0..98830e5de 100644
--- a/Nostrum.Struct.Component.html
+++ b/Nostrum.Struct.Component.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Embed.Author.html b/Nostrum.Struct.Embed.Author.html
index 05ecfe482..4650e7947 100644
--- a/Nostrum.Struct.Embed.Author.html
+++ b/Nostrum.Struct.Embed.Author.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Embed.Field.html b/Nostrum.Struct.Embed.Field.html
index b89304b32..54741d84d 100644
--- a/Nostrum.Struct.Embed.Field.html
+++ b/Nostrum.Struct.Embed.Field.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Embed.Footer.html b/Nostrum.Struct.Embed.Footer.html
index f3dd21d3f..a56ba79cb 100644
--- a/Nostrum.Struct.Embed.Footer.html
+++ b/Nostrum.Struct.Embed.Footer.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Embed.Image.html b/Nostrum.Struct.Embed.Image.html
index c76131107..d02d60090 100644
--- a/Nostrum.Struct.Embed.Image.html
+++ b/Nostrum.Struct.Embed.Image.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Embed.Provider.html b/Nostrum.Struct.Embed.Provider.html
index 93c5c8247..6e6ad9c1a 100644
--- a/Nostrum.Struct.Embed.Provider.html
+++ b/Nostrum.Struct.Embed.Provider.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Embed.Thumbnail.html b/Nostrum.Struct.Embed.Thumbnail.html
index 073bc3677..8265152a7 100644
--- a/Nostrum.Struct.Embed.Thumbnail.html
+++ b/Nostrum.Struct.Embed.Thumbnail.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Embed.Video.html b/Nostrum.Struct.Embed.Video.html
index a11b15c1f..88fa4b3fe 100644
--- a/Nostrum.Struct.Embed.Video.html
+++ b/Nostrum.Struct.Embed.Video.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Embed.html b/Nostrum.Struct.Embed.html
index 23a12157c..cc52d4595 100644
--- a/Nostrum.Struct.Embed.html
+++ b/Nostrum.Struct.Embed.html
@@ -14,7 +14,7 @@
-
+
@@ -148,63 +148,63 @@
Nostrum.Struct.Embed
s can be built using this module's builder functions
or standard Map
syntax:
iex> import Nostrum.Struct.Embed
...> embed =
-...> %Nostrum.Struct.Embed{}
-...> |> put_title("craig")
-...> |> put_description("nostrum")
-...> |> put_url("https://google.com/")
-...> |> put_timestamp("2016-05-05T21:04:13.203Z")
-...> |> put_color(431_948)
-...> |> put_field("Field 1", "Test")
-...> |> put_field("Field 2", "More test", true)
+...> %Nostrum.Struct.Embed{}
+...> |> put_title("craig")
+...> |> put_description("nostrum")
+...> |> put_url("https://google.com/")
+...> |> put_timestamp("2016-05-05T21:04:13.203Z")
+...> |> put_color(431_948)
+...> |> put_field("Field 1", "Test")
+...> |> put_field("Field 2", "More test", true)
...> embed
-%Nostrum.Struct.Embed{
+%Nostrum.Struct.Embed{
title: "craig",
description: "nostrum",
url: "https://google.com/",
timestamp: "2016-05-05T21:04:13.203Z",
color: 431_948,
- fields: [
- %Nostrum.Struct.Embed.Field{name: "Field 1", value: "Test"},
- %Nostrum.Struct.Embed.Field{name: "Field 2", value: "More test", inline: true}
- ]
-}
+
fields: [
+ %Nostrum.Struct.Embed.Field{name: "Field 1", value: "Test"},
+ %Nostrum.Struct.Embed.Field{name: "Field 2", value: "More test", inline: true}
+ ]
+}
Using structs
You can also create Nostrum.Struct.Embed
s from structs, by using the
-Nostrum.Struct.Embed
module. Here's how the example above could be build using structs
defmodule MyApp.MyStruct do
+Nostrum.Struct.Embed
module. Here's how the example above could be build using structs defmodule MyApp.MyStruct do
use Nostrum.Struct.Embed
- defstruct []
+ defstruct []
- def title(_), do: "craig"
- def description(_), do: "nostrum"
- def url(_), do: "https://google.com/"
- def timestamp(_), do: "2016-05-05T21:04:13.203Z"
- def color(_), do: 431_948
+ def title(_), do: "craig"
+ def description(_), do: "nostrum"
+ def url(_), do: "https://google.com/"
+ def timestamp(_), do: "2016-05-05T21:04:13.203Z"
+ def color(_), do: 431_948
- def fields(_) do
- [
- %Nostrum.Struct.Embed.Field{name: "Field 1", value: "Test"},
- %Nostrum.Struct.Embed.Field{name: "Field 2", value: "More test", inline: true}
- ]
- end
- end
+ def fields(_) do
+ [
+ %Nostrum.Struct.Embed.Field{name: "Field 1", value: "Test"},
+ %Nostrum.Struct.Embed.Field{name: "Field 2", value: "More test", inline: true}
+ ]
+ end
+ end
-iex> Nostrum.Struct.Embed.from(%MyApp.MyStruct{})
-%Nostrum.Struct.Embed{
+iex> Nostrum.Struct.Embed.from(%MyApp.MyStruct{})
+%Nostrum.Struct.Embed{
title: "craig",
description: "nostrum",
url: "https://google.com/",
timestamp: "2016-05-05T21:04:13.203Z",
color: 431_948,
- fields: [
- %Nostrum.Struct.Embed.Field{name: "Field 1", value: "Test"},
- %Nostrum.Struct.Embed.Field{name: "Field 2", value: "More test", inline: true}
- ]
-}
See this modules callbacks for a list of all the functions that can be implemented.
The implementation of these callbacks is optional. Not implemented functions will simply
+
fields: [
+ %Nostrum.Struct.Embed.Field{name: "Field 1", value: "Test"},
+ %Nostrum.Struct.Embed.Field{name: "Field 2", value: "More test", inline: true}
+ ]
+}
See this modules callbacks for a list of all the functions that can be implemented.
The implementation of these callbacks is optional. Not implemented functions will simply
be ignored.
@@ -1343,15 +1343,15 @@ put_author(embed, name, url, icon_url)
Examples
-iex> embed = %Nostrum.Struct.Embed{}
-...> Nostrum.Struct.Embed.put_author(embed, "skippi", "https://github.com/skippi", nil)
-%Nostrum.Struct.Embed{
- author: %Nostrum.Struct.Embed.Author{
+iex> embed = %Nostrum.Struct.Embed{}
+...> Nostrum.Struct.Embed.put_author(embed, "skippi", "https://github.com/skippi", nil)
+%Nostrum.Struct.Embed{
+ author: %Nostrum.Struct.Embed.Author{
name: "skippi",
url: "https://github.com/skippi",
icon_url: nil
- }
-}
+ }
+}
@@ -1385,9 +1385,9 @@ put_color(embed, value)
Examples
-iex> embed = %Nostrum.Struct.Embed{}
-...> Nostrum.Struct.Embed.put_color(embed, 431948)
-%Nostrum.Struct.Embed{color: 431948}
+iex> embed = %Nostrum.Struct.Embed{}
+...> Nostrum.Struct.Embed.put_color(embed, 431948)
+%Nostrum.Struct.Embed{color: 431948}
@@ -1421,9 +1421,9 @@ put_description(embed, value)
Examples
-iex> embed = %Nostrum.Struct.Embed{}
-...> Nostrum.Struct.Embed.put_description(embed, "An elixir library for the discord API.")
-%Nostrum.Struct.Embed{description: "An elixir library for the discord API."}
+iex> embed = %Nostrum.Struct.Embed{}
+...> Nostrum.Struct.Embed.put_description(embed, "An elixir library for the discord API.")
+%Nostrum.Struct.Embed{description: "An elixir library for the discord API."}
@@ -1464,26 +1464,26 @@ put_field(embed, name, value, inline \\ nil
Examples
-iex> embed = %Nostrum.Struct.Embed{}
-...> Nostrum.Struct.Embed.put_field(embed, "First User", "b1nzy")
-%Nostrum.Struct.Embed{
- fields: [
- %Nostrum.Struct.Embed.Field{name: "First User", value: "b1nzy"}
- ]
-}
-
-iex> embed = %Nostrum.Struct.Embed{
-...> fields: [
-...> %Nostrum.Struct.Embed.Field{name: "First User", value: "b1nzy"}
-...> ]
-...> }
-...> Nostrum.Struct.Embed.put_field(embed, "Second User", "Danny")
-%Nostrum.Struct.Embed{
- fields: [
- %Nostrum.Struct.Embed.Field{name: "First User", value: "b1nzy"},
- %Nostrum.Struct.Embed.Field{name: "Second User", value: "Danny"}
- ]
-}
+iex> embed = %Nostrum.Struct.Embed{}
+...> Nostrum.Struct.Embed.put_field(embed, "First User", "b1nzy")
+%Nostrum.Struct.Embed{
+ fields: [
+ %Nostrum.Struct.Embed.Field{name: "First User", value: "b1nzy"}
+ ]
+}
+
+iex> embed = %Nostrum.Struct.Embed{
+...> fields: [
+...> %Nostrum.Struct.Embed.Field{name: "First User", value: "b1nzy"}
+...> ]
+...> }
+...> Nostrum.Struct.Embed.put_field(embed, "Second User", "Danny")
+%Nostrum.Struct.Embed{
+ fields: [
+ %Nostrum.Struct.Embed.Field{name: "First User", value: "b1nzy"},
+ %Nostrum.Struct.Embed.Field{name: "Second User", value: "Danny"}
+ ]
+}
@@ -1573,13 +1573,13 @@ put_image(embed, url)
Examples
-iex> embed = %Nostrum.Struct.Embed{}
-...> Nostrum.Struct.Embed.put_image(embed, "https://discord.com/assets/af92e60c16b7019f34a467383b31490a.svg")
-%Nostrum.Struct.Embed{
- image: %Nostrum.Struct.Embed.Image{
+iex> embed = %Nostrum.Struct.Embed{}
+...> Nostrum.Struct.Embed.put_image(embed, "https://discord.com/assets/af92e60c16b7019f34a467383b31490a.svg")
+%Nostrum.Struct.Embed{
+ image: %Nostrum.Struct.Embed.Image{
url: "https://discord.com/assets/af92e60c16b7019f34a467383b31490a.svg"
- }
-}
+ }
+}
@@ -1613,13 +1613,13 @@ put_thumbnail(embed, url)
Examples
-iex> embed = %Nostrum.Struct.Embed{}
-...> Nostrum.Struct.Embed.put_thumbnail(embed, "https://discord.com/assets/af92e60c16b7019f34a467383b31490a.svg")
-%Nostrum.Struct.Embed{
- thumbnail: %Nostrum.Struct.Embed.Thumbnail{
+iex> embed = %Nostrum.Struct.Embed{}
+...> Nostrum.Struct.Embed.put_thumbnail(embed, "https://discord.com/assets/af92e60c16b7019f34a467383b31490a.svg")
+%Nostrum.Struct.Embed{
+ thumbnail: %Nostrum.Struct.Embed.Thumbnail{
url: "https://discord.com/assets/af92e60c16b7019f34a467383b31490a.svg"
- }
-}
+ }
+}
@@ -1653,9 +1653,9 @@ put_timestamp(embed, value)
Examples
-iex> embed = %Nostrum.Struct.Embed{}
-...> Nostrum.Struct.Embed.put_timestamp(embed, "2018-04-21T17:33:51.893000Z")
-%Nostrum.Struct.Embed{timestamp: "2018-04-21T17:33:51.893000Z"}
+iex> embed = %Nostrum.Struct.Embed{}
+...> Nostrum.Struct.Embed.put_timestamp(embed, "2018-04-21T17:33:51.893000Z")
+%Nostrum.Struct.Embed{timestamp: "2018-04-21T17:33:51.893000Z"}
@@ -1689,9 +1689,9 @@ put_title(embed, value)
Examples
-iex> embed = %Nostrum.Struct.Embed{}
-...> Nostrum.Struct.Embed.put_title(embed, "nostrum")
-%Nostrum.Struct.Embed{title: "nostrum"}
+iex> embed = %Nostrum.Struct.Embed{}
+...> Nostrum.Struct.Embed.put_title(embed, "nostrum")
+%Nostrum.Struct.Embed{title: "nostrum"}
@@ -1725,9 +1725,9 @@ put_url(embed, value)
Examples
-iex> embed = %Nostrum.Struct.Embed{}
-...> Nostrum.Struct.Embed.put_url(embed, "https://github.com/Kraigie/nostrum")
-%Nostrum.Struct.Embed{url: "https://github.com/Kraigie/nostrum"}
+iex> embed = %Nostrum.Struct.Embed{}
+...> Nostrum.Struct.Embed.put_url(embed, "https://github.com/Kraigie/nostrum")
+%Nostrum.Struct.Embed{url: "https://github.com/Kraigie/nostrum"}
diff --git a/Nostrum.Struct.Emoji.html b/Nostrum.Struct.Emoji.html
index ad687a975..9bbe5860f 100644
--- a/Nostrum.Struct.Emoji.html
+++ b/Nostrum.Struct.Emoji.html
@@ -14,7 +14,7 @@
-
+
@@ -146,26 +146,26 @@
Mentioning Emojis in Messages
A Nostrum.Struct.Emoji
can be mentioned in message content using the String.Chars
-protocol or mention/1
.
emoji = %Nostrum.Struct.Emoji{id: 437093487582642177, name: "foxbot"}
-Nostrum.Api.create_message!(184046599834435585, "#{emoji}")
-%Nostrum.Struct.Message{content: "<:foxbot:437093487582642177>"}
+protocol or mention/1
.emoji = %Nostrum.Struct.Emoji{id: 437093487582642177, name: "foxbot"}
+Nostrum.Api.create_message!(184046599834435585, "#{emoji}")
+%Nostrum.Struct.Message{content: "<:foxbot:437093487582642177>"}
-emoji = %Nostrum.Struct.Emoji{id: 436885297037312001, name: "tealixir"}
-Nostrum.Api.create_message!(280085880452939778, "#{Nostrum.Struct.Emoji.mention(emoji)}")
-%Nostrum.Struct.Message{content: "<:tealixir:436885297037312001>"}
+
emoji = %Nostrum.Struct.Emoji{id: 436885297037312001, name: "tealixir"}
+Nostrum.Api.create_message!(280085880452939778, "#{Nostrum.Struct.Emoji.mention(emoji)}")
+%Nostrum.Struct.Message{content: "<:tealixir:436885297037312001>"}
Using Emojis in the Api
A Nostrum.Struct.Emoji
can be used in Nostrum.Api
by using its api name
-or the struct itself.
emoji = %Nostrum.Struct.Emoji{id: 436885297037312001, name: "tealixir"}
-Nostrum.Api.create_reaction(381889573426429952, 436247584349356032, Nostrum.Struct.Emoji.api_name(emoji))
-{:ok}
+or the struct itself.emoji = %Nostrum.Struct.Emoji{id: 436885297037312001, name: "tealixir"}
+Nostrum.Api.create_reaction(381889573426429952, 436247584349356032, Nostrum.Struct.Emoji.api_name(emoji))
+{:ok}
-emoji = %Nostrum.Struct.Emoji{id: 436189601820966923, name: "elixir"}
-Nostrum.Api.create_reaction(381889573426429952, 436247584349356032, emoji)
-{:ok}
See Nostrum.Struct.Emoji.api_name/0
for more information.
+emoji = %Nostrum.Struct.Emoji{id: 436189601820966923, name: "elixir"}
+Nostrum.Api.create_reaction(381889573426429952, 436247584349356032, emoji)
+{:ok}
See Nostrum.Struct.Emoji.api_name/0
for more information.
@@ -638,12 +638,12 @@ api_name(emoji)
Examples
-iex> emoji = %Nostrum.Struct.Emoji{name: "Γ¡É"}
-...> Nostrum.Struct.Emoji.api_name(emoji)
+iex> emoji = %Nostrum.Struct.Emoji{name: "Γ¡É"}
+...> Nostrum.Struct.Emoji.api_name(emoji)
"Γ¡É"
-iex> emoji = %Nostrum.Struct.Emoji{id: 437093487582642177, name: "foxbot"}
-...> Nostrum.Struct.Emoji.api_name(emoji)
+iex> emoji = %Nostrum.Struct.Emoji{id: 437093487582642177, name: "foxbot"}
+...> Nostrum.Struct.Emoji.api_name(emoji)
"foxbot:437093487582642177"
@@ -679,16 +679,16 @@ image_url(emoji)
Examples
-iex> emoji = %Nostrum.Struct.Emoji{id: 450225070569291776}
-iex> Nostrum.Struct.Emoji.image_url(emoji)
+iex> emoji = %Nostrum.Struct.Emoji{id: 450225070569291776}
+iex> Nostrum.Struct.Emoji.image_url(emoji)
"https://cdn.discordapp.com/emojis/450225070569291776.png"
-iex> emoji = %Nostrum.Struct.Emoji{id: 406140226998894614, animated: true}
-iex> Nostrum.Struct.Emoji.image_url(emoji)
+iex> emoji = %Nostrum.Struct.Emoji{id: 406140226998894614, animated: true}
+iex> Nostrum.Struct.Emoji.image_url(emoji)
"https://cdn.discordapp.com/emojis/406140226998894614.gif"
-iex> emoji = %Nostrum.Struct.Emoji{id: nil, name: "Γ¡É"}
-iex> Nostrum.Struct.Emoji.image_url(emoji)
+iex> emoji = %Nostrum.Struct.Emoji{id: nil, name: "Γ¡É"}
+iex> Nostrum.Struct.Emoji.image_url(emoji)
nil
@@ -723,16 +723,16 @@ mention(emoji)
Examples
-iex> emoji = %Nostrum.Struct.Emoji{name: "👍"}
-...> Nostrum.Struct.Emoji.mention(emoji)
+iex> emoji = %Nostrum.Struct.Emoji{name: "👍"}
+...> Nostrum.Struct.Emoji.mention(emoji)
"👍"
-iex> emoji = %Nostrum.Struct.Emoji{id: 436885297037312001, name: "tealixir"}
-...> Nostrum.Struct.Emoji.mention(emoji)
+iex> emoji = %Nostrum.Struct.Emoji{id: 436885297037312001, name: "tealixir"}
+...> Nostrum.Struct.Emoji.mention(emoji)
"<:tealixir:436885297037312001>"
-iex> emoji = %Nostrum.Struct.Emoji{id: 437016804309860372, name: "blobseizure", animated: true}
-...> Nostrum.Struct.Emoji.mention(emoji)
+iex> emoji = %Nostrum.Struct.Emoji{id: 437016804309860372, name: "blobseizure", animated: true}
+...> Nostrum.Struct.Emoji.mention(emoji)
"<a:blobseizure:437016804309860372>"
diff --git a/Nostrum.Struct.Event.AutoModerationRuleExecute.html b/Nostrum.Struct.Event.AutoModerationRuleExecute.html
index 2a41d9784..ac7ca975d 100644
--- a/Nostrum.Struct.Event.AutoModerationRuleExecute.html
+++ b/Nostrum.Struct.Event.AutoModerationRuleExecute.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.ChannelPinsUpdate.html b/Nostrum.Struct.Event.ChannelPinsUpdate.html
index cff3ef432..626da0c1a 100644
--- a/Nostrum.Struct.Event.ChannelPinsUpdate.html
+++ b/Nostrum.Struct.Event.ChannelPinsUpdate.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.GuildBanAdd.html b/Nostrum.Struct.Event.GuildBanAdd.html
index d1a7f205b..cf7c193f5 100644
--- a/Nostrum.Struct.Event.GuildBanAdd.html
+++ b/Nostrum.Struct.Event.GuildBanAdd.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.GuildBanRemove.html b/Nostrum.Struct.Event.GuildBanRemove.html
index a485f8435..51d047a93 100644
--- a/Nostrum.Struct.Event.GuildBanRemove.html
+++ b/Nostrum.Struct.Event.GuildBanRemove.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.GuildIntegrationDelete.html b/Nostrum.Struct.Event.GuildIntegrationDelete.html
index 21cd10e1a..b76a5f368 100644
--- a/Nostrum.Struct.Event.GuildIntegrationDelete.html
+++ b/Nostrum.Struct.Event.GuildIntegrationDelete.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.GuildIntegrationsUpdate.html b/Nostrum.Struct.Event.GuildIntegrationsUpdate.html
index 01b6f8ca7..b3361ad50 100644
--- a/Nostrum.Struct.Event.GuildIntegrationsUpdate.html
+++ b/Nostrum.Struct.Event.GuildIntegrationsUpdate.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.GuildScheduledEventUserAdd.html b/Nostrum.Struct.Event.GuildScheduledEventUserAdd.html
index e536b7b47..b51192881 100644
--- a/Nostrum.Struct.Event.GuildScheduledEventUserAdd.html
+++ b/Nostrum.Struct.Event.GuildScheduledEventUserAdd.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.GuildScheduledEventUserRemove.html b/Nostrum.Struct.Event.GuildScheduledEventUserRemove.html
index 9673c88ef..69dfdd1f5 100644
--- a/Nostrum.Struct.Event.GuildScheduledEventUserRemove.html
+++ b/Nostrum.Struct.Event.GuildScheduledEventUserRemove.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.InviteCreate.html b/Nostrum.Struct.Event.InviteCreate.html
index 642b938ef..3561ed047 100644
--- a/Nostrum.Struct.Event.InviteCreate.html
+++ b/Nostrum.Struct.Event.InviteCreate.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.InviteDelete.html b/Nostrum.Struct.Event.InviteDelete.html
index cd76bb025..d168c4144 100644
--- a/Nostrum.Struct.Event.InviteDelete.html
+++ b/Nostrum.Struct.Event.InviteDelete.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.MessageDelete.html b/Nostrum.Struct.Event.MessageDelete.html
index b3f7343d3..94db41812 100644
--- a/Nostrum.Struct.Event.MessageDelete.html
+++ b/Nostrum.Struct.Event.MessageDelete.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.MessageDeleteBulk.html b/Nostrum.Struct.Event.MessageDeleteBulk.html
index 292186fb1..f97e61c31 100644
--- a/Nostrum.Struct.Event.MessageDeleteBulk.html
+++ b/Nostrum.Struct.Event.MessageDeleteBulk.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.MessageReactionAdd.html b/Nostrum.Struct.Event.MessageReactionAdd.html
index 0950dc0e3..76327f396 100644
--- a/Nostrum.Struct.Event.MessageReactionAdd.html
+++ b/Nostrum.Struct.Event.MessageReactionAdd.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.MessageReactionRemove.html b/Nostrum.Struct.Event.MessageReactionRemove.html
index 90fb576ad..1b202ed4a 100644
--- a/Nostrum.Struct.Event.MessageReactionRemove.html
+++ b/Nostrum.Struct.Event.MessageReactionRemove.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.MessageReactionRemoveAll.html b/Nostrum.Struct.Event.MessageReactionRemoveAll.html
index 2ec8650bf..3902c8f6f 100644
--- a/Nostrum.Struct.Event.MessageReactionRemoveAll.html
+++ b/Nostrum.Struct.Event.MessageReactionRemoveAll.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.MessageReactionRemoveEmoji.html b/Nostrum.Struct.Event.MessageReactionRemoveEmoji.html
index 1440412e7..47bd70fcb 100644
--- a/Nostrum.Struct.Event.MessageReactionRemoveEmoji.html
+++ b/Nostrum.Struct.Event.MessageReactionRemoveEmoji.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.PartialApplication.html b/Nostrum.Struct.Event.PartialApplication.html
index 416235797..959753a84 100644
--- a/Nostrum.Struct.Event.PartialApplication.html
+++ b/Nostrum.Struct.Event.PartialApplication.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.PollVoteChange.html b/Nostrum.Struct.Event.PollVoteChange.html
index eb6df5960..2f547eaae 100644
--- a/Nostrum.Struct.Event.PollVoteChange.html
+++ b/Nostrum.Struct.Event.PollVoteChange.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.Ready.html b/Nostrum.Struct.Event.Ready.html
index c9e12cbdb..565ef9741 100644
--- a/Nostrum.Struct.Event.Ready.html
+++ b/Nostrum.Struct.Event.Ready.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.SpeakingUpdate.html b/Nostrum.Struct.Event.SpeakingUpdate.html
index 981306fcb..347f15da8 100644
--- a/Nostrum.Struct.Event.SpeakingUpdate.html
+++ b/Nostrum.Struct.Event.SpeakingUpdate.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.ThreadListSync.html b/Nostrum.Struct.Event.ThreadListSync.html
index 22c278943..045cca762 100644
--- a/Nostrum.Struct.Event.ThreadListSync.html
+++ b/Nostrum.Struct.Event.ThreadListSync.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.ThreadMembersUpdate.html b/Nostrum.Struct.Event.ThreadMembersUpdate.html
index 3c8b3221c..2fb6f5a60 100644
--- a/Nostrum.Struct.Event.ThreadMembersUpdate.html
+++ b/Nostrum.Struct.Event.ThreadMembersUpdate.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.TypingStart.html b/Nostrum.Struct.Event.TypingStart.html
index 47c3dd6da..b0f1a3266 100644
--- a/Nostrum.Struct.Event.TypingStart.html
+++ b/Nostrum.Struct.Event.TypingStart.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.VoiceReady.html b/Nostrum.Struct.Event.VoiceReady.html
index afc3379cf..37ca5da01 100644
--- a/Nostrum.Struct.Event.VoiceReady.html
+++ b/Nostrum.Struct.Event.VoiceReady.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.VoiceServerUpdate.html b/Nostrum.Struct.Event.VoiceServerUpdate.html
index 93114ca62..9f99319c6 100644
--- a/Nostrum.Struct.Event.VoiceServerUpdate.html
+++ b/Nostrum.Struct.Event.VoiceServerUpdate.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Event.VoiceState.html b/Nostrum.Struct.Event.VoiceState.html
index f62b0493e..ec3fd7627 100644
--- a/Nostrum.Struct.Event.VoiceState.html
+++ b/Nostrum.Struct.Event.VoiceState.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Guild.AuditLog.html b/Nostrum.Struct.Guild.AuditLog.html
index ab25d84c5..b945226a0 100644
--- a/Nostrum.Struct.Guild.AuditLog.html
+++ b/Nostrum.Struct.Guild.AuditLog.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Guild.AuditLogEntry.html b/Nostrum.Struct.Guild.AuditLogEntry.html
index a5e4d2990..27aba7ec5 100644
--- a/Nostrum.Struct.Guild.AuditLogEntry.html
+++ b/Nostrum.Struct.Guild.AuditLogEntry.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Guild.Ban.html b/Nostrum.Struct.Guild.Ban.html
index c455038be..fd05092fc 100644
--- a/Nostrum.Struct.Guild.Ban.html
+++ b/Nostrum.Struct.Guild.Ban.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Guild.Integration.Account.html b/Nostrum.Struct.Guild.Integration.Account.html
index 3df06747f..be1ff219f 100644
--- a/Nostrum.Struct.Guild.Integration.Account.html
+++ b/Nostrum.Struct.Guild.Integration.Account.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Guild.Integration.Application.html b/Nostrum.Struct.Guild.Integration.Application.html
index b9c352aab..ea0507ef3 100644
--- a/Nostrum.Struct.Guild.Integration.Application.html
+++ b/Nostrum.Struct.Guild.Integration.Application.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Guild.Integration.html b/Nostrum.Struct.Guild.Integration.html
index 98b89c656..0d39e6b75 100644
--- a/Nostrum.Struct.Guild.Integration.html
+++ b/Nostrum.Struct.Guild.Integration.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Guild.Member.html b/Nostrum.Struct.Guild.Member.html
index db4ed6e7c..a26309362 100644
--- a/Nostrum.Struct.Guild.Member.html
+++ b/Nostrum.Struct.Guild.Member.html
@@ -14,7 +14,7 @@
-
+
@@ -147,13 +147,13 @@
Mentioning Members in Messages
A Nostrum.Struct.Guild.Member
can be mentioned in message content using the String.Chars
-protocol or mention/1
.
member = %Nostrum.Struct.Guild.Member{user_id: 120571255635181568}
-Nostrum.Api.create_message!(184046599834435585, "#{member}")
-%Nostrum.Struct.Message{content: "<@120571255635181568>"}
+protocol or mention/1
.member = %Nostrum.Struct.Guild.Member{user_id: 120571255635181568}
+Nostrum.Api.create_message!(184046599834435585, "#{member}")
+%Nostrum.Struct.Message{content: "<@120571255635181568>"}
-member = %Nostrum.Struct.Guild.Member{user_id: 89918932789497856}
-Nostrum.Api.create_message!(280085880452939778, "#{Nostrum.Struct.Guild.Member.mention(member)}")
-%Nostrum.Struct.Message{content: "<@89918932789497856>"}
+member = %Nostrum.Struct.Guild.Member{user_id: 89918932789497856}
+Nostrum.Api.create_message!(280085880452939778, "#{Nostrum.Struct.Guild.Member.mention(member)}")
+%Nostrum.Struct.Message{content: "<@89918932789497856>"}
@@ -639,10 +639,10 @@ guild_channel_permissions(member, guild, ch
Examples
-guild = Nostrum.Cache.GuildCache.get!(279093381723062272)
-member = Map.get(guild.members, 177888205536886784)
+guild = Nostrum.Cache.GuildCache.get!(279093381723062272)
+member = Map.get(guild.members, 177888205536886784)
channel_id = 381889573426429952
-Nostrum.Struct.Guild.Member.guild_channel_permissions(member, guild, channel_id)
+Nostrum.Struct.Guild.Member.guild_channel_permissions(member, guild, channel_id)
#=> [:manage_messages]
@@ -677,9 +677,9 @@ guild_permissions(member, guild)
Examples
-guild = Nostrum.Cache.GuildCache.get!(279093381723062272)
-member = Map.get(guild.members, 177888205536886784)
-Nostrum.Struct.Guild.Member.guild_permissions(member, guild)
+guild = Nostrum.Cache.GuildCache.get!(279093381723062272)
+member = Map.get(guild.members, 177888205536886784)
+Nostrum.Struct.Guild.Member.guild_permissions(member, guild)
#=> [:administrator]
@@ -714,8 +714,8 @@ mention(member)
Examples
-iex> member = %Nostrum.Struct.Guild.Member{user_id: 177888205536886784}
-...> Nostrum.Struct.Guild.Member.mention(member)
+iex> member = %Nostrum.Struct.Guild.Member{user_id: 177888205536886784}
+...> Nostrum.Struct.Guild.Member.mention(member)
"<@177888205536886784>"
diff --git a/Nostrum.Struct.Guild.Role.html b/Nostrum.Struct.Guild.Role.html
index ff08d158c..470ae4b7e 100644
--- a/Nostrum.Struct.Guild.Role.html
+++ b/Nostrum.Struct.Guild.Role.html
@@ -14,7 +14,7 @@
-
+
@@ -146,13 +146,13 @@
Mentioning Roles in Messages
A Nostrum.Struct.Guild.Role
can be mentioned in message content using the String.Chars
-protocol or mention/1
.
role = %Nostrum.Struct.Guild.Role{id: 431886897539973131}
-Nostrum.Api.create_message!(184046599834435585, "#{role}")
-%Nostrum.Struct.Message{}
+protocol or mention/1
.role = %Nostrum.Struct.Guild.Role{id: 431886897539973131}
+Nostrum.Api.create_message!(184046599834435585, "#{role}")
+%Nostrum.Struct.Message{}
-role = %Nostrum.Struct.Guild.Role{id: 431884023535632398}
-Nostrum.Api.create_message!(280085880452939778, "#{Nostrum.Struct.Guild.Role.mention(role)}")
-%Nostrum.Struct.Message{}
+role = %Nostrum.Struct.Guild.Role{id: 431884023535632398}
+Nostrum.Api.create_message!(280085880452939778, "#{Nostrum.Struct.Guild.Role.mention(role)}")
+%Nostrum.Struct.Message{}
@@ -672,8 +672,8 @@ mention(role)
Examples
-iex> role = %Nostrum.Struct.Guild.Role{id: 431886639627763722}
-...> Nostrum.Struct.Guild.Role.mention(role)
+iex> role = %Nostrum.Struct.Guild.Role{id: 431886639627763722}
+...> Nostrum.Struct.Guild.Role.mention(role)
"<@&431886639627763722>"
diff --git a/Nostrum.Struct.Guild.ScheduledEvent.EntityMetadata.html b/Nostrum.Struct.Guild.ScheduledEvent.EntityMetadata.html
index bc80c8cdb..dc4b95fb3 100644
--- a/Nostrum.Struct.Guild.ScheduledEvent.EntityMetadata.html
+++ b/Nostrum.Struct.Guild.ScheduledEvent.EntityMetadata.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Guild.ScheduledEvent.User.html b/Nostrum.Struct.Guild.ScheduledEvent.User.html
index 76f2fecb0..68502ca7d 100644
--- a/Nostrum.Struct.Guild.ScheduledEvent.User.html
+++ b/Nostrum.Struct.Guild.ScheduledEvent.User.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Guild.ScheduledEvent.html b/Nostrum.Struct.Guild.ScheduledEvent.html
index b01b0b94d..ccabbc068 100644
--- a/Nostrum.Struct.Guild.ScheduledEvent.html
+++ b/Nostrum.Struct.Guild.ScheduledEvent.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Guild.UnavailableGuild.html b/Nostrum.Struct.Guild.UnavailableGuild.html
index d5b975c48..ada07aaba 100644
--- a/Nostrum.Struct.Guild.UnavailableGuild.html
+++ b/Nostrum.Struct.Guild.UnavailableGuild.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Guild.html b/Nostrum.Struct.Guild.html
index ef32c3464..a3ec63b52 100644
--- a/Nostrum.Struct.Guild.html
+++ b/Nostrum.Struct.Guild.html
@@ -14,7 +14,7 @@
-
+
@@ -1702,15 +1702,15 @@ icon_url(guild, image_format \\ "webp&
Examples
-iex> guild = %Nostrum.Struct.Guild{icon: "86e39f7ae3307e811784e2ffd11a7310",
-...> id: 41771983423143937}
-iex> Nostrum.Struct.Guild.icon_url(guild)
+iex> guild = %Nostrum.Struct.Guild{icon: "86e39f7ae3307e811784e2ffd11a7310",
+...> id: 41771983423143937}
+iex> Nostrum.Struct.Guild.icon_url(guild)
"https://cdn.discordapp.com/icons/41771983423143937/86e39f7ae3307e811784e2ffd11a7310.webp"
-iex> Nostrum.Struct.Guild.icon_url(guild, "png")
+iex> Nostrum.Struct.Guild.icon_url(guild, "png")
"https://cdn.discordapp.com/icons/41771983423143937/86e39f7ae3307e811784e2ffd11a7310.png"
-iex> guild = %Nostrum.Struct.Guild{icon: nil}
-iex> Nostrum.Struct.Guild.icon_url(guild)
+iex> guild = %Nostrum.Struct.Guild{icon: nil}
+iex> Nostrum.Struct.Guild.icon_url(guild)
nil
@@ -1747,15 +1747,15 @@ splash_url(guild, image_format \\ "web
Examples
-iex> guild = %Nostrum.Struct.Guild{splash: "86e39f7ae3307e811784e2ffd11a7310",
-...> id: 41771983423143937}
-iex> Nostrum.Struct.Guild.splash_url(guild)
+iex> guild = %Nostrum.Struct.Guild{splash: "86e39f7ae3307e811784e2ffd11a7310",
+...> id: 41771983423143937}
+iex> Nostrum.Struct.Guild.splash_url(guild)
"https://cdn.discordapp.com/splashes/41771983423143937/86e39f7ae3307e811784e2ffd11a7310.webp"
-iex> Nostrum.Struct.Guild.splash_url(guild, "png")
+iex> Nostrum.Struct.Guild.splash_url(guild, "png")
"https://cdn.discordapp.com/splashes/41771983423143937/86e39f7ae3307e811784e2ffd11a7310.png"
-iex> guild = %Nostrum.Struct.Guild{splash: nil}
-iex> Nostrum.Struct.Guild.splash_url(guild)
+iex> guild = %Nostrum.Struct.Guild{splash: nil}
+iex> Nostrum.Struct.Guild.splash_url(guild)
nil
diff --git a/Nostrum.Struct.Interaction.html b/Nostrum.Struct.Interaction.html
index 21f5acc1b..3f414d04b 100644
--- a/Nostrum.Struct.Interaction.html
+++ b/Nostrum.Struct.Interaction.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Invite.html b/Nostrum.Struct.Invite.html
index e6ded7411..50366027e 100644
--- a/Nostrum.Struct.Invite.html
+++ b/Nostrum.Struct.Invite.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Message.Activity.html b/Nostrum.Struct.Message.Activity.html
index fc19b7761..11a152c2f 100644
--- a/Nostrum.Struct.Message.Activity.html
+++ b/Nostrum.Struct.Message.Activity.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Message.Application.html b/Nostrum.Struct.Message.Application.html
index 2f0ebdbe6..975a3d446 100644
--- a/Nostrum.Struct.Message.Application.html
+++ b/Nostrum.Struct.Message.Application.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Message.Attachment.html b/Nostrum.Struct.Message.Attachment.html
index 2a1b6d8e1..43c1edad3 100644
--- a/Nostrum.Struct.Message.Attachment.html
+++ b/Nostrum.Struct.Message.Attachment.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Message.Component.html b/Nostrum.Struct.Message.Component.html
index 89264dfb5..dcc471c6a 100644
--- a/Nostrum.Struct.Message.Component.html
+++ b/Nostrum.Struct.Message.Component.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Message.Poll.Answer.html b/Nostrum.Struct.Message.Poll.Answer.html
index 4941178a9..844107da7 100644
--- a/Nostrum.Struct.Message.Poll.Answer.html
+++ b/Nostrum.Struct.Message.Poll.Answer.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Message.Poll.MediaObject.html b/Nostrum.Struct.Message.Poll.MediaObject.html
index f8ad67885..8f0f691c9 100644
--- a/Nostrum.Struct.Message.Poll.MediaObject.html
+++ b/Nostrum.Struct.Message.Poll.MediaObject.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Message.Poll.Results.html b/Nostrum.Struct.Message.Poll.Results.html
index 5c68b2a36..185a96667 100644
--- a/Nostrum.Struct.Message.Poll.Results.html
+++ b/Nostrum.Struct.Message.Poll.Results.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Message.Poll.html b/Nostrum.Struct.Message.Poll.html
index ae4d363fa..ecc4072cd 100644
--- a/Nostrum.Struct.Message.Poll.html
+++ b/Nostrum.Struct.Message.Poll.html
@@ -14,7 +14,7 @@
-
+
@@ -566,11 +566,11 @@ create_poll(question_text, list)
Examples
-poll = Poll.create_poll("Do you enjoy pineapple on pizza?", duration: 2, allow_multiselect: false)
- |> Poll.put_answer("Yes!", default_emoji: "\u2705") # check mark emoji
- |> Poll.put_answer("No!", default_emoji: "\u274C") # cross emoji
+poll = Poll.create_poll("Do you enjoy pineapple on pizza?", duration: 2, allow_multiselect: false)
+ |> Poll.put_answer("Yes!", default_emoji: "\u2705") # check mark emoji
+ |> Poll.put_answer("No!", default_emoji: "\u274C") # cross emoji
-Api.create_message(channel_id, poll: poll)
+Api.create_message(channel_id, poll: poll)
diff --git a/Nostrum.Struct.Message.Reaction.html b/Nostrum.Struct.Message.Reaction.html
index 2b288ee49..0141d57de 100644
--- a/Nostrum.Struct.Message.Reaction.html
+++ b/Nostrum.Struct.Message.Reaction.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Message.Reference.html b/Nostrum.Struct.Message.Reference.html
index bb0ad9356..1488a55fc 100644
--- a/Nostrum.Struct.Message.Reference.html
+++ b/Nostrum.Struct.Message.Reference.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Message.Sticker.html b/Nostrum.Struct.Message.Sticker.html
index f7c2a4ea9..227aa01dd 100644
--- a/Nostrum.Struct.Message.Sticker.html
+++ b/Nostrum.Struct.Message.Sticker.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Message.html b/Nostrum.Struct.Message.html
index 05fe3b264..04c074c48 100644
--- a/Nostrum.Struct.Message.html
+++ b/Nostrum.Struct.Message.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Overwrite.html b/Nostrum.Struct.Overwrite.html
index 4c50bdb63..4cfbe43f0 100644
--- a/Nostrum.Struct.Overwrite.html
+++ b/Nostrum.Struct.Overwrite.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.ThreadMember.html b/Nostrum.Struct.ThreadMember.html
index ead7ad389..04e11dc66 100644
--- a/Nostrum.Struct.ThreadMember.html
+++ b/Nostrum.Struct.ThreadMember.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.User.Connection.html b/Nostrum.Struct.User.Connection.html
index f6393947d..d9333007a 100644
--- a/Nostrum.Struct.User.Connection.html
+++ b/Nostrum.Struct.User.Connection.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.User.Flags.html b/Nostrum.Struct.User.Flags.html
index 67960e464..39595233a 100644
--- a/Nostrum.Struct.User.Flags.html
+++ b/Nostrum.Struct.User.Flags.html
@@ -14,7 +14,7 @@
-
+
@@ -818,8 +818,8 @@ from_integer(flag_value)
Examples
-iex> Nostrum.Struct.User.Flags.from_integer(131842)
-%Nostrum.Struct.User.Flags{
+iex> Nostrum.Struct.User.Flags.from_integer(131842)
+%Nostrum.Struct.User.Flags{
bug_hunter_level_1: false,
bug_hunter_level_2: false,
early_supporter: true,
@@ -833,7 +833,7 @@ from_integer(flag_value)
team_user: false,
verified_bot: false,
verified_developer: true
-}
+}
@@ -867,7 +867,7 @@ to_integer(flag_struct)
Examples
-iex> my_flags = %Nostrum.Struct.User.Flags{
+iex> my_flags = %Nostrum.Struct.User.Flags{
...> bug_hunter_level_1: false,
...> bug_hunter_level_2: false,
...> early_supporter: true,
@@ -881,8 +881,8 @@ to_integer(flag_struct)
...> team_user: false,
...> verified_bot: false,
...> verified_developer: true
-...> }
-iex> Nostrum.Struct.User.Flags.to_integer(my_flags)
+...> }
+iex> Nostrum.Struct.User.Flags.to_integer(my_flags)
131842
diff --git a/Nostrum.Struct.User.html b/Nostrum.Struct.User.html
index 52d3e8902..215304970 100644
--- a/Nostrum.Struct.User.html
+++ b/Nostrum.Struct.User.html
@@ -14,7 +14,7 @@
-
+
@@ -146,13 +146,13 @@
Mentioning Users in Messages
A Nostrum.Struct.User
can be mentioned in message content using the String.Chars
-protocol or mention/1
.
user = %Nostrum.Struct.User{id: 120571255635181568}
-Nostrum.Api.create_message!(184046599834435585, "#{user}")
-%Nostrum.Struct.Message{content: "<@120571255635181568>"}
+protocol or mention/1
.user = %Nostrum.Struct.User{id: 120571255635181568}
+Nostrum.Api.create_message!(184046599834435585, "#{user}")
+%Nostrum.Struct.Message{content: "<@120571255635181568>"}
-user = %Nostrum.Struct.User{id: 89918932789497856}
-Nostrum.Api.create_message!(280085880452939778, "#{Nostrum.Struct.User.mention(user)}")
-%Nostrum.Struct.Message{content: "<@89918932789497856>"}
+
user = %Nostrum.Struct.User{id: 89918932789497856}
+Nostrum.Api.create_message!(280085880452939778, "#{Nostrum.Struct.User.mention(user)}")
+%Nostrum.Struct.Message{content: "<@89918932789497856>"}
@@ -698,22 +698,22 @@ avatar_url(user, image_format \\ "webp
Examples
-iex> user = %Nostrum.Struct.User{avatar: "8342729096ea3675442027381ff50dfe",
-...> id: 80351110224678912}
-iex> Nostrum.Struct.User.avatar_url(user)
+iex> user = %Nostrum.Struct.User{avatar: "8342729096ea3675442027381ff50dfe",
+...> id: 80351110224678912}
+iex> Nostrum.Struct.User.avatar_url(user)
"https://cdn.discordapp.com/avatars/80351110224678912/8342729096ea3675442027381ff50dfe.webp"
-iex> Nostrum.Struct.User.avatar_url(user, "png")
+iex> Nostrum.Struct.User.avatar_url(user, "png")
"https://cdn.discordapp.com/avatars/80351110224678912/8342729096ea3675442027381ff50dfe.png"
-iex> user = %Nostrum.Struct.User{avatar: nil,
+iex> user = %Nostrum.Struct.User{avatar: nil,
...> id: 80351110224678912,
-...> discriminator: "0"}
-iex> Nostrum.Struct.User.avatar_url(user)
+...> discriminator: "0"}
+iex> Nostrum.Struct.User.avatar_url(user)
"https://cdn.discordapp.com/embed/avatars/5.png"
-iex> user = %Nostrum.Struct.User{avatar: nil,
-...> discriminator: "1337"}
-iex> Nostrum.Struct.User.avatar_url(user)
+iex> user = %Nostrum.Struct.User{avatar: nil,
+...> discriminator: "1337"}
+iex> Nostrum.Struct.User.avatar_url(user)
"https://cdn.discordapp.com/embed/avatars/2.png"
@@ -749,13 +749,13 @@ full_name(user)
Examples
-iex> user = %Nostrum.Struct.User{global_name: "TheRealJason",
+iex> user = %Nostrum.Struct.User{global_name: "TheRealJason",
...> username: "therealjason",
-...> discriminator: "0"}
-iex> Nostrum.Struct.User.full_name(user)
-"TheRealJason"
iex> user = %Nostrum.Struct.User{username: "b1nzy",
-...> discriminator: "0852"}
-iex> Nostrum.Struct.User.full_name(user)
+...> discriminator: "0"}
+iex> Nostrum.Struct.User.full_name(user)
+"TheRealJason"
iex> user = %Nostrum.Struct.User{username: "b1nzy",
+...> discriminator: "0852"}
+iex> Nostrum.Struct.User.full_name(user)
"b1nzy#0852"
@@ -790,8 +790,8 @@ mention(user)
Examples
-iex> user = %Nostrum.Struct.User{id: 177888205536886784}
-...> Nostrum.Struct.User.mention(user)
+iex> user = %Nostrum.Struct.User{id: 177888205536886784}
+...> Nostrum.Struct.User.mention(user)
"<@177888205536886784>"
diff --git a/Nostrum.Struct.VoiceRegion.html b/Nostrum.Struct.VoiceRegion.html
index 1ed5bc9e5..8e2d4dee4 100644
--- a/Nostrum.Struct.VoiceRegion.html
+++ b/Nostrum.Struct.VoiceRegion.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.VoiceWSState.html b/Nostrum.Struct.VoiceWSState.html
index 2fc14a688..034711607 100644
--- a/Nostrum.Struct.VoiceWSState.html
+++ b/Nostrum.Struct.VoiceWSState.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.WSState.html b/Nostrum.Struct.WSState.html
index 9261d83be..69cd41f15 100644
--- a/Nostrum.Struct.WSState.html
+++ b/Nostrum.Struct.WSState.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Struct.Webhook.html b/Nostrum.Struct.Webhook.html
index 65c8d9c09..b9f310ddb 100644
--- a/Nostrum.Struct.Webhook.html
+++ b/Nostrum.Struct.Webhook.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Token.html b/Nostrum.Token.html
index b162f458f..57f0a6070 100644
--- a/Nostrum.Token.html
+++ b/Nostrum.Token.html
@@ -14,7 +14,7 @@
-
+
@@ -217,11 +217,11 @@ check_token!()
Examples
iex> token = "OTY4NTU2MzQ4MzkwMzkxODU5.G49NjP.pD8PLpKp-Xx8sr-8m1DCxSPTJZdcpcJZOExc1c"
-iex> Nostrum.Token.check_token!(token)
+iex> Nostrum.Token.check_token!(token)
:ok
iex> token = "ODY4MDcxODUzMDMyMzU3OTc4.YPqU6Q.jNJcq1daGG3otexX3c1LcxCpgpQ"
-iex> Nostrum.Token.check_token!(token)
+iex> Nostrum.Token.check_token!(token)
:ok
diff --git a/Nostrum.Util.html b/Nostrum.Util.html
index 3c8638dca..e78278e7b 100644
--- a/Nostrum.Util.html
+++ b/Nostrum.Util.html
@@ -14,7 +14,7 @@
-
+
diff --git a/Nostrum.Voice.html b/Nostrum.Voice.html
index c1df6911e..3d8732d5f 100644
--- a/Nostrum.Voice.html
+++ b/Nostrum.Voice.html
@@ -14,7 +14,7 @@
-
+
@@ -782,10 +782,10 @@ create_ogg_bitstream(opus_packets)
and consecutive opus packets from a single source that you want written
to a file, you can run the following:bitstream =
opus_packets
- |> create_ogg_bitstream()
- |> :binary.list_to_bin()
+ |> create_ogg_bitstream()
+ |> :binary.list_to_bin()
-File.write!("my_recording.ogg", bitstream)
When creating a logical bitstream, ensure that the packets are all from a single SSRC.
+
File.write!("my_recording.ogg", bitstream)
When creating a logical bitstream, ensure that the packets are all from a single SSRC.
When listening in a channel with multiple speakers, you should be storing the received
packets in unique buckets for each SSRC so that the multiple audio sources don't become
jumbled. A single logical bitstream should represent audio data from a single speaker.
@@ -793,9 +793,9 @@
create_ogg_bitstream(opus_packets)
logical bitstreams as each logical bitstream and its constituent pages contain a unique
and randomly generated bitstream serial number, but this is a story for another time.Assuming you have a list of rtp_opus/0
packets that are not separated by ssrc, you
may do the following:
jumbled_packets
-|> Stream.filter(fn {{_seq, _time, ssrc}, _opus} -> ssrc == particular_ssrc end)
-|> Enum.map(fn {{_seq, _time, _ssrc}, opus} -> opus end)
-|> create_ogg_bitstream()
+|> Stream.filter(fn {{_seq, _time, ssrc}, _opus} -> ssrc == particular_ssrc end)
+|> Enum.map(fn {{_seq, _time, _ssrc}, opus} -> opus end)
+|> create_ogg_bitstream()
@@ -1148,11 +1148,11 @@ pause(guild_id)
Examples
-iex> Nostrum.Voice.join_channel(123456789, 420691337)
+iex> Nostrum.Voice.join_channel(123456789, 420691337)
-iex> Nostrum.Voice.play(123456789, "~/files/twelve_hour_loop_of_waterfall_sounds.mp3")
+iex> Nostrum.Voice.play(123456789, "~/files/twelve_hour_loop_of_waterfall_sounds.mp3")
-iex> Nostrum.Voice.pause(123456789)
+iex> Nostrum.Voice.pause(123456789)
@@ -1211,27 +1211,27 @@ play(guild_id, input, type \\ :url, options
Examples
-iex> Nostrum.Voice.join_channel(123456789, 420691337)
+iex> Nostrum.Voice.join_channel(123456789, 420691337)
-iex> Nostrum.Voice.play(123456789, "~/music/FavoriteSong.mp3", :url)
+iex> Nostrum.Voice.play(123456789, "~/music/FavoriteSong.mp3", :url)
-iex> Nostrum.Voice.play(123456789, "~/music/NotFavoriteButStillGoodSong.mp3", :url, volume: 0.5)
+iex> Nostrum.Voice.play(123456789, "~/music/NotFavoriteButStillGoodSong.mp3", :url, volume: 0.5)
-iex> Nostrum.Voice.play(123456789, "~/music/ThisWillBeHeavilyDistorted.mp3", :url, volume: 1000)
iex> Nostrum.Voice.join_channel(123456789, 420691337)
+iex> Nostrum.Voice.play(123456789, "~/music/ThisWillBeHeavilyDistorted.mp3", :url, volume: 1000)
iex> Nostrum.Voice.join_channel(123456789, 420691337)
-iex> raw_data = File.read!("~/music/sound_effect.wav")
+iex> raw_data = File.read!("~/music/sound_effect.wav")
-iex> Nostrum.Voice.play(123456789, raw_data, :pipe)
iex> Nostrum.Voice.join_channel(123456789, 420691337)
+iex> Nostrum.Voice.play(123456789, raw_data, :pipe)
iex> Nostrum.Voice.join_channel(123456789, 420691337)
-iex> Nostrum.Voice.play(123456789, "https://www.youtube.com/watch?v=b4RJ-QGOtw4", :ytdl,
-...> realtime: true, start_pos: "0:17", duration: "30")
+iex> Nostrum.Voice.play(123456789, "https://www.youtube.com/watch?v=b4RJ-QGOtw4", :ytdl,
+...> realtime: true, start_pos: "0:17", duration: "30")
-iex> Nostrum.Voice.play(123456789, "https://www.youtube.com/watch?v=0ngcL_5ekXo", :ytdl,
-...> filter: "lowpass=f=1200", filter: "highpass=f=300", filter: "asetrate=44100*0.5")
iex> Nostrum.Voice.join_channel(123456789, 420691337)
+iex> Nostrum.Voice.play(123456789, "https://www.youtube.com/watch?v=0ngcL_5ekXo", :ytdl,
+...> filter: "lowpass=f=1200", filter: "highpass=f=300", filter: "asetrate=44100*0.5")
iex> Nostrum.Voice.join_channel(123456789, 420691337)
-iex> Nostrum.Voice.play(123456789, "https://www.twitch.tv/pestily", :stream)
+iex> Nostrum.Voice.play(123456789, "https://www.twitch.tv/pestily", :stream)
-iex> Nostrum.Voice.play(123456789, "https://youtu.be/LN4r-K8ZP5Q", :stream)
+iex> Nostrum.Voice.play(123456789, "https://youtu.be/LN4r-K8ZP5Q", :stream)
@@ -1271,16 +1271,16 @@ playing?(guild_id)
Examples
-iex> Nostrum.Voice.join_channel(123456789, 420691337)
+iex> Nostrum.Voice.join_channel(123456789, 420691337)
-iex> Nostrum.Voice.play(123456789, "https://a-real-site.biz/RickRoll.m4a")
+iex> Nostrum.Voice.play(123456789, "https://a-real-site.biz/RickRoll.m4a")
-iex> Nostrum.Voice.playing?(123456789)
+iex> Nostrum.Voice.playing?(123456789)
true
-iex> Nostrum.Voice.pause(123456789)
+iex> Nostrum.Voice.pause(123456789)
-iex> Nostrum.Voice.playing?(123456789)
+iex> Nostrum.Voice.playing?(123456789)
false
@@ -1321,14 +1321,14 @@ ready?(guild_id)
Examples
-iex> Nostrum.Voice.join_channel(123456789, 420691337)
+iex> Nostrum.Voice.join_channel(123456789, 420691337)
-iex> Nostrum.Voice.ready?(123456789)
+iex> Nostrum.Voice.ready?(123456789)
true
-iex> Nostrum.Voice.leave_channel(123456789)
+iex> Nostrum.Voice.leave_channel(123456789)
-iex> Nostrum.Voice.ready?(123456789)
+iex> Nostrum.Voice.ready?(123456789)
false
@@ -1369,13 +1369,13 @@ resume(guild_id)
Examples
-iex> Nostrum.Voice.join_channel(123456789, 420691337)
+iex> Nostrum.Voice.join_channel(123456789, 420691337)
-iex> Nostrum.Voice.play(123456789, "~/stuff/Toto - Africa (Bass Boosted)")
+iex> Nostrum.Voice.play(123456789, "~/stuff/Toto - Africa (Bass Boosted)")
-iex> Nostrum.Voice.pause(123456789)
+iex> Nostrum.Voice.pause(123456789)
-iex> Nostrum.Voice.resume(123456789)
+iex> Nostrum.Voice.resume(123456789)
@@ -1513,11 +1513,11 @@ stop(guild_id)
Examples
-iex> Nostrum.Voice.join_channel(123456789, 420691337)
+iex> Nostrum.Voice.join_channel(123456789, 420691337)
-iex> Nostrum.Voice.play(123456789, "http://brandthill.com/files/weird_dubstep_noises.mp3")
+iex> Nostrum.Voice.play(123456789, "http://brandthill.com/files/weird_dubstep_noises.mp3")
-iex> Nostrum.Voice.stop(123456789)
+iex> Nostrum.Voice.stop(123456789)