Changelog#
Info#
See also
Note
The library first started as a single file script that I didn’t make versions of. When I decided to turn it into a library, I’ve set the version number based on the amount of commits I have made since the start.
Glossary#
Releases#
v3.0.5#
Updated aiohttp, in order to add support for Python 3.12
v3.0.4#
Fixed AutoGUILD not working if the
messages
parameter is None.Fixed
verify_ssl
being ignored on the WebSocket connection.
v3.0.3#
Fixed “Loading from JSON template causes live object reference to be lost”.
v3.0.2#
Fixed AutoGUILD not sending messages (events emitted prematurely).
Fixed TextMESSAGE and VoiceMESSAGE not being removed after n sends when using AutoCHANNEL.
Added missing
daf.guild.AutoGUILD.removed_messages
property.
v3.0.1#
Downgraded Selenium version from 4.13 to 4.12 since 4.13 does not support headless, which undetected-chrome-driver is trying to set.
v3.0.0#
SQL analytics:
Counts now have better error reporting when an invalid value was passed.
GUI:
Higher refresh rate due to threading redesign - instead of calling Tkinter’s root.update inside an asyncio task, the root.mainroot is called directly, while the asyncio event loop is running inside another thread.
The GUI will not block the asyncio tasks (explained in previous bullet).
When saving a new object definition, if the type of a parameter is literal, the value will be pre-checked inside the GUI and an exception will be raised if a valid value is not given.
Properties that start with
_
will no longer be displayed when viewing live structured objects.Toast notifications for
trace()
.Parameter validation for literals, enums and bool.
Copy / Paste globally for both drop-down menus and list menus.
Core:
New events system and module Event reference
Updated PyCord API wrapper to 2.5.0 RC5
New property
daf.client.ACCOUNT.removed_servers
for tracking removed servers.New property
daf.guild.GUILD.removed_messages
daf.guild.USER.removed_messages
for tracking removed messages.New parameter
removal_buffer_length
todaf.client.ACCOUNT
for setting maximum amount of of servers to keep in thedaf.client.ACCOUNT.removed_servers
buffer.New parameter
removal_buffer_length
todaf.guild.GUILD
anddaf.guild.USER
for setting maximum amount of messages to keep in thedaf.guild.GUILD.removed_messages
/daf.guild.USER.removed_messages
buffer.Event loop based API - All API methods that get called now submit an event in the event loop, which causes the API call to happen asynchronously unless awaited with
await
keyword. This also makes DAF much more efficient.Remote:
Persistent WebSocket connection for receiving events from the core server (eg.
trace()
events).
Removed
remaining_before_removal
property from all message classes.Added
remove_after
property toGUILD
,USER
,TextMESSAGE
,VoiceMESSAGE
andDirectMESSAGE
.
v2.10.4#
Fixed prematurely exiting when waiting for captcha to be completed by user.
v2.10.3#
Fixed Chrome driver not working with newer Chrome versions (115+).
Fetching invite links better bypass.
Remove invalid presence
Fixed
remaining_before_removal
propertiesFixed SQL queries not working on direct messages.
v2.10.2#
Fixed Unclosed client session warning when removing an user account.
Fixed documentation of
daf.core.shutdown()
- removed information about non existent parameters.Selenium better waiting avoidance
Fixed ACCOUNT not being removed from the list if the update failed and the re-login after update failed.
v2.10.1#
Fixed files in DirectMESSAGE.
Fixed file paths over remote not having the full patch when returned back.
Fixed files not having full path in the logs.
Added
daf.dtypes.FILE.fullpath
to support the previous fix.Fixed exception when adding messages inside AutoGUILD, when one of the cached guilds fails initialization.
Fixed serialization for
discord.VoiceChannel
, which included slowmode_delay, even though the attribute doesn’t exist in the VoiceChannel.
v2.10#
GUI:
GUI can now be started with
python -m daf_gui
Deprecation notices are now a button.
Certain fields are now masked with ‘*’ when not editing the object.
Old data that is being updated will now be updated by index
View properties of trackable objects. This can be used to, eg. view the channels AutoCHANNEL found.
‘Load default’ button when editing
discord.Intents
object.A warning is shown besides the method execution frame to let users know, the data is not preserved.
Fixed accounts not being deleted when using delete / backspace keys in live view.
Accounts:
Intents:
Added warnings for missing intents.
Intents.members is by default now disabled.
Messages:
[Breaking change] Removed deprecated feature - YouTube streaming, in favor of faster startups and installation time.
New property:
remaining_before_removal
,remaining_before_removal
,remaining_before_removal
New parameter:
auto_publish
toTextMESSAGE
for automatically publishing messages sent to announcement (news) channels.TextMESSAGE
andVoiceMESSAGE
’sremove_after
parameter:Moderation timeout handling (messages resume one minute after moderation timeout expiry)
Message content:
Deprecated
daf.dtypes.AUDIO
, replaced withdaf.dtypes.FILE
.daf.dtypes.FILE
now accepts binary data as well and will load the data fromfilename
at creation if thedata
parameter is not given.
Web browser (Selenium):
Time between each guild join is now 45 seconds.
Selenium can now be used though remote, however it is not recommended.
Querying for new guilds will not repeat once no more guilds are found.
v2.9.7#
Fixed channels not being visible though GUI, when using SQL logging.
v2.9.6#
Fixed crash if
start_period
is larger thanend_period
.Fixed local update not showing errors if updating objects under AutoGUILD
v2.9.5#
Fixed incorrect caching of the SQL logs, causing incorrect values to be returned back to the GUI.
Fixed detection of browser automation on searching for new guilds to join.
v2.9.4#
Fixed
AutoGUILD
concurrent access. When updating AutoGUILD, the update method did not block causing exceptions.Chrome driver fixes regarding to proxies and timeouts.
v2.9.3#
Fixed
AutoGUILD
andAutoCHANNEL
regex patterns. Users can now seperate names with “name1 | name2”, instead of “name1|name2”. #380
v2.9.2#
Fixed viewing dictionaries inside the GUI
Other bug fixes present in v2.8.5
v2.9.1#
Security update for yt-dlp
v2.9#
GUI:
Template backups for each structured objects.
Rearanging of list items inside GUI listboxes
Connection timeout to a remote core is now 10 minutes for large datasets.
Dictionary editing - GUI nows allows to edit / view dictionary types (JSON). This could eg. be used to view SQL log’s content which is saved to the database into JSON format.
Deprecation notices when creating a new object.
When opening color chooser and datetime select, the window now opens next to the button instead of window.
Deprecation:
Deprecated Youtube streaming in
AUDIO
in favor of faster loading times. (Scheduled for removal in v2.10)
Logging:
SQL logs can now be deleted though the
delete_logs()
.
Web (browser) layer:
Time between guild joins increased to 25 seconds to prevent rate limits.
Searching for invite links will be ignored if the user is already joined into the belonging guild.
v2.8.5#
Fixed “Object not added to DAF” when accessing broken accounts from remote
v2.8.4#
Fixed web browser waiting time being too little when searching invite links
Fixed web browser could not create directory (username had a new line after it, now it auto strips that)
Fix GUI not allowing to define inherited classes (eg. logging manager’s fallback that inherits LoggerBASE)
Fix item not in list error upon saving if an item was written inside a GUI’s dropdown menu directly and then edited.
v2.8.3#
Fixed new guilds being added whenever
daf.client.ACCOUNT
’s update method failed.Fixed error if passing
None
inside update method of account for theservers
parameter.Removed unneded check in object serialization (for remote) which slightly increases performance.
Fixed Enum values being converted to objects when viewing live items / importing schema from live view.
v2.8.2#
Fixed auto installation of ttkboostrap not opening the main window at the end.
v2.8.1#
Fixed bug
timezone required argument 'offset' when trying to save TextMESSAGE
#325Fixed bug
AutoGUILD incorrect type hints
#326
v2.8#
Remote control though HTTP access:
The core can be started on a remote server and then connected to and controlled by the graphical interface.
The GUI now has a dropdown menu where users can select between a local connection client and a remote connection client. Local connection client won’t use the HTTP API, but will start DAF locally and interact with it directly.
GUI:
Method execution
Executing method status window.
When editing objects, the Y size will now be set to default size every time the frame changes.
When executing async blocking functions, a progress bar window will be shown to indicate something is happening.
Logging:
daf.logging.LoggerJSON
will create a new file once the current one reaches 100 kilobytes.Improved performance of
daf.logging.LoggerJSON
.Loggers will now trace their output path, so users can find the output logs more easily.
State preservation
When using the state preservation (introduced in v2.7), accounts that fail to login will, from now on, not be removed from list to prevent data loss.
v2.7#
Preserve objects state on shutdown (accounts, guilds, …,) [logger not preserved]:
daf.core.run()
function’ssave_to_file
parameter or Preserve state on shutdown checkbox inside Schema definition tab of the GUI to configure.
Analytics:
Invite link tracking
GUILD
:invite_track
parameter for tracking invite links
File outputs:
Changed all paths’ defaults to be stored under /<user-home-dir>/daf/ folder to prevent permission problems
AutoGUILD
interval
default changed totimedelta(minutes=1)
xMESSAGE
start_in
now acceptsdatetime.datetime
- send at specific datetime.GUI:
Live object view for viewing and live updating objects.
Invite link analytics
Intents
can now also be defined from the GUI.Fixed schema save for enums (enums are not JSON serializable)
Lowered logging-in timeout to 15 seconds
[Breaking change] Removed DEPRECATED parameters for
daf.core.run()
anddaf.core.initialize()
:token
server_list
is_user
server_log_output
sql_manager
intents
proxy
[Breaking change] Removed DEPRECATED function
client.get_client
. This is replaced withdaf.core.get_accounts()
, from which the Discord client can be obtained bydaf.client.ACCOUNT.client
for each account.[Breaking change] Parameter
debug
in functiondaf.core.run()
/daf.core.initialize()
no longer acceptsbool
. This was deprecated in some older version and now removed.[Breaking change] Removed DEPRECATED functionality inside
add_object
that allowed guilds to be added without passing the account tosnowflake
parameter. Before it implicitly took the first account from the shill list. This has been deprecated since v2.4.[Breaking change] Removed DEPRECATED functionality inside
add_object
that allowed snowflake ID and Discord’s objects to be passed assnowflake
parameter.[Breaking change] Removed DEPRECATED function
get_guild_user
, which has been deprecated since v2.4.[Breaking change]
xMESSAGE
types no longer acceptbool
for parameterstart_in
. This has been deprecated since v2.1.
v2.6.3#
Restored support for Python v3.8
v2.6.1#
Fixed logger not being converted properly when exporting GUI data into a script.
v2.6.0#
Graphical User Interface - GUI for controlling the framework, defining the schema (with backup and restore) and script generation!

