API Reference¶
Reference to all of available classes, methods, attributes, etc.
DiscordDB Client¶
-
class
discordDBPlus.DiscordDB¶ -
save(data, channel_id)¶ Send a message with the data in it to the data channel.
- Parameters
data (
dict) – The dict data to savechannel_id (
int) – The channel to send the data in.
- Returns
An int containing the message’s in which the data was saved.
- Return type
int
-
saves(data, channel_id)¶ Send multiple messages with multiple data in them.
- Parameters
data (
list) – A list of dict datas to send messages fromchannel_id (
int) – The channel to send the data in.
- Returns
A list containing ints of the messages in which the data dicts was saved in.
- Return type
list[int]
-
get(message_id, channel_id)¶ Get the data from a given message.
- Parameters
message_id (
int) – The id of the message to get the data fromchannel_id (
int) – The channel to get the data from
- Returns
Data
- Return type
dict
-
getf(message_id, field, channel_id)¶ Get only one data field from the given message.
- Parameters
message_id (
int) – The id of the message to get the data fromfield (
str) – The field name from which the data will be taken.channel_id (
int) – The channel to get the data from
- Returns
The field value
- Return type
str
-
edit(data, id, channel_id)¶ Edit a given message.
- Parameters
data (
dict) – The data which will be used to update the embed messageid (
int) – The id of the message to updatechannel_id (
int) – The channel to edit the data in
-
search(ids, field, channel_ids)¶ Searches a field value in multiple messages and channels and returns all the results.
- Parameters
ids (list) – Ids in which to search the data in
field (
str) – A field namechannel_ids (
list[int]) – The channel to search the data in
- Returns
A list of dicts with message id and field value
- Return type
list[dict]orNone
-