A collection of Discord scripts I made a while ago for other people. Replace the "your_token_goes_here" with your Discord token. A short tutorial to get your Discord token is located here.
- Python 3.5
pip3 install -r requirements.txt
A delete script to mass delete your messages from a channel.
You can delete a specific number of messages by entering .del number
, or you can delete every message by just entering .del
in the channel.
Example: .del 50
will delete last 50 messages in the channel.
A proof-of-concept script to log Discord chatrooms. This can relay logged messages to a private Discord channel and/or save them to a text file. This is very useful for spying on people.
Instructions on how to configure this for your needs are annotated in the script:
@c.event
async def on_message(message):
# Replace '412905214533838722' with the Discord channel ID you want to log.
if message.channel.id == "412905214533838722":
await log_discord(message, "replace with relay channel id", "name_of_file.txt")
Copy this if statement for each channel you want to log, replacing the default values with your own.
@c.event
async def on_message(message):
if message.channel.id == "452307014715179022":
await log_discord(message, "452307600785276933", "log_452307014715179022.txt")
if message.channel.id == "532307014715171337":
await log_discord(message, "265407600785277777", "log_532307014715171337.txt")
A script that will collect and save the last ~11k messages from a channel.
Same usage as del.py -- the scrape is triggered by .del
to let the users who see it think you are just deleting your messages.