somo123456789

make it join vc and if you do not have OW-numbers | u get discornexed

๐Ÿ“Ž 1 file 3,388 chars
๐Ÿ“„
pasted-code-1782397329034.txt
txt 154 lines
โ–ถ
import discord
from discord.ext import commands
from discord import app_commands

TOKEN = ""

OWNER_ID = 1328810635328360539
CHANNEL_ID = 1518223965598781614

SERVER_OWNER = "Anthony059131"
SERVER_NAME = "UK Liverpool Merseyside Roleplay"
JOIN_CODE = "LPLMRP"

intents = discord.Intents.default()
bot = commands.Bot(command_prefix="!", intents=intents)

session_message_id = None

def create_embed():
embed = discord.Embed(
title="Server Start Up",
description="A Session has been STARTED.",
color=discord.Color.green()
)

```
embed.add_field(name="Server Owner", value=SERVER_OWNER, inline=True)
embed.add_field(name="Access", value="Listed", inline=True)
embed.add_field(name="Server Name", value=SERVER_NAME, inline=False)
embed.add_field(name="Join Code", value=f"`{JOIN_CODE}`", inline=False)

embed.add_field(
    name="Server Status",
    value=f"๐Ÿ“Š ๐Ÿ‘ฅ 0/40 players โ€ข ๐Ÿ• Queue empty โ€ข ๐Ÿ”‘ {JOIN_CODE}",
    inline=False
)

embed.add_field(
    name="๐Ÿ›๏ธ Directorship Team",
    value="๐Ÿ‘‘ Anthony059131 โ€” Server Owner",
    inline=False
)

embed.set_footer(text="Powered By LPLMRP Utilities")

return embed
```

@bot.event
async def on_ready():
try:
synced = await bot.tree.sync()
print(f"Synced {len(synced)} commands")
print(f"Logged in as {bot.user}")
except Exception as e:
print(e)

@bot.tree.command(name="session", description="Start a session")
async def session(interaction: discord.Interaction):

```
global session_message_id

if interaction.user.id != OWNER_ID:
    await interaction.response.send_message(
        "No permission.",
        ephemeral=True
    )
    return

channel = bot.get_channel(CHANNEL_ID)

if channel is None:
    await interaction.response.send_message(
        "Channel not found.",
        ephemeral=True
    )
    return

msg = await channel.send(
    "@everyone",
    embed=create_embed()
)

session_message_id = msg.id

await interaction.response.send_message(
    "Session started.",
    ephemeral=True
)
```

@bot.tree.command(name="boost", description="Send a boost message")
async def boost(interaction: discord.Interaction):

```
if interaction.user.id != OWNER_ID:
    await interaction.response.send_message(
        "No permission.",
        ephemeral=True
    )
    return

channel = bot.get_channel(CHANNEL_ID)

await channel.send(
    "@everyone\n\n"
    "๐Ÿš€ SERVER BOOST ๐Ÿš€\n\n"
    "Let's try get full!\n"
    "Come on, we got this! ๐Ÿ’ช\n\n"
    f"๐Ÿ”‘ Join Code: {JOIN_CODE}"
)

await interaction.response.send_message(
    "Boost sent.",
    ephemeral=True
)
```

@bot.tree.command(name="endsession", description="End the session")
async def endsession(interaction: discord.Interaction):

```
global session_message_id

if interaction.user.id != OWNER_ID:
    await interaction.response.send_message(
        "No permission.",
        ephemeral=True
    )
    return

if session_message_id is None:
    await interaction.response.send_message(
        "No active session.",
        ephemeral=True
    )
    return

channel = bot.get_channel(CHANNEL_ID)
message = await channel.fetch_message(session_message_id)

await message.delete()

session_message_id = None

await interaction.response.send_message(
    "Session ended.",
    ephemeral=True
)
```

bot.run(TOKEN)
Kodari can make mistakes. Review important code before using.
Files

No files in this session

Code