Skip to content

Commit cb60d8a

Browse files
authored
Merge pull request #177 from davidhozic/feature/rate-handling
This PR fixes #176 as well updates the documentation
2 parents 00c5ae9 + 0fad17b commit cb60d8a

File tree

86 files changed

+24875
-2933
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+24875
-2933
lines changed

Examples/Additional Application Layer Example/Coffee/main_coffee.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""
22
Description:
3-
This is an example of an additional application layer you can build with this framework.
3+
This is an example of an additional application layer you can build with this daf.
44
The application sends a message saying 'Good morning' every day at 10 AM and then sends a picture of a coffe cup from a randomized list.
55
"""
66
import os

Examples/Message Types/DirectMESSAGE/main_data_function.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66

77
############################################################################################
8-
# It's VERY IMPORTANT that you use @framework.data_function!
8+
# It's VERY IMPORTANT that you use @daf.data_function!
99
############################################################################################
1010

1111

@@ -24,7 +24,7 @@ def get_data(parameter):
2424
# If start period is defined, it dictates the maximum limit of randomized period
2525
data=get_data(123), # Data you want to sent to the function (Can be of types : str, embed, file, list of types to the left
2626
# or function that returns any of above types(or returns None if you don't have any data to send yet),
27-
# where if you pass a function you need to use the framework.FUNCTION decorator on top of it ).
27+
# where if you pass a function you need to use the daf.FUNCTION decorator on top of it ).
2828
mode="send", # "send" will send a new message every time, "edit" will edit the previous message, "clear-send" will delete
2929
# the previous message and then send a new one
3030
start_in=timedelta(seconds=0) # Start sending now (True) or wait until period

Examples/Message Types/DirectMESSAGE/main_send_embed.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# NOTE! There can only be one embed per message but you can add more fields inside that embed!
88

99

10-
# framework.EMBED example
10+
# daf.EMBED example
1111
test_embed1 = daf.EMBED(
1212
author_name="Developer",
1313
author_icon="https://solarsystem.nasa.gov/system/basic_html_elements/11561_Sun.png",
@@ -32,8 +32,8 @@
3232
# ... other, refer to Pycord documentation
3333
)
3434

35-
# framework.EMBED from discord.Embed
36-
test_embed_fw_2 = daf.EMBED.from_discord_embed(test_embed2) ## Converts discord.Embed into framework.EMBED
35+
# daf.EMBED from discord.Embed
36+
test_embed_fw_2 = daf.EMBED.from_discord_embed(test_embed2) ## Converts discord.Embed into daf.EMBED
3737

3838

3939

Examples/Message Types/DirectMESSAGE/main_send_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# If start period is defined, it dictates the maximum limit of randomized period
2121
data=l_file, # Data you want to sent to the function (Can be of types : str, embed, file, list of types to the left
2222
# or function that returns any of above types(or returns None if you don't have any data to send yet),
23-
# where if you pass a function you need to use the framework.FUNCTION decorator on top of it ).
23+
# where if you pass a function you need to use the daf.FUNCTION decorator on top of it ).
2424
mode="send", # "send" will send a new message every time, "edit" will edit the previous message, "clear-send" will delete
2525
# the previous message and then send a new one
2626
start_in=timedelta(seconds=0) # Start sending now (True) or wait until period

Examples/Message Types/DirectMESSAGE/main_send_multiple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
# If start period is defined, it dictates the maximum limit of randomized period
3838
data=["Hello World", # Data you want to sent to the function (Can be of types : str, embed, file, list of types to the left
3939
l_file1, # or function that returns any of above types(or returns None if you don't have any data to send yet),
40-
l_file2, # where if you pass a function you need to use the framework.FUNCTION decorator on top of it ).
40+
l_file2, # where if you pass a function you need to use the daf.FUNCTION decorator on top of it ).
4141
l_embed],
4242
mode="send", # "send" will send a new message every time, "edit" will edit the previous message, "clear-send" will delete
4343
# the previous message and then send a new one

Examples/Message Types/DirectMESSAGE/main_send_string.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# If start period is defined, it dictates the maximum limit of randomized period
1919
data="First message", # Data you want to sent to the function (Can be of types : str, embed, file, list of types to the left
2020
# or function that returns any of above types(or returns None if you don't have any data to send yet),
21-
# where if you pass a function you need to use the framework.FUNCTION decorator on top of it ).
21+
# where if you pass a function you need to use the daf.FUNCTION decorator on top of it ).
2222
mode="send", # "send" will send a new message every time, "edit" will edit the previous message, "clear-send" will delete
2323
# the previous message and then send a new one
2424
start_in=timedelta(seconds=0) # Start sending now (True) or wait until period

Examples/Message Types/TextMESSAGE/main_data_function.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
############################################################################################
7-
# It's VERY IMPORTANT that you use @framework.data_function!
7+
# It's VERY IMPORTANT that you use @daf.data_function!
88
############################################################################################
99

1010

@@ -23,7 +23,7 @@ def get_data(parameter):
2323
# If start period is defined, it dictates the maximum limit of randomized period
2424
data=get_data(123), # Data you want to sent to the function (Can be of types : str, embed, file, list of types to the left
2525
# or function that returns any of above types(or returns None if you don't have any data to send yet),
26-
# where if you pass a function you need to use the framework.FUNCTION decorator on top of it ).
26+
# where if you pass a function you need to use the daf.FUNCTION decorator on top of it ).
2727
channels=[123456789], # List of ids of all the channels you want this message to be sent into
2828
mode="send", # "send" will send a new message every time, "edit" will edit the previous message, "clear-send" will delete
2929
# the previous message and then send a new one

Examples/Message Types/TextMESSAGE/main_send_embed.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# NOTE! There can only be one embed per message but you can add more fields inside that embed!
88

99

10-
# framework.EMBED example
10+
# daf.EMBED example
1111
test_embed1 = daf.EMBED(
1212
author_name="Developer",
1313
author_icon="https://solarsystem.nasa.gov/system/basic_html_elements/11561_Sun.png",
@@ -32,8 +32,8 @@
3232
# ... other, refer to Pycord documentation
3333
)
3434

35-
# framework.EMBED from discord.Embed
36-
test_embed_fw_2 = daf.EMBED.from_discord_embed(test_embed2) ## Converts discord.Embed into framework.EMBED
35+
# daf.EMBED from discord.Embed
36+
test_embed_fw_2 = daf.EMBED.from_discord_embed(test_embed2) ## Converts discord.Embed into daf.EMBED
3737

3838

3939

Examples/Message Types/TextMESSAGE/main_send_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# If start period is defined, it dictates the maximum limit of randomized period
2121
data=l_file, # Data you want to sent to the function (Can be of types : str, embed, file, list of types to the left
2222
# or function that returns any of above types(or returns None if you don't have any data to send yet),
23-
# where if you pass a function you need to use the framework.FUNCTION decorator on top of it ).
23+
# where if you pass a function you need to use the daf.FUNCTION decorator on top of it ).
2424
channels=[123456789], # List of ids of all the channels you want this message to be sent into
2525
mode="send", # "send" will send a new message every time, "edit" will edit the previous message, "clear-send" will delete
2626
# the previous message and then send a new one

Examples/Message Types/TextMESSAGE/main_send_multiple.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
# If start period is defined, it dictates the maximum limit of randomized period
3838
data=["Hello World", # Data you want to sent to the function (Can be of types : str, embed, file, list of types to the left
3939
l_file1, # or function that returns any of above types(or returns None if you don't have any data to send yet),
40-
l_file2, # where if you pass a function you need to use the framework.FUNCTION decorator on top of it ).
40+
l_file2, # where if you pass a function you need to use the daf.FUNCTION decorator on top of it ).
4141
l_embed],
4242
channels=[123456789], # List of ids of all the channels you want this message to be sent into
4343
mode="send", # "send" will send a new message every time, "edit" will edit the previous message, "clear-send" will delete

0 commit comments

Comments
 (0)