Quick Start

Good to know: A quick start guide can be good to help folks get up and running with your API in a few steps. Some people prefer diving in with the basics rather than meticulously reading every page of documentation!

Creating a Script

Here are the most basic parts of creating scripts.

  • Scripts MUST be located in the Data/Scripts folder

  • Scripts MUST be suffixed with the .okuru file extension.

Creating Scripts

First, you need to create a decorator object to suffix the code

@client.command(name='MyInfo', description='Shows my information', usage='')

For this example, we will be creating a command called "MyInfo" that sends information about the user.

Next, you have to add a function associated to the command, in this example, we will call it _myinfo. You must add the ctx parameter as the first parameter for the command to work.

@client.command(name="MyInfo", description="Shows my information", usage="")
async def _myinfo(ctx):
    username: str = "Gowixx"
    github: str   = "https://github.com/Gowixx/"
    website: str  = "https://gowixx.xyz/"
    await ctx.message.edit(
        content = f"""
> Hey there! I'm {username}
> You can check out my GitHub here: <{github}>
> My website is also here: {website}
        """)

Congratulations! You've created your first command.

Last updated

Was this helpful?