Created
June 2, 2021 14:35
-
-
Save kamoshi/fb4b0d6c62af403418e7b861c28931cb to your computer and use it in GitHub Desktop.
Wipe discord messages with a self bot (kinda illegal)
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
import discord | |
from discord.ext import commands | |
bot = commands.Bot(">>>", self_bot=True) | |
@bot.event | |
async def on_ready(): | |
print("Bot presence t u r n e d on ( ͡° ͜ʖ ͡°)") | |
@bot.command() | |
async def testingmybotayaya(ctx): | |
channel: discord.TextChannel = bot.get_channel(CHANNEL_ID) | |
if not channel: | |
return await ctx.send("Fail") | |
async for message in channel.history(limit=900000): | |
if message.author == bot.user: | |
print("Deleted") | |
await message.delete() | |
bot.run(ACCOUNT_TOKEN, bot=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment