-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
37 lines (30 loc) · 827 Bytes
/
main.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
import requests
import time
from colorama import Fore, init
init(autoreset=True)
Token = input("Your token>")
ChannelID = input("Channel ID>")
Message = input("Message>")
Delay = input("Delay>")
IntDelay = int(Delay)
Amount = input("How many times to send the message>")
IAmount = int(Amount)
IntAmount = IAmount + 1
URL = f"https://discord.com/api/v9/channels/{ChannelID}/messages"
Headers = {
"Authorization": Token,
"Content-Type": "application/json",
}
Payload = {
"content": Message,
}
def sendrequest():
request = requests.post(URL, headers=Headers, json=Payload)
status = request.status_code
if status == 200:
print(f"{Fore.GREEN}sent message")
else:
print(f"{Fore.RED}something went wrong")
for _ in range(1, IntAmount):
sendrequest()
time.sleep(IntDelay)