DEngine Documentation
DEngine is using discord.py for the actual bots; electron for the UI; and C language, PyInstaller for the compiler.In DEngine, there are
Triggers,
Functions, and
Affinities. Each serving their own purpose.
Triggers are meant for events, that happen in discord. For example, when a user sends a message, or when the bot disconnects.
The buttons each have the name listed inside of the
Triggers page. NOT the ones that can be seen in
discord.py. For example, the on_ready(), is called Bot Ready Event, inside of DEngine. This is how it would look like in python when compiled halfway.
@bot.event
async def on_ready():
...
The Functions in DEngine, have their own buttons, with their own names, listed in their own Functions page.
They are meant for things that are done. If you need to search for a user inside of a server, or find when the users ID was created;
Functions are your friends.
Use the Utility section of
Functions for scanning user data, getting time, making the bot wait, and formatting functions, ... Here's a quick example of how the code could look like in python:
user = discord.utils.find(lambda m: m.name == 'Mighty', channel.guild.members)
In this code, discord.utils.find is the function being used. Attempting to find a user with the name: "Mighty".
Affinities are things that ARE. Can also be found in their own Affinities page.
Affinities tell you information about a variable that you get from a Function or Trigger. It also comes from other things that you create on your own.
It can tell you what type of message a certain selected message is, what flags someone has, what activity a user is doing, or what a users name, discriminator and more is.
if message.author == bot.user:
return
This is checking if the user who wrote the message IS the bot itself. Useful for ignoring filtering, if the message is from the bot.