Created
August 3, 2022 19:10
-
-
Save 10maurycy10/071c91001d38dbf6afee6e146c825e43 to your computer and use it in GitHub Desktop.
Removes the rust gift raid messages.
This file contains 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.commands import Bot | |
from discord.ext import commands | |
import asyncio | |
intents = discord.Intents.default() | |
intents.messages = True | |
bot = commands.Bot(command_prefix='?', description="Removes the raids messages", intents=intents) | |
@bot.command() | |
async def purge(ctx, limit: int = 100): | |
"""Purge all messages, with the phising url.""" | |
def check_msg(msg): | |
if "https://egifpremium.com/" in msg.content: | |
return True | |
return False | |
deleted = await ctx.channel.purge(limit=limit, check=check_msg) | |
msg = await ctx.send(f'purge {len(deleted)}') | |
bot.run('[put token here]') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment