Introduction

Welcome to the Axis documentation! Axis is a powerful and customizable Discord bot and app designed to enhance Discord servers with advanced utilities, moderation tools, and customization capabilities.

This guide will help you understand how to use Axis' custom features, from configuring text fields and utilizing placeholders to custom commands. Whether you're setting up custom responses, managing moderation actions, or leveraging our various custom output parameters, this documentation should provide an explanation for everything you need to get started.

Text Fields

There are two types of text fields:

  • Small Text Fields: These have small character limits, such as the 1 character limit for the command prefix, or numbers (like 1).
  • Big Text Areas: These are used for customizable messages and lists. Messages are limited to 1,000 characters by default, while lists are limited to 10,000 characters. Lists can use commas with a space or a newline to indicate the next keyword.

All fields are required by default.

Formatting

You are able to format text inside of any Axis response message using Discord's default markup. You can read about their formatting here.

Custom Formatting

Formatting allows placeholders in response messages to be replaced with context-based values.


Usage

To use the formatting system, you can include placeholders in your message template wrapped in curly braces (e.g., {user}, {reason}). These placeholders will be replaced with the corresponding values when the message is formatted.

Example:

{user}, welcome to my server! Your ID is: {user.id}

would be formatted as:

Awesome Nickname, welcome to my server! Your ID is: 123464920346980

User Parameters

Use the following placeholders related to the user:

Parameter Type Description Example Output
{user} string The display name of the user. Awesome Nickname
{user.mention} string The mention tag of the user. @megabyteofficial
{user.id} integer The unique identifier of the user. 123464920346980
{user.name} string The username of the user. megabyteofficial

Moderation Parameters

Use the following placeholders in moderation actions:

Parameter Type Description Example Output
{reason} string The reason provided for an action. Default is "No reason provided."
{timestamp} string The end of the moderation action duration formatted as a date time. 10/18/24 4:20
{timestamp.relative} string The end of the moderation action duration formatted as a relative time. in 4 hours 20 minutes

Server Parameters

Use the following placeholders for server-related parameters:

Parameter Type Description Example Output
{server.name} string The name of the server. Awesome Server
{server.id} integer The unique identifier of the server. 987654321012345
{server} string Resolves to the same as server.name. Awesome Server
{server.member_count} integer The amount of members in a server. 9001


Server Directory

The server directory allows you to list your own Discord servers on Axis with your own custom page.

Server Directory Formatting

The Axis server directory supports both Markdown and a limited set of HTML tags for text formatting in long descriptions. Below is a guide on how to use them.

Markdown Formatting

Markdown allows you to style text easily. Below are examples of supported Markdown:

**Bold Text** → Bold Text
*Italic Text* → Italic Text
__Underlined Text__ → Underlined Text
~~Strikethrough~~ → Strikethrough
`Inline Code` → Inline Code
[Link Text](https://axis.cmds.media) → Link Text
- List Item → • List Item
1. Numbered Item → 1. Numbered Item

HTML Formatting

The following HTML tags are supported:

<b>bold</b>: bold
<i>italic</i>: italic
<u>underlined</u>: underlined
<strong>strong (bold)</strong>: strong (bold)
<em>emphasis (italic)</em>: emphasis (italic)
<sub>subscript</sub>: subscript
<br>line break</br>: (new line)
<hr>horizontal rule</hr>: (line)
<center>centered text</center>: (centered text)
<ul>unordered list</ul>: • item 1
<ol>ordered list</ol>: 1. item 1
<li>list item</li>: • list item
<code>inline code</code>: inline code
<h1>Heading 1</h1>: Heading 1 (Largest)
<h2>Heading 2</h2>: Heading 2 (Large)
<h3>Heading 3</h3>: Heading 3 (Normal)
<h4>Heading 4</h4>: Heading 4 (Smallest)



AxiScript

AxiScript is a lightweight, restricted scripting language designed to work similarly to Python but with specific limitations to allow it to work inside Axis.

Key Differences from Python:

  • AxiScript does not allow imports or access to the global scope.
  • The only available features are basic Python functionality (like variables) and functionality provided by discord.py.
  • You cannot call external functions from outside the script.

Example Usage

@bot.event
async def on_ready():
    print("Bot is ready!")

@bot.command()
async def greet(ctx):
    await ctx.send(f"Hello, {ctx.author.name}!")