Skip to content

🚀 This new wiki is in beta! Please double-check for any issue and report them on the GitHub

Your First Bot

This guide will walk you through creating a Discord bot application and loading it with DiSky.

First, you need to create a bot application on Discord’s Developer Portal.

  1. Open the Developer Portal

    Go to Discord’s Application Dashboard and log in with your Discord account.

  2. Create a New Application

    Click the “New Application” button in the top right corner. Give your application a name and click “Create”.

  3. Create the Bot User

    • Navigate to the “Bot” section in the left sidebar
    • Click “Add Bot” or “Create Bot”
    • Confirm by clicking “Yes, do it!”
  4. Copy Your Bot Token

    Under the “Token” section, click “Reset Token” if needed, then “Copy” to copy your bot token.

  5. Enable Privileged Gateway Intents

    Scroll down to “Privileged Gateway Intents” and enable:

    • Server Members Intent
    • Message Content Intent
    • Presence Intent (optional)

    Gateway Intents

  6. Invite Your Bot

    • Go to the “OAuth2” section, then “URL Generator”
    • Select scopes: bot and applications.commands
    • Select bot permissions (or select “Administrator” for full access)
    • Copy the generated URL and open it in your browser
    • Select a server and authorize

Now that your bot is created and invited, let’s load it using DiSky.

Create a new file in plugins/Skript/scripts/ (e.g., bot.sk) and add:

define new bot named "MyBot":
# Your bot token from the Developer Portal
token: "YOUR_BOT_TOKEN_HERE"
# Gateway intents (what events your bot can receive)
intents: default intents
# Advanced options
policy: all
cache flags: default cache
compression: none
# Auto reconnect if disconnected
auto reconnect: true
# Don't reload connection on script reload
force reload: false
# Code to run when bot is ready
on ready:
send "&a[DiSky] &2%event-bot% is now online!" to console

Let’s understand each part:

PropertyDescription
tokenYour bot’s secret token from Discord Developer Portal
intentsWhich events your bot can receive (learn more)
policyCache policy for Discord entities (learn more)
cache flagsWhich entities to cache (learn more)
compressionGateway compression (none or zlib)
auto reconnectWhether to reconnect automatically if disconnected
force reloadWhether to reload the connection on script reload (keep as false)

The bot structure supports three event sections:

Runs once when the bot is fully loaded (including all guilds):

define new bot named "MyBot":
token: "..."
intents: default intents
on ready:
send "&a%event-bot% is ready!" to console
# This is where you register global slash commands

Event value: event-bot - the bot instance that just loaded

Runs when each guild is fully loaded (including all members):

define new bot named "MyBot":
token: "..."
intents: default intents
on guild ready:
send "&a%event-bot% loaded guild &e%event-guild%" to console
# This is where you register guild-specific slash commands

Event values:

  • event-bot - the bot instance
  • event-guild - the guild that just loaded

Runs when the bot is about to disconnect:

define new bot named "MyBot":
token: "..."
intents: default intents
on shutdown:
send "&c%event-bot% is shutting down!" to console

Here’s a complete example with all sections:

define new bot named "MyBot":
token: "YOUR_TOKEN_HERE"
intents: default intents
policy: all
cache flags: default cache
auto reconnect: true
force reload: false
on ready:
send "&a[DiSky] %event-bot% is online!" to console
send "&7Loaded &e%size of guilds of event-bot% &7guilds" to console
on guild ready:
send "&7Guild &e%event-guild% &7is ready!" to console
on shutdown:
send "&c[DiSky] %event-bot% is shutting down..." to console
  1. Save your script file
  2. Reload your scripts with /sk reload <filename> or restart the server
  3. Check the console for the “is online!” message
  4. Your bot should now appear online in Discord!

Congratulations! Your bot is now online. Let’s make it do something useful.