Leaf
6.0
6.0
  • Welcome
  • Placeholders
    • Standard
    • Custom
  • Commands
    • Overview
    • Basic Types
      • Info
  • Discord
    • Bot
    • Embeded Message
Powered by GitBook
On this page
  • Step 1 Create a Bot
  • Step 2 Invite Bot to Server
  • Step 3 Register Bot with Leaf
  • Command Defaults
  • What can i do with my bot?
Edit on GitHub
  1. Discord

Bot

PreviousInfoNextEmbeded Message

Last updated 3 months ago

Step 1 Create a Bot

  • Go to the Discord Developer Portal.

  • Go to applications.

  • Click new application.

  • Click Bot.

  • Click Reset Token.

  • Copy token.

  • Enable Privileged Gateway Intents. (I recommend enabling them all)

Step 2 Invite Bot to Server

  • Open this website

  • Select the permissions the bot should have. (I recommend just giving admin)

  • Copy the client ID from the application.

  • Click the generated link on the calculator.

  • Invite the bot to the server.

Step 3 Register Bot with Leaf

  • In the config.yml paste the bot's token into the discord_token field.

  • Restart the proxy server.

  • You're done!

Command Defaults

command_identnfier:
  ...
  
  # The discord bot section.
  discord_bot:
    # [REQUIRED] → Discord Command Toggle
    enabled: true
    
    # [OPTIONAL] → When a member returns null.
    member_error": "An error occurred while trying to get the member instance."
    
    # [OPTIONAL] → Allowed Channels
    # Specifiy channels that this command
    # is only allowed to be executed in.
    allowed_channels:
      - "1150803388309712947"
    channel_not_allowed: "You cannot run this command in this channel."
    
    # [OPTIONAL] → Discord Permissions.
    # The discord member must have all of
    # these permissions to use this command.
    permissions:
      - ADMINISTRATOR
    no_permission: "You do not have permission to run this command."
    
    # [OPTIONAL] → Discord Roles.
    # The discord member must have at least 1 of 
    # these role names.
    roles:
      - "Owner"
      - "Moderator"
    no_roles": "You do not have the correct roles to run this command."
    
    discord_members:
    - "548674771013861381"
    no_discord_id: "You are not allowed to execute this command"
    
    # [OPTIONAL] → Discord Command Limit
    # Limit the amount of times a discord member can
    # execute this command.
    # No Limit = -1.
    limit: -1
    
    # [OPTIONAL] → Delete after seconds
    # The amount of time the plugin should wait before deleting
    # the discord message that was sent.
    delete_after_seconds: -1

What can i do with my bot?

https://discord.com/developers/applications
https://discordapi.com/permissions.html

Create a command that responds with a message.

Discord Bot
Page cover image