Custom Commands

CustomBanner

Custom empowers you to add customised functionality to your HQ Discord bot. If you don’t already have a HQ bot, you can get one here.

Let’s get started! To create your first command, click the dropdown in the top-right and then select “Servers”. Choose the server you want to add the command to. On the left nav-bar select the “Custom” page.

Custom commands are made up of two components - the command and actions.
When you first add a new command, you can edit it’s name. This will be what you type to run the command. E.g. c!!commandname. Optionally, you can also restrict the command so it can only be run by users with a specific role.

Once you’ve named your command, you can add some actions to it. Actions are what occurs when someone runs the command in your server. You can have as many actions per command as you’d like.

There are six types of actions that you can create with Campfire:

  • Message
    The message action allows you to send a message to a specific channel when a custom command is run.

  • Image
    The image command lets you send an image to a specific channel, as well as an optional message. The “Colour” field will change the colour shown at the side of the message.

  • Embed
    Embeds allow you to send pretty little messages with a customised colour sidebar and optional image. The “Title” field is shown in bold at the top of the message.

  • Add/Remove Role
    This will add or remove a specific role to the user who ran the command, make sure you write the role name correctly as it’s case sensitive.

  • NEW Javascript
    Javascript enables virtually limitless use of custom commands for any purpose you’d like. We advise only advanced users to use this action type.

    There are three pre-defined packages/variables you can use as part of the action type.

    Message: This is the message variable as part of discord.js - view docs - We use V12
    Bot: This is the bot/client variable as part of discord.js - view docs - We use V12
    Axios: This can be used for making HTTP requests - view docs

    New to discord.js? Check out this guide!

To add your first action, click “Add Action” and select the type. Once you’ve finished adding all the actions for your command, exit the panel and try it out!

That wraps up this guide on using our Custom feature. Need help? Join our Discord.

1 Like

This topic was automatically closed after 3 minutes. New replies are no longer allowed.