-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathexample.py
57 lines (42 loc) · 1.33 KB
/
example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
from dank_beggar import quick_run
from multiprocessing import Process
import time
accounts = [
(
'user1@email.com',
'user1password',
),
# (
# 'user2@email.com',
# 'user2password',
# ),
]
# recipient = 'user1'
server_channel_url = 'https://discordapp.com/channels/000000000000000000/000000000000000000'
if __name__ == '__main__':
print('Commencing stupidity...')
print('Spam Ctrl + C to quit.')
# Create list for processes
processes = []
# Call dank_beggar.quick_run for each account
for account in accounts:
# Specify required positional arguments (max_retries: int, email: str, password: str, url: str)
args = (5,) + account + (server_channel_url,)
# Specify optional keyword arguments (timeout: int, delay: float, prefix: str, recipient: str)
# The default value of each argument is shown
kwargs = {
# 'timeout': 10,
# 'delay': 0.5,
# 'prefix': 'pls',
# 'recipient': recipient,
}
# Start process
p = Process(target=quick_run, args=args, kwargs=kwargs)
p.start()
# Save process
processes.append(p)
# Delay before creating next process
time.sleep(5)
# Wait for processes to end
for p in processes:
p.join()