Nightbot Says Alias Does Not Exist

So i found a problem with Nightbot where if i had set a alias for a command, it will say that it does not exist if the alias is a custom one

@MisterTee

Aliases are commands that call other commands (commands whose functions ride off of other already existing commands). If you set a command as an alias to another command that doesn’t exist, you get errors. When creating a custom command that’s meant to function on its own, don’t set it as an alias of another command. To make a command no longer aliased, open it up on the Nightbot dashboard and clear the Alias field.

Then how do i activate the command via a keyword then?

1 Like

The basic syntax for adding a custom command through chat is:

!addcom [command name] [command response]

For example, let’s say you want to create a command called !hi with the response “Hello world!”:

!addcom !hi Hello world!

When you type !hi in chat, Nightbot will respond with “Hello world!”

Ahh ok and what do i use the alias for?

1 Like

Aliases are commands that call other commands (commands whose functions ride off of other already existing commands).

Is there a tutorial for that?

1 Like

Aliases are briefly mentioned in the Nightbot docs at https://docs.nightbot.tv/commands/commands but I can copy and paste one of my responses from another topic.


The basic syntax for adding a custom command through chat is:

!addcom [command name] [command response]

For example, let’s say you want to create a command called !hi with the response “Hello world!”:

!addcom !hi Hello world!


Now aliases are commands that call other commands (commands whose functions ride off of other commands). For example, let’s say you want to create a command called !sup that gives the same response as !hi. You could go about this two ways:

Set up !sup as its own independent command:
!addcom !sup Hello world!

Or set up !sup as an alias of !hi:
!addcom !sup -a=!hi $(query)

Notice the -a= part. This is the alias parameter for creating commands. Whatever previously existing command you want your new command to call, you put it in the alias parameter.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.