Message
Message
import random
import tls_client
session=tls_client.Session(
client_identifier="chrome112",
random_tls_extension_order=True
)
token = ""
def read_proxies(filename='proxies.txt'):
with open(filename, 'r') as file:
proxies = file.read().splitlines()
return proxies
def get_random_proxy(proxies_list):
return random.choice(proxies_list)
channels = ["1200442304398377020", "1198931029356978186", "1198874687967592579",
"1198877558620565574"]
class Spammer:
def __init__(self, token):
self.token = token
def spammer(self): # API BASED :D
channel_id = random.choice(channels)
proxies_list = read_proxies('proxies.txt')
if proxies_list:
selected_proxy = get_random_proxy(proxies_list)
fmtProxyHttp = {
'http': selected_proxy
}
else:
fmtProxyHttp=None
payload = {
"content": "SPAMMER[ API BASED ]",
"flags": "0",
"mobile_network_type": '"unknown"',
"nonce": f'{channel_id}',
"tts": "false"
}
headers = {
"authority": "discord.com",
"method": "POST",
"path": f"/api/v9/channels/{channel_id}/messages",
"scheme": "https",
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "en-US,en;q=0.9",
"Authorization": self.token,
"Content-Length": "102",
"Content-Type": "application/json",
"Origin": "https://discord.com",
"Referer": f"https://discord.com/channels/1192320152809771058/{channel_id}",
"Sec-Ch-Ua": '"Not A(Brand";v="99", "Microsoft Edge";v="121",
"Chromium";v="121"',
"Sec-Ch-Ua-Mobile": "?0",
"Sec-Ch-Ua-Platform": '"Windows"',
"Sec-Fetch-Dest": "empty",
"Sec-Fetch-Mode": "cors",
"Sec-Fetch-Site": "same-origin",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36 Edg/121.0.0.0",
"X-Debug-Options": "bugReporterEnabled",
"X-Discord-Locale": "en-US",
"X-Discord-Timezone": "Europe/Budapest",
"X-Super-Properties":
"eyJvcyI6IldpbmRvd3MiLCJicm93c2VyIjoiQ2hyb21lIiwiZGV2aWNlIjoiIiwic3lzdGVtX2xvY2FsZS
I6ImVuLVVTIiwiYnJvd3Nlcl91c2VyX2FnZW50IjoiTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV
2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzEyMS4w
LjAuMCBTYWZhcmkvNTM3LjM2IEVkZy8xMjEuMC4wLjAiLCJicm93c2VyX3ZlcnNpb24iOiIxMjEuMC4wLjA
iLCJvc192ZXJzaW9uIjoiMTAiLCJyZWZlcnJlciI6IiIsInJlZmVycmluZ19kb21haW4iOiIiLCJyZWZlcn
Jlcl9jdXJyZW50IjoiaHR0cHM6Ly9kaXNjb3JkLmNvbS8iLCJyZWZlcnJpbmdfZG9tYWluX2N1cnJlbnQiO
iJkaXNjb3JkLmNvbSIsInJlbGVhc2VfY2hhbm5lbCI6InN0YWJsZSIsImNsaWVudF9idWlsZF9udW1iZXIi
OjI2MTMxNCwiY2xpZW50X2V2ZW50X3NvdXJjZSI6bnVsbH0="
}
message =
requests.post(f'https://discord.com/api/v9/channels/{channel_id}/messages',
headers=headers, json=payload)
print('[>] Sent Message!')
print(message.status_code)
instance = Spammer(token)
for i in range(1000):
work = instance.spammer()