API Reference¶
Reference to all of available classes, methods, attributes, etc.
DiscordDB Client¶
- class discordDB.DiscordDB(bot, db_channel_id: int)[source]¶
The Discord database client.
- Parameters
bot (discord.ext.commands.Bot) – An instance of discord.py Client or Bot representing your discord application.
db_channel_id (int) – An integer representing ID of Discord channel you want to be used as database.
- property channel¶
A property which returns an instance of
discord.TextChannel
which is being used as database.
- async get(_id: int) discordDB.models.types.Data [source]¶
A method used to get your saved data from the database channel.
- Parameters
_id (int) – An special integer which was received from the
discordDB.DiscordDB.set()
method.- Returns
An instance of
discordDB.models.Data
, similar to python dictionaries but also supports accessing of its key using . syntax.- Return type