API Reference¶
The following section outlines the API of dlive.py.
Command¶
Enums¶
Partner Status¶
Chat Mode¶
Ban Status¶
Treasure Chest State¶
Models¶
Bot¶
Chat¶
- class dlive.models.Chat(bot, data, name)[source]¶
Represents a DLive chat room.
- name:
str
The chats name (Owner’s name)
- about: str
The chats description
- livestream:
Livestream
[Optional] Returns a Livestream object which gives information on the current livestream or None if one is not occuring
- livestream_hosting: Optional[
Livestream
] Returns a Livestream object which gives information on the current livestream the user is hosting or None if one is not occuring
- followers:
int
The total amount of followers the chat has
- chat_mode:
ChatMode
The type of chat mode the chat is in
- chat_interval:
int
The interval in which users can speak
- treasure_chest: :class:`~dlive.enums.TreasureChest~
Treasue Chest object containing details about it, the amount, etc.
- owner:
User
The owner of a chat
- async add_moderator(user: User)[source]¶
Adds someone as a chat moderator.
- user:
User
The user to make a moderator
- user:
- async delete_filter_word(word)[source]¶
Deletes a word from the chat filter list.
- word:
str
The word to remove
- word:
- async remove_moderator(user: User)[source]¶
Removes someone as a chat moderator.
- user:
User
The user to remove as a moderator
- user:
- async set_chat_interval(seconds: int)[source]¶
Sets the chat interval.
- seconds:
int
The amount of seconds to set the chat interval to
- seconds:
- name:
Livestream¶
- class dlive.models.Livestream(data)[source]¶
Represents a occuring DLive Livestream.
- is_nsfw:
bool
Whether it is age restricted
- thumbnail_url:
str
The streams thumbnail url
- gift_alert_disabled:
bool
Whether gift alerts are disabled in the channel
- title:
str
The streams title
- created_at:
datetime
When the stream started
- donation_amount_recieved:
int
Total amount of donations recieved during the current sstream
- current_viewers:
int
Current amount of viewers watching
- language:
str
The language the stream is in
- category:
str
The streams categorized sanction
- views:
int
Total amount of view the livestream recieved
- is_nsfw:
Message¶
- class dlive.models.User(data)[source]¶
Represents a user registered on DLive
- username:
str
The users unique username
- displayname:
str
The users display name, most likely the username with a capitalization differences
- avatar_url:
str
Url to the users avatar image
- partner_status:
dlive.enums.PartnerStatus
The status of their DLive partnership
- created_at:
datetime
When the users account was created
- wallet:
models.tiny_model.Wallet
The users wallet
- is_subscribeable:
bool
Whether the user can be subscribed to
- ban_status:
dlive.enums.BanStatus
The users ban status
- is_deactivated:
bool
Whether the users account is deactivated
- offline_image:
str
The users offline cover art
- mention:
str
The users name in mention form
- is_verified_partner:
bool
Whether the user is a verified partner
- is_global_partner:
bool
Whether the user is a global partner
- is_affliate:
bool
Whether the user is an affliate
- is_global_partner_suspended:
bool
Whether the users global partner is a suspended status
- is_account_suspended:
bool
Whether the users account is suspended
- is_stream_banned:
bool
Whether the person is banned from streaming
- property is_account_suspended: bool¶
Whether the user’s account is suspended.
- property is_affiliate: bool¶
Whether the user is a DLive affiliate.
- property is_global_partner: bool¶
Whether the user is a global partner on DLive.
- property is_global_partner_suspended: bool¶
Whether the user’s global partner status is suspended.
- property is_stream_banned: bool¶
Whether the user is banned from streaming.
- property is_verified_partner: bool¶
Whether the user is a verified partner on DLive.
- property mention: str¶
A string formatted to mention a user.
- username: