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_filter_word(word)[source]

Adds a word to filter in chat.

word: str

The word to add

async add_moderator(user: User)[source]

Adds someone as a chat moderator.

user: User

The user to make a moderator

async ban(user: User)[source]

Bans someone from the chat.

user: User

The user to ban

async ban_emote(emote)[source]

Bans an emote in chat.

emote: str

The emote to ban

async delete_filter_word(word)[source]

Deletes a word from the chat filter list.

word: str

The word to remove

async owner() User[source]

Returns the owner of a chat.

User

async remove_moderator(user: User)[source]

Removes someone as a chat moderator.

user: User

The user to remove as a moderator

async send(content)[source]

Sends a message to a DLive chat.

content: str

What to send to the chat

async set_chat_interval(seconds: int)[source]

Sets the chat interval.

seconds: int

The amount of seconds to set the chat interval to

async timeout_user(user: User, duration: int)[source]

Times out a user for a specified duration.

user: User

The user to timeout

duration: int

The amount of minutes to timeout the user

async unban(user: User)[source]

Un-Bans someone from the chat.

user: User

The user to un-ban

async unban_emote(emote)[source]

Un-Bans an emote in chat.

emote: str

The emote to un-ban

async untimeout_user(user: User)[source]

Un-Times out a user.

user: User

The user to un-timeout

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

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.

Tiny Models

Wallet

class dlive.models.tiny_models.Wallet(data)[source]

Represents a users wallet.

balance: int

Amount in the wallet

total_earnings: int

Total amount of what the user has earned

Language

class dlive.models.tiny_models.Language(data)[source]

Represents a DLive language used for streams.

code: str

The language ISO code

name: str

The name of the language

Category

class dlive.models.tiny_models.Category(data)[source]

Represents a DLive stream category.

title: str

The name of the category

image_url: str

The categories cover art

cover_image_url: str

Categoriess banner art

Treasure Chest

class dlive.models.tiny_models.TreasureChest(data)[source]

Represents a chats Treasure Chest.

value: int

The value of the chest

state: dlive.enums.TreasureChestState

The state of the chest