forked from PrastianHD/discord-up
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmetode_3.py
54 lines (41 loc) · 1.45 KB
/
metode_3.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
import requests
from colorama import Fore
import random
import time
import os
print("=============================================")
author = "Bg.Pateng"
print("Spesial Thanks To " + author)
telegram = "@bangpateng_group"
print("Telegram: " + telegram)
youtube = "Bang Pateng"
print("Youtube: " + youtube)
print("===========================================")
print('PERINGATAN : TIDAK UNTUK DI PERJUAL-BELIKAN')
print("===========================================\n")
time.sleep(1)
channel_id = input("Masukkan ID channel: ")
delay = int(input("Set Delay Kirim Pesan (dalam detik): "))
time.sleep(1)
print("Silahkan Tunggu")
time.sleep(1)
print(".............")
time.sleep(5)
os.system('cls' if os.name == 'nt' else 'clear')
with open("pesan.txt", "r") as f:
words = f.readlines()
with open("token.txt", "r") as f:
authorization = f.readline().strip()
while True:
channel_id = channel_id.strip()
payload = {
'content': random.choice(words).strip()
}
headers = {
'Authorization': authorization
}
r = requests.post(f"https://discord.com/api/v9/channels/{channel_id}/messages", data=payload, headers=headers)
print(Fore.WHITE + "Sent message: ")
print(Fore.YELLOW + payload['content'])
response = requests.get(f'https://discord.com/api/v9/channels/{channel_id}/messages', headers=headers)
time.sleep(delay)