Logging:
Added
author
field to all logging managers (tells us which account sent the message).SQL analysis
v2.5.1#
Fixed failure without SQL
v2.5#
[Breaking change] Removed
EMBED
object, usedaf.discord.Embed
instead.[Breaking change] Removed
timing
module since it only contained deprecated objects.[Breaking change] Minumum Python version has been bumbed to Python v3.10.
WEB INTEGRATION:
Automatic login and (semi-automatic) guild join though
daf.web.SeleniumCLIENT
.Automatic server discovery though
daf.web.GuildDISCOVERY
v2.4.3#
Fixed missing documentation members
v2.4.2 (v2.3.4)#
Fixed channel verification bug:
Fixes bug where messages try to be sent into channels that have not passed verification (complete button)
v2.4#
Multiple accounts support:
Added
daf.client.ACCOUNT
for running multiple accounts at once. Proxies are strongly recommended!Deprecated use of:
token,
is_user,
proxy,
server_list,
intents
inside the
daf.core.run()
function.New function
daf.core.get_accounts()
that returns the list of all running accounts in the framework.
Deprecated
add_object()
andremove_object()
functions accepting API wrapper objects orint
type for thesnowflake
parameter.Deprecated
daf.core.get_guild_user
function due to multiple accounts support.Deprecated
daf.client.get_client
function due to multiple accounts support.
v2.3#
[Breaking change] Removed
exceptions
module, meaning that there are no DAFError derived exceptions from this version on. They are replaced with build-in Python exceptions.Automatic scheme generation and management:
daf.guild.AutoGUILD
class for auto-managed GUILD objects.daf.message.AutoCHANNEL
class for auto-managed channels inside message.
Debug levels:
Added deprecated to
TraceLEVELS
.Changed the
daf.core.run()
’s debug parameter to accept a value fromTraceLEVELS
, to dictate what level trace should be displayed.
Messages objects period automatically increases if it is less than slow-mode timeout.
The data_function’s input function can now also be async.
v2.2#
user_callback
parameter for functiondaf.core.run()
can now also be a regular function instead of justasync
.Deprecated
daf.dtypes.EMBED
, usediscord.Embed
instead.[Breaking change] Removed
get_sql_manager
function.daf.core.run()
:Added
logging
parameterDeprecated parameters
server_log_output
andsql_manager
.
Logging manager objects: LoggerJSON, LoggerCSV, LoggerSQL
New
daf.logging.get_logger()
function for retrieving the logger object used.daf.core.initialize()
for manual control of asyncio (same asdaf.core.run()
except it is async)- SQL:
SQL logging now supports Microsoft SQL Server, MySQL, PostgreSQL and SQLite databases.
[Breaking change]
LoggerSQL
’s parameters are re-arranged, new parameters of which, thedialect
(mssql, sqlite, mysql, postgresql) parameter must be passed.
- Development:
doc_category
decorator for automatic documentationRemoved
common
module and moved constants to appropriate modules
v2.1.4#
Bug fixes:
Fix incorrect parameter name in documentation
.
v2.1.3#
Bug fixes:
[Bug]: KeyError: 'code' on rate limit #198
.
v2.1.2#
Bug fixes:
#195 VoiceMESSAGE did not delete deleted channels.
Exception on initialization of static server list in case any of the messages had failed their initialization.
v2.1.1#
Fixed
[Bug]: Predefined servers' errors are not suppressed #189
.Support for readthedocs.
v2.1#
Changed the import
import framework
toimport daf
. Usingimport framework
is now deprecated.remove_after
parameter:Classes:
daf.guild.GUILD
,daf.guild.USER
,daf.message.TextMESSAGE
,daf.message.VoiceMESSAGE
,daf.message.DirectMESSAGE
now support the remove_after parameter which will remove the object from the shilling list when conditions met.
- Proxies:
Added support for using proxies. To use a proxy pass the
daf.run()
function with aproxy
parameter
- discord.EmbedField:
[Breaking change] Replaced discord.EmbedField with discord.EmbedField.
- timedelta:
start_period and end_period now support
timedelta
object to specify the send period. Use ofint
is deprecated[Potentially breaking change] Replaced
start_now
withstart_in
parameter, deprecated use of bool value.
- Channel checking:
daf.TextMESSAGE
anddaf.VoiceMESSAGE
now check if the given channels are actually inside the guild
- Optionals:
[Potentially breaking change] Made some functionality optional:
voice
,proxy
andsql
- to install usepip install discord-advert-framework[dependency here]
- CLIENT:
[Breaking change] Removed the CLIENT object, discord.Client is now used as the CLIENT class is no longer needed due to improved startup
- Bug fixes:
- Time slippage correction:
This occurred if too many messages were ready at once, which resulted in discord’s rate limit, causing a permanent slip.
Fig. 5 Time slippage correction#
- Slow mode correction:
Whenever a channel was in slow mode, it was not properly handled. This is now fixed.
v2.0#
New cool looking web documentation (the one you’re reading now)
Added volume parameter to
daf.VoiceMESSAGE
Changed
channel_ids
tochannels
fordaf.VoiceMESSAGE
anddaf.TextMESSAGE
. It can now also accept discord.<Type>Channel objects.Changed
user_id
/guild_id
tosnowflake
indaf.GUILD
anddaf.USER
. This parameter now also accept discord.Guild (daf.GUILD
) and discord.User (daf.USER
)Added
.update
method to some objects for allowing dynamic modifications of initialization parameters.daf.AUDIO
now also accepts a YouTube link for streaming YouTube videos.New Exceptions system - most functions now raise exceptions instead of just returning bool to allow better detection of errors.
Bug fixes and other small improvements.
v1.9.0#
Added support for logging into a SQL database (MS SQL Server only). See Relational Database Log (SQL).
daf.run()
function now accepts discord.Intents.daf.add_object()
anddaf.remove_object()
functions created to allow for dynamic modification of the shilling list.Other small improvements.
v1.8.1#
JSON file logging.
Automatic channel removal if channel get’s deleted and message removal if all channels are removed.
Improved debug messages.
v1.7.9#
daf.DirectMESSAGE
anddaf.USER
classes created for direct messaging.