Skip to content

Instantly share code, notes, and snippets.

@thenithinbalaji
Last active January 10, 2023 20:02
Show Gist options
  • Save thenithinbalaji/52ffce36517b526982b9a38764a82182 to your computer and use it in GitHub Desktop.
Save thenithinbalaji/52ffce36517b526982b9a38764a82182 to your computer and use it in GitHub Desktop.
Botting Numbers for Counting Discord Bots

Discord Counting Game!

Automating counting using this script

How to automate?

  • Execute the code given in the gist after reading all the instructions.
  • Make sure the time between each count is at least more than a second for the counting bot to not flag you as spam and discord to recognize your messages in sequential order.
  • Two Different Logins are required for this to work. Log in with one account on Discord App and login to another preferably using the private window in a browser.
  • Place both the apps sufficiently far and then go to the discord counting channel and place your cursor in the box.

  • When you execute the python script, it will ask you to hover near the apps to mark their screen coordinates. The script then starts controlling your mouse and keyboard to switch between apps and type the count.
  • Happy experimenting!
import pyautogui as pp
import time
import sys
number = int(input("Enter the next number for counting bot:: "))
last_number = int(input("Enter the last number for counting bot:: "))
time1 = int(input("Enter time gap for left app's count:: "))
time2 = int(input("Enter time gap for right app's count:: "))
time.sleep(1)
print()
print("Point the mouse pointer at left app for next 5 secs:: ")
time.sleep(6)
print("Noted!!")
leftapp_position = pp.position()
print("Left app's position is ", leftapp_position)
time.sleep(1)
print()
print("Point the mouse pointer at right app for next 5 secs:: ")
time.sleep(6)
print("Noted!!")
rightapp_position = pp.position()
print("Right app's position is ", rightapp_position)
time.sleep(1)
print()
print("Starting counting process in 5 secs")
time.sleep(5)
try:
if number < last_number:
time.sleep(time1)
pp.click(leftapp_position)
pp.typewrite(f"{number}")
pp.typewrite(["enter"])
number = number + 1
time.sleep(time2)
pp.click(rightapp_position)
pp.typewrite(f"{number}")
pp.typewrite(["enter"])
number = number + 1
except KeyboardInterrupt: # press ctrl + c to end
sys.exit()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment