Created
April 19, 2022 05:08
-
-
Save devsamuelv/eee78464ad7dec5f23f3f98e5f5767a1 to your computer and use it in GitHub Desktop.
discord message automator
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
from time import sleep | |
from pynput import mouse, keyboard | |
m = mouse.Controller() | |
k = keyboard.Controller() | |
payload = input("message payload: ").split(" ") | |
print("you have five seconds.") | |
def on_press(key): | |
if key == keyboard.Key.esc: | |
return False | |
sleep(5) | |
m.press(mouse.Button.left) | |
with keyboard.Listener(on_press=on_press) as s: | |
for idx, i in enumerate(payload): | |
if s.running == False: | |
print("ESC Pressed exiting.") | |
exit() | |
k.type(i) | |
k.press(keyboard.Key.enter) | |
# this is to avoid rate limiting however this won't work for a prolonged period of spamming | |
sleep(0.1 * (idx / 2.4)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment