0% found this document useful (0 votes)
3 views4 pages

Message

This document is a Python script for a Discord bot that includes various commands such as joining voice channels, sending spam messages, and enabling auto-replies. It loads configurations from text files, manages allowed users, and supports features like reacting to messages and streaming status. The bot is designed to operate with multiple tokens and includes error handling for file loading and command execution.

Uploaded by

rijul.xyz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views4 pages

Message

This document is a Python script for a Discord bot that includes various commands such as joining voice channels, sending spam messages, and enabling auto-replies. It loads configurations from text files, manages allowed users, and supports features like reacting to messages and streaming status. The bot is designed to operate with multiple tokens and includes error handling for file loading and command execution.

Uploaded by

rijul.xyz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 4

import discord

from discord.ext import commands, tasks


import asyncio
import random

bot_tokens = [
""
]

# Global toggle & target


auto_reply = False
opponent = None

# Load auto-replies from txt file


def load_replies():
try:
with open("autoreply.txt", "r", encoding="utf-8") as f:
return [line.strip() for line in f if line.strip()]
except FileNotFoundError:
return ["No reply messages found."]

def load_allowed_users():
try:
with open("allowedusersaxtern.txt", "r") as file:
return [int(line.strip()) for line in file if line.strip().isdigit()]
except FileNotFoundError:
print("Error: allowedusersaxtern.txt not found.")
return []

allowed_users = load_allowed_users()

def load_flame_messages():
try:
with open("flame.txt", "r", encoding="utf-8") as file:
return [line.strip().replace("\\n", "\n") for line in file if
line.strip()]
except FileNotFoundError:
print("Error: flame.txt not found.")
return ["🔥 Default flame message 🔥"]

flame_messages = load_flame_messages()

def load_help_panel():
try:
with open("helppanel.txt", "r", encoding="utf-8") as file:
return file.read()
except FileNotFoundError:
return "❌ Error: `helppanel.txt` not found."

global_bots = []
active_flame_tasks = {}
reaction_data = {}

def create_bot():
intents = discord.Intents.default()
intents.message_content = True
intents.voice_states = True

bot = commands.Bot(command_prefix='!', intents=intents, help_command=None) #


Disable default .help command

@bot.event
async def on_ready():
print(f'✅ {bot.user} Is Ready To Rule On Cord')

@bot.command()
async def join(ctx, vc_id: int):
if ctx.author.id not in allowed_users:
return

voice_channel = discord.utils.get(ctx.guild.voice_channels, id=vc_id)


if not voice_channel:
await ctx.send("❌ Could not find the specified voice channel.")
return

if ctx.voice_client:
await ctx.voice_client.disconnect()

try:
await voice_channel.connect()
await ctx.send(f"✅ Joined VC: {voice_channel.name}")
except Exception as e:
await ctx.send(f"❌ Failed to join VC: {e}")
print(f"❌ Error joining VC: {e}")

@bot.command()
async def spam(ctx, message: str, count: int):
if ctx.author.id not in allowed_users:
return

for _ in range(count):
await ctx.send(message)
await asyncio.sleep(0.1)

@bot.command()
async def ap(ctx, target_id: int):
if ctx.author.id not in allowed_users:
return

if ctx.channel.id in active_flame_tasks:
await ctx.send("AutoPreasure Enabled")
return

task = asyncio.create_task(global_flame_task(ctx.channel, target_id))


active_flame_tasks[ctx.channel.id] = task
await ctx.send(f"Started Pressurizing <@{target_id}>")

@bot.command()
async def endap(ctx):
if ctx.author.id not in allowed_users:
return

if ctx.channel.id in active_flame_tasks:
active_flame_tasks[ctx.channel.id].cancel()
del active_flame_tasks[ctx.channel.id]
await ctx.send("Stopped The AutoPreasure")
else:
await ctx.send("AutoPreassure Was Not Active In This Channel")

@bot.command()
async def r(ctx, user_id: int, *emojis):
if ctx.author.id not in allowed_users:
return

if not emojis:
await ctx.send("Please provide at least one emoji.")
return

reaction_data[user_id] = emojis
await ctx.send(f"Started Reacting To <@{user_id}>'s messages with {',
'.join(emojis)}")

@bot.command()
async def sr(ctx, user_id: int):
if ctx.author.id not in allowed_users:
return

if user_id not in reaction_data:


await ctx.send(f"No active reactions found for <@{user_id}>.")
return

del reaction_data[user_id]
await ctx.send(f"Stopped reacting to <@{user_id}>'s messages.")
#Statusing

@bot.command()
async def stream(ctx, url: str, *, status_message: str):
if ctx.author.id not in allowed_users:
return

await
bot.change_presence(activity=discord.Activity(type=discord.ActivityType.streaming,
name=status_message, url=url))
await ctx.send(f"Bot is now streaming: {status_message} - {url}")

@bot.command()
async def autoreply(ctx, user: discord.User):
"""Enable autoreply to a user"""
global auto_reply, opponent
await ctx.message.delete()
auto_reply = True
opponent = user
await ctx.send(f"✅ Auto-reply enabled for {user.mention}", delete_after=5)

@bot.command()
async def stopreply(ctx):
"""Disable autoreply"""
global auto_reply, opponent
await ctx.message.delete()
auto_reply = False
opponent = None
await ctx.send("❌ Auto-reply disabled.", delete_after=5)

@bot.event
async def on_message(message):
global auto_reply, opponent
if message.author.id in reaction_data and not message.author.bot:
for emoji in reaction_data[message.author.id]:
try:
await message.add_reaction(emoji)
except Exception as e:
print(f"Error adding reaction: {e}")

# 💬 Auto Reply
if auto_reply and opponent and message.author.id == opponent.id:
replies = load_replies()
if replies:
reply = random.choice(replies)
await message.channel.send(reply)

await bot.process_commands(message)

@bot.command()
async def help(ctx):
help_panel = load_help_panel()
await ctx.send(help_panel)

return bot

async def global_flame_task(channel, target_id):


while True:
for msg in flame_messages:
ᒪ ᑕ ᑕ Ꮋ ΛO ꕶ``````FΣΣL
await channel.send(f"# {msg} <@{target_id}> ```EΛY
ƬΉΣ ЦПBΣΛЯΛBLΣ ᑕΛO ꕶ```")
await asyncio.sleep(0.3)

async def main():


global global_bots
bots = [create_bot() for _ in bot_tokens]
global_bots = bots
await asyncio.gather(*(bot.start(token) for bot, token in zip(bots,
bot_tokens)))

if __name__ == "__main__":
asyncio.run(main())

You might also like