gaehive ping script

Published 2024-02-27
This is a different version of The Secret™️, which has different code, but does the same thing.

TUTORIAL (for Windows):
First, make sure you have Python installed. Make sure that you also have the IDLE Shell to edit Python code.

1. In the IDLE Shell, go to File >> New File. Alternatively, hit Ctrl+N.
2. Copy and paste the code in the Instructions tab into the new file you just created.
3. Modify the notificationWords list to set what will trigger the notifications.
4. Go to Run >> Run Module. A pop-up may appear saying that the source must be saved. If it does, click OK, and save the Python file with a name of your choice.
5. Once the script is running, something will output to the console every time someone mentions you! :D

To make it play a sound when someone mentions you, run the script in Terminal! Open Terminal and type this:

python3 {filepath}

Replace {filepath} with the file path of the Python script. You can get it by opening File Explorer, locating the Python file, and doing one of two things:
1. Hitting Ctrl+Shift+C.
2. Right-clicking the file and clicking "Copy as path".

Tip: You can hit Ctrl+C to trigger a KeyboardInterrupt error, which will let you stop the script without closing the IDLE Shell/Terminal!

If you get a ReadTimeout error, it's likely because the program was running in the background and didn't have enough time to fetch data from the API. Simply restart the program and everything should be working again.

Thanks to @melody-sy for most of the code!












I don't know how to install this on mac, plus you Mac users are stinky anyways /j