message (2)
message (2)
import json
import random
import string
import nextcord
from nextcord import SlashOption, Interaction
from nextcord.ext import commands
intents = nextcord.Intents.default()
bot = commands.Bot(command_prefix="/", intents=intents)
STARBOARD_CHANNEL_ID = 1280296978655215616
STAR_EMOJI = "⭐"
STAR_THRESHOLD = 3
SERVER_ID = 1271929049761185832
ALLOWED_IDS = [1271978091274567690,763268543491866644]
MEME_CHANNEL_ID = 1280830092398039050
starred_messages = {}
@bot.event
async def on_ready():
print(f'Logged in as {bot.user}')
await
bot.change_presence(activity=nextcord.Activity(type=nextcord.ActivityType.watching,
name="Humans"))
@bot.event
async def on_raw_reaction_add(payload):
if payload.guild_id != SERVER_ID:
return
if payload.emoji.name == STAR_EMOJI:
channel = bot.get_channel(payload.channel_id)
message = await channel.fetch_message(payload.message_id)
starboard_channel = bot.get_channel(STARBOARD_CHANNEL_ID)
if message.id in starred_messages:
embed_message = await
starboard_channel.fetch_message(starred_messages[message.id])
star_count = next((r.count for r in message.reactions if r.emoji ==
STAR_EMOJI), 0)
if star_count >= STAR_THRESHOLD:
embed = embed_message.embeds[0]
embed.set_footer(text=f"⭐ {star_count}")
await embed_message.edit(embed=embed)
else:
await embed_message.delete()
del starred_messages[message.id]
else:
star_count = next((r.count for r in message.reactions if r.emoji ==
STAR_EMOJI), 0)
if star_count >= STAR_THRESHOLD:
embed = create_embed(message, star_count)
embed_message = await starboard_channel.send(embed=embed)
starred_messages[message.id] = embed_message.id
@bot.event
async def on_raw_reaction_remove(payload):
if payload.guild_id != SERVER_ID:
return
if payload.emoji.name == STAR_EMOJI:
channel = bot.get_channel(payload.channel_id)
message = await channel.fetch_message(payload.message_id)
starboard_channel = bot.get_channel(STARBOARD_CHANNEL_ID)
if message.id in starred_messages:
embed_message = await
starboard_channel.fetch_message(starred_messages[message.id])
star_count = next((r.count for r in message.reactions if r.emoji ==
STAR_EMOJI), 0)
if star_count >= STAR_THRESHOLD:
embed = embed_message.embeds[0]
embed.set_footer(text=f"⭐ {star_count}")
await embed_message.edit(embed=embed)
else:
await embed_message.delete()
del starred_messages[message.id]
try:
embed_color = nextcord.Color(int(colour.lstrip("#"), 16))
except ValueError:
embed_color = nextcord.Color.from_rgb(223, 238, 245)
formatted_description = description.replace("\\n", "\n")
embed = nextcord.Embed(
title=title,
description=formatted_description,
color=embed_color
)
if footer:
embed.set_footer(text=footer)
@bot.slash_command(description="Impersonate a member")
async def impersonate(
interaction: Interaction,
person: nextcord.Member = SlashOption(description="Select a member to
impersonate", required=True),
message: str = SlashOption(description="Message to send as the member",
required=True)
):
if interaction.user.id not in ALLOWED_IDS:
await interaction.response.send_message("You are not allowed to use this
command.", ephemeral=True)
return
channel = interaction.channel
await interaction.response.send_message(f"Sending message as
{display_name}...", ephemeral=True)
avatar = await person.avatar.read() if person.avatar else None
webhook = await channel.create_webhook(name=display_name, avatar=avatar)
await webhook.send(content=message)
await webhook.delete()
def load_fake_info():
with open('fake_info.json', 'r') as file:
return json.load(file)
def get_random_fake_info(fake_info):
selected_info = {}
for key, value in fake_info.items():
if isinstance(value, list):
selected_info[key] = random.choice(value)
else:
selected_info[key] = value
return selected_info
def generate_random_password():
return ''.join(random.choice(string.ascii_letters + string.digits) for _ in
range(6))
num_loops = 7
for _ in range(num_loops):
passwords = [generate_random_password() for _ in range(4)]
await dox_message.edit(content=f"passwords failed: {', '.join(passwords)}")
decoded_password = generate_random_password()
await dox_message.edit(content=f"password decoded successfully:
{decoded_password}")
await asyncio.sleep(0.5)
await countdown_message(dox_message, "Commencing data reconnaissance...")
await asyncio.sleep(0.5)
await countdown_message(dox_message, "searching for connections...")
await asyncio.sleep(0.5)
await countdown_message(dox_message, "hacking into connected accounts...")
await asyncio.sleep(0.5)
await countdown_message(dox_message, "Enabling dark web surveillance for
further data...")
await asyncio.sleep(0.5)
await countdown_message(dox_message, "Formulating the definitive data
dossier...")
await asyncio.sleep(0.5)
await countdown_message(dox_message, "All tasks executed flawlessly!")
await asyncio.sleep(0.5)
selected_fake_info = get_random_fake_info(fake_info)
embed = nextcord.Embed(
title=f"Data report on {user.display_name}",
color=nextcord.Color.red()
)
await interaction.followup.send(embed=embed)
def get_random_insult():
with open('insults.json', 'r') as file:
insults = json.load(file)
return random.choice(insults)
def get_random_compliment():
with open('compliments.json', 'r') as file:
compliments = json.load(file)
return random.choice(compliments)
gif_url = "https://j.gifs.com/mlZwNN.gif"
async with interaction.channel.typing():
final_message_content = f"Looks like {target_name} just got nuked"
await nuke_message.delete()
await interaction.channel.send(content=final_message_content)
await interaction.channel.send(gif_url)
random_attachment = random.choice(attachments)
attachment = random.choice(random_attachment.attachments)
await interaction.response.send_message(content=f"{attachment.url}")
commands_list = {
"send": "Send a message as the bot. Type back slash followed by n to skip to
the next line.",
"send_embed": "Send a customizable embed message as the bot.",
"impersonate": "Impersonate a member.",
"dox": "Initiate a fake dox protocol.",
"insult": "Insult a user.",
"compliment": "Give a compliment to a user.",
"nuke": "Initiate a nuke sequence.",
"meme": "Send a random meme from the meme channel.",
"help": "Shows this list."
}
await interaction.response.send_message(embed=embed)
bot.run('MTI4MDUwMzgyMjA3NDExODE5NA.G9wd5W.gSazL8MbwRsM4Zvy-DbVK85-cDWiy1kJ1l2Uj4')