DiscordBotList v0.1.0 DiscordBotList.Struct.Bot View Source
Struct representing the Bot object.
Link to this section Summary
Types
The avatar hash of the bot's avatar.
The certified status of the bot.
The date when the bot was approved.
The cdn hash of the bot's avatar if the bot has none.
The discriminator of the bot.
The guild id for the donatebot setup.
The link to the github repo of the bot.
The guilds featured on the bot page.
The id of the bot.
The custom bot invite url of the bot
The library of the bot.
The long description of the bot. Can contain HTML and/or Markdown.
The owners of the bot. First one in the array is the main owner.
The amount of upvotes the bot has this month.
The prefix of the bot.
The short description of the bot.
The support server invite code of the bot.
The tags of the bot.
The username of the bot.
The vanity url of the bot.
The website url of the bot.
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 info about multiple bots. You can use custom parameters here to get the wanted info.
Get info about a single bot. Returns DiscordBotList.Struct.Bot
struct.
If you had not supplied the application already or want to override the token and id for a
single call, you can suplly it here.
Link to this section Types
The avatar hash of the bot's avatar.
The certified status of the bot.
The date when the bot was approved.
The cdn hash of the bot's avatar if the bot has none.
The discriminator of the bot.
The guild id for the donatebot setup.
The link to the github repo of the bot.
The guilds featured on the bot page.
The id of the bot.
The custom bot invite url of the bot
The library of the bot.
The long description of the bot. Can contain HTML and/or Markdown.
The owners of the bot. First one in the array is the main owner.
The amount of upvotes the bot has this month.
The prefix of the bot.
The short description of the bot.
The support server invite code of the bot.
t()
View Sourcet() :: %DiscordBotList.Struct.Bot{ avatar: String.t(), certified_bot: boolean(), date: DateTime.t(), def_avatar: String.t(), discriminator: String.t(), donatebot_guild_id: String.t(), github: String.t(), guilds: [String.t()], id: String.t(), invite: String.t(), lib: String.t(), longdesc: String.t(), monthly_points: integer(), owners: [String.t()], points: integer(), prefix: String.t(), shortdesc: String.t(), support: String.t(), tags: [String.t()], username: String.t(), vanity: String.t(), website: String.t() }
The tags of the bot.
The username of the bot.
The vanity url of the bot.
The website url of the bot.
Link to this section Functions
add_data(arg, map_key, struct_key)
View Sourceadd_data( {map(), %DiscordBotList.Struct.Bot{ avatar: term(), certified_bot: term(), date: term(), def_avatar: term(), discriminator: term(), donatebot_guild_id: term(), github: term(), guilds: term(), id: term(), invite: term(), lib: term(), longdesc: term(), monthly_points: term(), owners: term(), points: term(), prefix: term(), shortdesc: term(), support: term(), tags: term(), username: term(), vanity: term(), website: term() }}, String.t(), atom() ) :: {map(), %DiscordBotList.Struct.Bot{ avatar: term(), certified_bot: term(), date: term(), def_avatar: term(), discriminator: term(), donatebot_guild_id: term(), github: term(), guilds: term(), id: term(), invite: term(), lib: term(), longdesc: term(), monthly_points: term(), owners: term(), points: term(), prefix: term(), shortdesc: term(), support: term(), tags: term(), username: term(), vanity: term(), website: term() }}
Import a value from the string map to the atom struct. This is used when they have different names.
add_raws(arg, raws)
View Sourceadd_raws( {map(), %DiscordBotList.Struct.Bot{ avatar: term(), certified_bot: term(), date: term(), def_avatar: term(), discriminator: term(), donatebot_guild_id: term(), github: term(), guilds: term(), id: term(), invite: term(), lib: term(), longdesc: term(), monthly_points: term(), owners: term(), points: term(), prefix: term(), shortdesc: term(), support: term(), tags: term(), username: term(), vanity: term(), website: term() }}, [atom()] ) :: {map(), %DiscordBotList.Struct.Bot{ avatar: term(), certified_bot: term(), date: term(), def_avatar: term(), discriminator: term(), donatebot_guild_id: term(), github: term(), guilds: term(), id: term(), invite: term(), lib: term(), longdesc: term(), monthly_points: term(), owners: term(), points: term(), prefix: term(), shortdesc: term(), support: term(), tags: term(), username: term(), vanity: term(), website: term() }}
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_empty!(map)
View Sourcecreate_empty!(map()) :: {map(), %DiscordBotList.Struct.Bot{ avatar: term(), certified_bot: term(), date: term(), def_avatar: term(), discriminator: term(), donatebot_guild_id: term(), github: term(), guilds: term(), id: term(), invite: term(), lib: term(), longdesc: term(), monthly_points: term(), owners: term(), points: term(), prefix: term(), shortdesc: term(), support: term(), tags: term(), username: term(), vanity: term(), website: term() }}
Create an empty struct corresponding to the specified map and called module.
extract_struct!(arg)
View Sourceextract_struct!( {map(), %DiscordBotList.Struct.Bot{ avatar: term(), certified_bot: term(), date: term(), def_avatar: term(), discriminator: term(), donatebot_guild_id: term(), github: term(), guilds: term(), id: term(), invite: term(), lib: term(), longdesc: term(), monthly_points: term(), owners: term(), points: term(), prefix: term(), shortdesc: term(), support: term(), tags: term(), username: term(), vanity: term(), website: term() }} ) :: %DiscordBotList.Struct.Bot{ avatar: term(), certified_bot: term(), date: term(), def_avatar: term(), discriminator: term(), donatebot_guild_id: term(), github: term(), guilds: term(), id: term(), invite: term(), lib: term(), longdesc: term(), monthly_points: term(), owners: term(), points: term(), prefix: term(), shortdesc: term(), support: term(), tags: term(), username: term(), vanity: term(), website: term() }
Extract the struct from the map - struct
pipeline.
Get info about multiple bots. You can use custom parameters here to get the wanted info.
## Parameters
token :: String.t()
, usage:token: your_token
.limit :: integer()
usage:limit: 10
(default is 50, maximum is 500).offset :: integer()
usage:offset: 10
.search :: keyword()
usage:search: [username: "my_name"]
.sort :: String.t()
usage:sort: "id"
.Examples
iex> get_multi() iex> get_multi(limit: 25, offset: 5, search: [username: "Poke"]) iex> get_multi(limit: 10, sort: "id")
Get info about a single bot. Returns DiscordBotList.Struct.Bot
struct.
If you had not supplied the application already or want to override the token and id for a
single call, you can suplly it here.
## Parameters