1+ from datetime import timedelta
12import framework as fw , secret
23from framework import discord
34############################################################################################
1213author_icon = "https://solarsystem.nasa.gov/system/basic_html_elements/11561_Sun.png" ,
1314fields = \
1415 [
15- fw . EmbedFIELD ("Test 1" , "Hello World" , True ),
16- fw . EmbedFIELD ("Test 2" , "Hello World 2" , True ),
17- fw . EmbedFIELD ("Test 3" , "Hello World 3" , True ),
18- fw . EmbedFIELD ("No Inline" , "This is without inline" , False ),
19- fw . EmbedFIELD ("Test 4" , "Hello World 4" , True ),
20- fw . EmbedFIELD ("Test 5" , "Hello World 5" , True )
16+ discord . EmbedField ("Test 1" , "Hello World" , True ),
17+ discord . EmbedField ("Test 2" , "Hello World 2" , True ),
18+ discord . EmbedField ("Test 3" , "Hello World 3" , True ),
19+ discord . EmbedField ("No Inline" , "This is without inline" , False ),
20+ discord . EmbedField ("Test 4" , "Hello World 4" , True ),
21+ discord . EmbedField ("Test 5" , "Hello World 5" , True )
2122 ],
2223 ## ... for other arguments, see https://github.com/davidhozic/discord-advertisement-framework
2324)
4142############################################################################################
4243guilds = [
4344 fw .USER (
44- user_id = 123456789 , # ID of server (guild) or a discord.Guild object
45- messages = [ # List MESSAGE objects
45+ user_id = 123456789 , # ID of server (guild) or a discord.Guild object
46+ messages = [ # List MESSAGE objects
4647 fw .DirectMESSAGE (
47- start_period = None , # If None, messages will be send on a fixed period (end period)
48- end_period = 15 , # If start_period is None, it dictates the fixed sending period,
49- # If start period is defined, it dictates the maximum limit of randomized period
50- data = test_embed1 , # Data you want to sent to the function (Can be of types : str, embed, file, list of types to the left
51- # or function that returns any of above types(or returns None if you don't have any data to send yet),
52- # where if you pass a function you need to use the fw.FUNCTION decorator on top of it ).
53- mode = "send" , # "send" will send a new message every time, "edit" will edit the previous message, "clear-send" will delete
54- # the previous message and then send a new one
55- start_now = True # Start sending now (True) or wait until period
56- ),
57-
58- fw .DirectMESSAGE (
59- start_period = None ,
60- end_period = 15 ,
61-
62- data = test_embed_fw_2 ,
63-
64- mode = "send" ,
65- start_now = True
48+ start_period = None , # If None, messages will be send on a fixed period (end period)
49+ end_period = timedelta (seconds = 15 ), # If start_period is None, it dictates the fixed sending period,
50+ # If start period is defined, it dictates the maximum limit of randomized period
51+ data = test_embed1 , # Data you want to sent to the function (Can be of types : str, embed, file, list of types to the left
52+ # or function that returns any of above types(or returns None if you don't have any data to send yet),
53+ # where if you pass a function you need to use the fw.FUNCTION decorator on top of it ).
54+ mode = "send" , # "send" will send a new message every time, "edit" will edit the previous message, "clear-send" will delete
55+ # the previous message and then send a new one
56+ start_in = timedelta (seconds = 0 ) # Start sending now (True) or wait until period
6657 ),
6758 ],
68- logging = True # # Generate file log of sent messages (and failed attempts) for this user
59+ logging = True # Generate file log of sent messages (and failed attempts) for this user
6960 )
7061]
7162
7263############################################################################################
7364
74- if __name__ == "__main__" :
75- fw .run ( token = secret .C_TOKEN , # MANDATORY
76- intents = discord .Intents .default (), # OPTIONAL (see https://docs.pycord.dev/en/master/intents.html)
77- server_list = guilds , # MANDATORY
78- is_user = False , # OPTIONAL
79- user_callback = None , # OPTIONAL
80- server_log_output = "History" , # OPTIONAL
81- debug = True ) # OPTIONAL
65+ fw .run (token = secret .C_TOKEN ,
66+ server_list = guilds ,
67+ is_user = False )
68+
0 commit comments