API Reference

Reference to all of available classes, methods, attributes, etc.

DiscordDB Client

class discordDBPlus.DiscordDB
set_channel(channel_id)

Change the channel id to send data to.

Parameters

channel_id (int) – The id of the new channel

save(data)

Send a message with the data in it to the data channel.

Parameters

data (dict) – The dict data to save

Returns

An int containing the message’s in which the data was saved.

Return type

int

saves(data)

Send multiple messages with multiple data in them.

Parameters

data (list) – A list of dict datas to send messages from

Returns

A list containing ints of the messages in which the data dicts was saved in.

Return type

list[int]

get(message_id)

Get the data from a given message.

Parameters

message_id (int) – The id of the message to get the data from

Returns

Data

Return type

dict

getf(message_id, field)

Get only one data field from the given message.

Parameters
  • message_id (int) – The id of the message to get the data from

  • field (str) – The field name from which the data will be taken.

Returns

The field value

Return type

str

edit(data, id)

Edit a given message.

Parameters
  • data (dict) – The data which will be used to update the embed message

  • id (int) – The id of the message to update

search(id, field)

Searches a field value in multiple messages and returns all the results.

Parameters
  • id (list) – Ids in which to search the data in

  • field (str) – A field name

Returns

A list of dicts with message id and field value

Return type

list[dict] or None

Data Types

class discordDBPlus.models.Data

Not currently used.

Exceptions

class discordDBPlus.models.FieldError

Not currently used.