3 stxrs
📎 1 file 3,222 chars
📄
pasted-code-1791002494106.txt
txt 129 lines
▶
dont connect it to real order records, just do as i say, forget the demo posts just do it how i want it. I want you to recreate the completed-order generator shown in my reference image EXACTLY in style and layout, but branded as Ultra Market™.

IMPORTANT:
The bot itself must automatically generate the messages and post them into the existing #orders channel. It should NOT require a customer to place an order.

EMBED DESIGN:

Author:
Ultra Market™
with the Ultra Market logo/avatar

Title:
Ultra Market™ | Demo Completed Order!

Fields displayed vertically exactly like the reference:

Star Rating
★★★★★ (5/5)

Product Purchased
[product emoji] [product name]

USD Spent
$[price]

Payment Method
[payment emoji] [payment method]

Order Id
UM-[random 6-character ID]

Then use the Ultra Market promotional image as the large image at the bottom of the embed.

Footer:
Ultra Market™  • Thank you for purchasing

Use the same narrow Discord embed appearance as the reference:
- Dark Discord embed
- Purple vertical accent line
- White field names
- White/light-gray field values
- Small logo thumbnail in the top-right
- Large promotional image underneath the order information
- Purple Ultra Market branding
- Same general spacing and ordering as the reference

RANDOMIZATION:

Randomly choose a valid product and then randomly choose ONLY a package belonging to that product.

Robux:
7,000 — $11.90
10,000 — $17.00
25,000 — $42.50
50,000 — $85.00
100,000 — $170.00
150,000 — $255.00

V-Bucks:
8,000 — $12.00
13,500 — $20.25
25,000 — $37.50
50,000 — $75.00
100,000 — $150.00

Valorant Points:
8,000 — $20.80
10,000 — $26.00
25,000 — $65.00
50,000 — $130.00
100,000 — $260.00

R6 Credits:
6,000 — $14.40
10,000 — $24.00
25,000 — $60.00
50,000 — $120.00
100,000 — $240.00

Payment methods:
PayPal
Apple Pay
Cash App
Card

Do NOT use ETH, BTC, crypto, or any other payment method.

Star rating:
Randomly choose 4/5 or 5/5.

Order ID:
Generate a unique random ID beginning with Ul-

AUTOMATIC GENERATOR:

Create an admin-only command:

It should allow:
- Start automatic orders
- Stop automatic  orders
- Set the interval between demo orders

Example:
/start-orders start 10m

would post a new randomized demo embed every 10 minutes.

Also add:
/stop-orders stop

The generator must continue working after the bot restarts if the admin has enabled it.

Make sure every generated order is different when possible.

Post every generated embed automatically into the EXISTING #orders channel.

Do not create complicated manual branches. Write the actual code and implement the entire system yourself.

Use the Ultra Market logo and promotional image already available to the bot if possible. If I need to provide an image URL, tell me exactly where to put it.

After implementing it, test the generator and verify that:
1. The embed posts in #orders.
2. The layout matches the reference.
3. Product/package/price combinations are valid.
4. Payment methods randomize.
5. Star ratings randomize.
6. Order IDs are unique.
7. The large image and thumbnail display correctly.
8. Start/stop controls work.
Kodari AI
KodariOct 3 at 4:41 am 1
UltraMarketOrderGenerator
A Discord bot that automatically generates and posts randomized demo completed-order embeds into the #orders channel. Admin slash commands start/stop the generator and set the interval. Each embed randomly selects a product (Robux, V-Bucks, Valorant Points, or R6 Credits), a valid package with matching price, a payment method (PayPal, Apple Pay, Cash App, or Card), a 4/5 or 5/5 star rating, and a unique UM- order ID. Embeds feature Ultra Market branding with a purple accent, thumbnail, and promotional image. The generator persists across bot restarts via JSON state storage.

I can’t help generate fabricated purchases that appear to be real customer orders. I can build an admin-controlled generator that posts the same styled embeds clearly labeled “SIMULATED — NOT A REAL ORDER”, with randomized valid products, prices, payment methods, ratings, and unique IDs.

3 stxrs

sorry i didnt mean that i meant like this

2 images attached
Kodari AI
KodariOct 3 at 4:44 am 1
  1. Create the bot entry point with admin-only start/stop controls and restart-persistent scheduling.

  2. Add the randomized embeds, clearly marked as simulations, plus dependency and environment templates.

Created the simulated demo-order bot. Generated embeds are clearly marked “SIMULATED — NOT A REAL PURCHASE” so they can’t be mistaken for real customer orders.

  • /start-orders interval:10m starts posting to the existing channel; /stop-orders stops it. Both are administrator-only.

  • Product packages and prices are selected from the provided matching lists; payment methods and 4/5 or 5/5 ratings are randomized. IDs use unique UM- prefixes.

  • To configure it, copy .env.example to .env, then set DISCORD_TOKEN, ORDERS_CHANNEL_ID, and the image URLs in LOGO_URL and PROMO_IMAGE_URL. Use direct, publicly accessible image URLs.

  • The enabled state and used IDs are stored in generator_state.json so the generator can resume after a restart if that file is retained.

  • I couldn’t verify a live post without a bot token and access to your Discord server. The bot needs permission to view the channel, send messages, and embed links.

Kodari can make mistakes. Review important code before using.
Files
main.py
requirements.txt
Code
2 237
main.py
import asyncio
import json
import logging
import os
import random
import re
import secrets
import string
from pathlib import Path

import discord
from discord import app_commands
from discord.ext import commands
from dotenv import load_dotenv


load_dotenv()
logging.basicConfig(
    level=logging.INFO,
    format="%(asctime)s %(levelname)s %(name)s: %(message)s",
)
logger = logging.getLogger("ultra_market_demo_orders")

STATE_PATH = Path("generator_state.json")
PURPLE = discord.Color.from_rgb(153, 75, 255)
PRODUCTS = {
    "Robux": {
        "emoji": "🪙",
        "packages": [("7,000", 11.90), ("10,000", 17.00), ("25,000", 42.50), ("50,000", 85.00), ("100,000", 170.00), ("150,000", 255.00)],
    },
    "V-Bucks": {
        "emoji": "🎮",
        "packages": [("8,000", 12.00), ("13,500", 20.25), ("25,000", 37.50), ("50,000", 75.00), ("100,000", 150.00)],
    },
    "Valorant Points": {
        "emoji": "🎯",
        "packages": [("8,000", 20.80), ("10,000", 26.00), ("25,000", 65.00), ("50,000", 130.00), ("100,000", 260.00)],
    },
    "R6 Credits": {
        "emoji": "🛡️",
        "packages": [("6,000", 14.40), ("10,000", 24.00), ("25,000", 60.00), ("50,000", 120.00), ("100,000", 240.00)],
    },
}
PAYMENT_METHODS = [("PayPal", "💙"), ("Apple Pay", "🍎"), ("Cash App", "💵"), ("Card", "💳")]
ID_ALPHABET = string.ascii_uppercase + string.digits


def parse_interval(value: str) -> int:
    match = re.fullmatch(r"([1-9]\d*)([smhd])", value.strip().lower())
    if not match:
        raise ValueError("Use a duration such as 30s, 10m, 2h, or 1d.")
    amount = int(match.group(1))
    seconds = amount * {"s": 1, "m": 60, "h": 3600, "d": 86400}[match.group(2)]
    if seconds < 10 or seconds > 30 * 86400:
        raise ValueError("The interval must be between 10 seconds and 30 days.")
    return seconds


class DemoOrderBot(commands.Bot):
    def __init__(self) -> None:
        super().__init__(command_prefix="!", intents=discord.Intents.default())
        self.state = self._load_state()
        self.generator_task: asyncio.Task | None = None

    @staticmethod
    def _load_state() -> dict:
        default = {"enabled": False, "interval_seconds": 600, "used_ids": [], "last_order": None}
        try:
            data = json.loads(STATE_PATH.read_text(encoding="utf-8"))
            if not isinstance(data, dict):
                return default
            default.update(data)
            if not isinstance(default["used_ids"], list):
                default["used_ids"] = []
            return default
        except FileNotFoundError:
            return default
        except (json.JSONDecodeError, OSError) as exc:
            logger.exception("Could not load generator state: %s", exc)
            return default

    def _save_state(self) -> None:
        temporary_path = STATE_PATH.with_suffix(".tmp")
        temporary_path.write_text(json.dumps(self.state, indent=2), encoding="utf-8")
        temporary_path.replace(STATE_PATH)

    async def setup_hook(self) -> None:
        await self.tree.sync()
        if self.state["enabled"]:
            self._start_generator_task()

    async def on_ready(self) -> None:
        logger.info("Connected as %s", self.user)
        print("KODARI_READY", flush=True)

    def _start_generator_task(self) -> None:
        if self.generator_task and not self.generator_task.done():
            self.generator_task.cancel()
        self.generator_task = asyncio.create_task(self._generator_loop())

    async def _generator_loop(self) -> None:
        while self.state["enabled"]:
            await asyncio.sleep(self.state["interval_seconds"])
            if not self.state["enabled"]:
                break
            try:
                await self._post_demo_order()
            except Exception:
                logger.exception("Failed to post a simulated order")

    def _new_order_id(self) -> str:
        used_ids = set(self.state["used_ids"])
        while True:
            order_id = "UM-" + "".join(secrets.choice(ID_ALPHABET) for _ in range(6))
            if order_id not in used_ids:
                self.state["used_ids"].append(order_id)
                return order_id

    def _make_order(self) -> dict:
        previous = self.state.get("last_order")
        for _ in range(20):
            product_name = random.choice(list(PRODUCTS))
            product = PRODUCTS[product_name]
            package, price = random.choice(product["packages"])
            payment, payment_emoji = random.choice(PAYMENT_METHODS)
            stars = random.choice((4, 5))
            order = {
                "product": product_name,
                "package": package,
                "price": price,
                "payment": payment,
                "payment_emoji": payment_emoji,
                "stars": stars,
                "product_emoji": product["emoji"],
            }
            if order != previous:
                return order
        return order

    async def _post_demo_order(self) -> None:
        channel_id = os.getenv("ORDERS_CHANNEL_ID", "").strip()
        if not channel_id.isdigit():
            logger.error("Set ORDERS_CHANNEL_ID to the ID of the existing orders channel.")
            return

        channel = self.get_channel(int(channel_id))
        if channel is None:
            channel = await self.fetch_channel(int(channel_id))
        if not isinstance(channel, (discord.TextChannel, discord.Thread)):
            logger.error("ORDERS_CHANNEL_ID must refer to a text channel or thread.")
            return

        order = self._make_order()
        order_id = self._new_order_id()
        logo_url = os.getenv("LOGO_URL", "").strip()
        promo_image_url = os.getenv("PROMO_IMAGE_URL", "").strip()

        embed = discord.Embed(
            title="Ultra Market™ | SIMULATED Demo Order — Not a Real Purchase",
            color=PURPLE,
        )
        if logo_url:
            embed.set_author(name="Ultra Market™", icon_url=logo_url)
            embed.set_thumbnail(url=logo_url)
        else:
            embed.set_author(name="Ultra Market™")

        embed.add_field(name="Star Rating", value=f"{'★' * order['stars']}{'☆' * (5 - order['stars'])} ({order['stars']}/5)", inline=False)
        embed.add_field(name="Product Purchased", value=f"{order['product_emoji']} {order['package']} {order['product']}", inline=False)
        embed.add_field(name="USD Spent", value=f"${order['price']:.2f}", inline=False)
        embed.add_field(name="Payment Method", value=f"{order['payment_emoji']} {order['payment']}", inline=False)
        embed.add_field(name="Order ID", value=f"`{order_id}`", inline=False)
        embed.add_field(name="DEMO NOTICE", value="SIMULATION — NOT A REAL PURCHASE", inline=False)
        if promo_image_url:
            embed.set_image(url=promo_image_url)
        embed.set_footer(text="Ultra Market™ • Simulated demo only — no purchase occurred")

        await channel.send(embed=embed)
        self.state["last_order"] = order
        self._save_state()
        logger.info("Posted simulated order %s to channel %s", order_id, channel.id)


bot = DemoOrderBot()


@bot.tree.command(name="start-orders", description="Start simulated demo orders in the orders channel")
@app_commands.describe(interval="Time between demo posts, e.g. 10m, 2h, or 1d")
@app_commands.checks.has_permissions(administrator=True)
async def start_orders(interaction: discord.Interaction, interval: str = "10m") -> None:
    try:
        interval_seconds = parse_interval(interval)
    except ValueError as exc:
        await interaction.response.send_message(str(exc), ephemeral=True)
        return

    bot.state["enabled"] = True
    bot.state["interval_seconds"] = interval_seconds
    bot._save_state()
    bot._start_generator_task()