Last active
July 9, 2024 03:14
-
-
Save ChronoMonochrome/706a042a010e51410061511fd2f48cba to your computer and use it in GitHub Desktop.
Timely farm for discord
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import random | |
import requests | |
import time | |
CHANNEL_ID = 986401737118199838 | |
ACCESS_TOKEN = "YOUR_TOKEN" | |
def send_message(channel_id, text): | |
""" | |
Sends a message to a channel using the specified access token. | |
Args: | |
channel_id (str): The ID of the channel to send the message to. | |
text (str): The content of the message. | |
Returns: | |
requests.Response: The response object from the API call. | |
""" | |
url = f"https://discord.com/api/v9/channels/{channel_id}/messages" | |
headers = { | |
"authorization": f"{ACCESS_TOKEN}", | |
'sec-ch-ua': 'Chromium";v="121", "Not A(Brand";v="99"', | |
"sec-ch-ua-mobile": "?0", | |
"sec-ch-ua-platform": "Windows", | |
"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", | |
"content-type": "application/json" | |
} | |
data = {"content": text} | |
response = requests.post(url, headers=headers, json=data) | |
return response | |
def main(): | |
while True: | |
try: | |
send_message(CHANNEL_ID, ".timely") | |
time.sleep(random.randint(6, 40)) | |
send_message(CHANNEL_ID, ".bank d 2") | |
total_sleep_time = random.randint(0, 300) + 7200 | |
time.sleep(total_sleep_time) | |
except KeyboardInterrupt: | |
return | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment