Skip to main content

embed scripting engine by Infrared LLC.

Project description

🧱 lanectl

lanectl is the embed scripting engine for infrared.

It parses a block of text, replaces variables, and turns it into an embed with an optional discord.ui.View.
No GUI. No builder. Just script → message.


▶ Example

{content:welcome, {user.name}}
{title:infrared online}
{description:this server runs cold}
{color:#ED1C24}
{author:Pusha && https://i.imgur.com/pusha.png}
{field:Rank && King && inline}
{footer:real bars only && https://i.imgur.com/footer.png}
{button:enter && 🚪 && https://infrared.something && red}
{timestamp}

✅ Supported Fields

All fields are optional. Missing values are ignored.

Field Format
content {content:text}
title {title:text}
description {description:text}
color {color:#hex}
author {author:Name && Icon && URL}
footer {footer:Text && Icon}
field {field:Name && Value && inline}
button {button:Label && Emoji && URL && Style}
timestamp {timestamp}

🔀 Variables

Variables are replaced in any field.

{user}, {user.name}, {user.id}, {user.avatar}, {user.created_at}, {user.joined_at}
{guild}, {guild.name}, {guild.id}, {guild.owner}, {guild.member_count}, {guild.created_at}
{target}, {target.name}, {target.id}, {target.avatar}, ...

🧪 Bot Usage

from lanectl import Lane

@bot.command()
async def createembed(ctx, *, script: str):
    r = Lane(script, ctx.author)

    await ctx.send(
        content=r.content,
        embed=r.render(),
        view=r.view()
    )

If the script defines nothing, r.content, r.render(), and r.view() all return None.


⚙️ Install

pip install lanectl

Or just copy the lanectl/ folder into your project, i dont really care.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lanectl-0.4.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lanectl-0.4.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file lanectl-0.4.0.tar.gz.

File metadata

  • Download URL: lanectl-0.4.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for lanectl-0.4.0.tar.gz
Algorithm Hash digest
SHA256 b17a6a75854e755223dfa7ba2cc360c4fe1062e73996e2696b8d2cfa00c8d5e3
MD5 f6d1343877d5d6968347853570520fe3
BLAKE2b-256 40dc2e8a3178cf172a31e7b2f5b879570b6c23a70de8d63abdd3863dd5b708f0

See more details on using hashes here.

File details

Details for the file lanectl-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: lanectl-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for lanectl-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b435dbf231992a31176ee27aa6e24b79d34da87254d5854260e4150574a6ca90
MD5 290daeb0dd59c695dd29c07c02722cc6
BLAKE2b-256 372093791588949a1492b9370b982d81b2dde1dabfd395add889e80573c662d4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page