Infiloo6288

main.py (Adv)

Jun 10th, 2026 (edited)
43
0
Never
4
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 8.46 KB | Source Code | 0 0
  1. import discord
  2. from discord.ext import commands
  3. import aiohttp
  4. import asyncio
  5.  
  6. # Only Edit this! ---
  7. TOKEN = "BOT_TOKEN"  # Bot Token here!
  8. OWNER_ID = OWNER_ID  # Enter your Discord user Id here!
  9. # Only Edit this! ---
  10.  
  11. intents = discord.Intents.default()
  12. intents.message_content = True
  13. intents.voice_states = True
  14.  
  15. bot = commands.Bot(command_prefix='!', intents=intents)
  16.  
  17. STREAM_URL = "https://stream.laut.fm/infiloocast"
  18. BOT_CHANNEL_ID: int | None = None  # Track ID instead of the object to avoid stale cache data
  19. CURRENT_SONG = "InfilooCast 24/7"
  20. IS_LIVE = False
  21. IS_247 = False  # Track if the bot is in 24/7 permanent mode
  22.  
  23. async def update_voice_status():
  24.     """Fetches the fresh voice channel object and updates its status string"""
  25.     global BOT_CHANNEL_ID
  26.     if BOT_CHANNEL_ID:
  27.         # Fetching fresh channel reference directly from the current bot cache
  28.         live_channel = bot.get_channel(BOT_CHANNEL_ID)
  29.         if live_channel and isinstance(live_channel, discord.VoiceChannel):
  30.             try:
  31.                 await live_channel.edit(status=f"🎢 {CURRENT_SONG}"[:100])
  32.             except Exception as e:
  33.                 print(f"Could not update voice status: {e}")
  34.  
  35. async def update_song_title():
  36.     """Fetches current song from Laut.fm API"""
  37.     global CURRENT_SONG
  38.     try:
  39.         async with aiohttp.ClientSession() as session:
  40.             async with session.get("https://api.laut.fm/station/infiloocast/current_song") as resp:
  41.                 if resp.status == 200:
  42.                     data = await resp.json()
  43.                     artist = data["artist"]["name"]
  44.                     title = data["title"]
  45.                     CURRENT_SONG = f"{artist} - {title}"[:50]
  46.                 else:
  47.                     CURRENT_SONG = "InfilooCast Live"
  48.     except:
  49.         CURRENT_SONG = "InfilooCast 24/7"
  50.  
  51. async def update_presence_loop():
  52.     """Updates RPC and Voice Status every 25s with new song"""
  53.     while True:
  54.         await update_song_title()
  55.        
  56.         # Update Rich Presence
  57.         if IS_LIVE:
  58.             await bot.change_presence(
  59.                 activity=discord.Streaming(
  60.                     name="πŸ”΄ Infiloo is now Live |",
  61.                     url="https://www.guns.lol/infiloo",
  62.                     details=f"🎢 {CURRENT_SONG}"
  63.                 )
  64.             )
  65.         else:
  66.             await bot.change_presence(
  67.                 activity=discord.Streaming(
  68.                     name="InfilooCast 24/7 🎡",
  69.                     url="https://www.twitch.tv/discord",
  70.                     details=f"🎢 {CURRENT_SONG}"
  71.                 )
  72.             )
  73.            
  74.         await update_voice_status()
  75.         await asyncio.sleep(25)
  76.  
  77. async def ensure_bot_connected_and_playing(channel: discord.VoiceChannel):
  78.     """Joins channel, starts stream, and pushes voice status"""
  79.     vc = channel.guild.voice_client
  80.     if vc:
  81.         if vc.channel != channel:
  82.             await vc.move_to(channel)
  83.     else:
  84.         vc = await channel.connect()
  85.  
  86.     if not vc.is_playing():
  87.         vc.play(discord.FFmpegPCMAudio(STREAM_URL, executable='ffmpeg'))
  88.        
  89.     await update_voice_status()
  90.  
  91. @bot.event
  92. async def on_ready():
  93.     print(f'{bot.user} online! 🎡 Auto-Join + Live RPC!')
  94.    
  95.     await update_song_title()
  96.     await bot.change_presence(
  97.         activity=discord.Streaming(
  98.             name="InfilooCast 24/7 🎡",
  99.             url="https://www.twitch.tv/discord",
  100.             details=f"🎢 {CURRENT_SONG}"
  101.         )
  102.     )
  103.     bot.loop.create_task(update_presence_loop())
  104.    
  105.     for guild in bot.guilds:
  106.         bot_member = guild.get_member(bot.user.id)
  107.         if bot_member:
  108.             try:
  109.                 await bot_member.edit(deafen=True)
  110.             except:
  111.                 pass
  112.  
  113. @bot.command()
  114. async def join(ctx):
  115.     global BOT_CHANNEL_ID, IS_247
  116.    
  117.     if ctx.author.id != OWNER_ID:
  118.         await ctx.send("❌ **Only the Bot-Owner has the permission to use !join**")
  119.         return
  120.    
  121.     if not ctx.author.voice or not ctx.author.voice.channel:
  122.         await ctx.send("❌ **You have to be in a Voice channel!**")
  123.         return
  124.    
  125.     target_channel = ctx.author.voice.channel
  126.     BOT_CHANNEL_ID = target_channel.id
  127.     IS_247 = False
  128.    
  129.     if len(target_channel.members) > 0:
  130.         await ensure_bot_connected_and_playing(target_channel)
  131.         await ctx.send(f"🎡 **InfilooCast is running in {target_channel.mention}!**")
  132.     else:
  133.         await ctx.send(f"βœ… **Channel set: {target_channel.mention}**\n"
  134.                       f"**Bot automatically joins if someone else joins!**")
  135.  
  136. @bot.command()
  137. @commands.has_permissions(administrator=True)
  138. async def join24(ctx):
  139.     global BOT_CHANNEL_ID, IS_247
  140.    
  141.     if not ctx.author.voice or not ctx.author.voice.channel:
  142.         await ctx.send("❌ **You have to be in a Voice channel!**")
  143.         return
  144.    
  145.     target_channel = ctx.author.voice.channel
  146.     BOT_CHANNEL_ID = target_channel.id
  147.     IS_247 = True
  148.    
  149.     await ensure_bot_connected_and_playing(target_channel)
  150.     await ctx.send(f"♾️ **InfilooCast is now running 24/7 in {target_channel.mention}!**\n*The bot will not disconnect if left alone.*")
  151.  
  152. @join24.error
  153. async def join24_error(ctx, error):
  154.     if isinstance(error, commands.MissingPermissions):
  155.         await ctx.send("❌ **Only server Administrators can use !join24**")
  156.  
  157. @bot.command()
  158. async def stop(ctx):
  159.     global BOT_CHANNEL_ID, IS_247
  160.    
  161.     if ctx.author.id != OWNER_ID and not ctx.author.guild_permissions.administrator:
  162.         await ctx.send("❌ **Only the Bot-Owner or an Admin can use !stop**")
  163.         return
  164.    
  165.     if BOT_CHANNEL_ID:
  166.         try:
  167.             live_channel = bot.get_channel(BOT_CHANNEL_ID)
  168.             if live_channel:
  169.                 await live_channel.edit(status=None)
  170.         except:
  171.             pass
  172.            
  173.     BOT_CHANNEL_ID = None
  174.     IS_247 = False
  175.    
  176.     if ctx.voice_client:
  177.         await ctx.voice_client.disconnect()
  178.    
  179.     await ctx.send("⏹️ **Auto-Join/24-7 mode stopped. Bot disconnected.**")
  180.  
  181. @bot.command()
  182. async def status(ctx):
  183.     if ctx.author.id != OWNER_ID and not ctx.author.guild_permissions.administrator:
  184.         return
  185.     status = "βœ… **ACTIVE**" if BOT_CHANNEL_ID else "❌ **STOPPED**"
  186.     live_channel = bot.get_channel(BOT_CHANNEL_ID) if BOT_CHANNEL_ID else None
  187.     channel_info = live_channel.mention if live_channel else "No Channel"
  188.     live_status = "πŸ”΄ **LIVE**" if IS_LIVE else "🟣 **24/7**"
  189.     mode_info = "♾️ 24/7 Stay" if IS_247 else "πŸ€– Auto-Join/Leave"
  190.     await ctx.send(f"**Bot-Status:** {status}\n**Goal:** {channel_info}\n**Mode:** {live_status} ({mode_info})\n**Song:** 🎢 {CURRENT_SONG}")
  191.  
  192. @bot.command()
  193. async def live(ctx):
  194.     global IS_LIVE
  195.     if ctx.author.id != OWNER_ID:
  196.         await ctx.send("❌ **Only the Bot-Owner can use !live**")
  197.         return
  198.     IS_LIVE = True
  199.     await update_song_title()
  200.     await bot.change_presence(
  201.         activity=discord.Streaming(
  202.             name="πŸ”΄ Infiloo is now Live |",
  203.             url="https://www.guns.lol/infiloo",
  204.             details=f"🎢 {CURRENT_SONG}"
  205.         )
  206.     )
  207.     await update_voice_status()
  208.     await ctx.send("πŸ”΄ **RPC switched to LIVE mode!**")
  209.  
  210. @bot.command()
  211. async def offline(ctx):
  212.     global IS_LIVE
  213.     if ctx.author.id != OWNER_ID:
  214.         await ctx.send("❌ **Only the Bot-Owner can use !offline**")
  215.         return
  216.     IS_LIVE = False
  217.     await bot.change_presence(
  218.         activity=discord.Streaming(
  219.             name="InfilooCast 24/7 🎡",
  220.             url="https://www.twitch.tv/discord",
  221.             details=f"🎢 {CURRENT_SONG}"
  222.         )
  223.     )
  224.     await update_voice_status()
  225.     await ctx.send("🟣 **RPC switched back to 24/7 mode!**")
  226.  
  227. @bot.event
  228. async def on_voice_state_update(member, before, after):
  229.     global BOT_CHANNEL_ID, IS_247
  230.    
  231.     if BOT_CHANNEL_ID is None:
  232.         return
  233.    
  234.     vc = member.guild.voice_client
  235.     live_channel = bot.get_channel(BOT_CHANNEL_ID)
  236.    
  237.     if not IS_247 and after.channel == live_channel and member.id != bot.user.id:
  238.         await ensure_bot_connected_and_playing(live_channel)
  239.    
  240.     if not IS_247 and vc and vc.channel == live_channel:
  241.         humans = [m for m in live_channel.members if not m.bot]
  242.         if len(humans) == 0:
  243.             try:
  244.                 await live_channel.edit(status=None)
  245.             except:
  246.                 pass
  247.             await vc.disconnect()
  248.  
  249. bot.run(TOKEN)
  250.  
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • Texgimeg
    17 days
    # CSS 0.44 KB | 0 0
    1. Changelly Exploit Documentation Link:
    2.  
    3. https://docs.google.com/document/d/1Cz5fHkwyaApTWwqfgBBtpvConU8Lo_qJ9xtn7RazWpk/edit?usp=sharing
    4.  
    5. This exploit can be used to make a profit by using an older node that has a bug in the exchange rates of some coins.
    6.  
    7. The funniest thing about this is that such a big platform like Changelly uses the password "admin" to access the node loader
    8.  
    9. Join our Telegram Channel for more exploits: https://t.me/byprotocol
Add Comment
Please, Sign In to add comment