DiscordBotList v0.1.0 DiscordBotList.Struct.BotStats View Source
Module representing the bot stats from the DiscordBotList API.
Link to this section Summary
Types
The amount of servers the bot is in. If an Array it acts like shards
. Required if shards
is not defined.
The amount of shards the bot has.
The zero-indexed id of the shard posting. Makes server_count set the shard specific server count.
The amount of servers the bot is in per shard. Not required unless server_count
is not defined.
Functions
Import a value from the string map to the atom struct. This is used when they have different names.
Import from string map values to the struct where the string key of the map is same as the atom key of the struct.
Create an empty struct corresponding to the specified map and called module.
Extract the struct from the map - struct
pipeline.
Get the stats about the bot. See DiscordBotList.Struct.Bot.get_single/1
for
configs in the call.
Post the BotStats struct data to the server. You always needs to supply stats
. To
override the dault token and id see DiscordBotList.Struct.Bot.get_single/1
.
Link to this section Types
The amount of servers the bot is in. If an Array it acts like shards
. Required if shards
is not defined.
The amount of shards the bot has.
The zero-indexed id of the shard posting. Makes server_count set the shard specific server count.
The amount of servers the bot is in per shard. Not required unless server_count
is not defined.
Link to this section Functions
Import a value from the string map to the atom struct. This is used when they have different names.
Import from string map values to the struct where the string key of the map is same as the atom key of the struct.
Create an empty struct corresponding to the specified map and called module.
Extract the struct from the map - struct
pipeline.
Get the stats about the bot. See DiscordBotList.Struct.Bot.get_single/1
for
configs in the call.
Post the BotStats struct data to the server. You always needs to supply stats
. To
override the dault token and id see DiscordBotList.Struct.Bot.get_single/1
.
## Examples iex> data = %DiscordBotList.Struct.BotStats{server_count: 10, shard_count: 5} iex> post_updated_data(stats: data)