Creating AutoCommands

With the AutoCommands module, you can set up recurring commands to provide your server members with engaging content on a regular basis. Here’s everything you need to know about this powerful feature.

CONCEPT: Command Intervals

AutoCommands allows you to automatically send commands at specified intervals. The interval format is flexible, enabling you to set up commands to run daily, hourly, or even every few minutes. Here are some examples of interval formats you can use:

  • 1d - Run a command every day
  • 2h - Run a command every two hours
  • 3m - Run a command every three minutes
  • 2d6h30m - Run a command every 2 days + 6 hours and 30 minutes

TIP: Test Before Automating

Before setting up a command as an auto command, it’s a good practice to test it out to ensure it works as expected. You can run the command manually using the standard format:

sc!<cmd_name> [cmd_arguments]

(Replace sc! with / or your guild prefix or user prefix, sc! is the bot’s default prefix)

For instance, if you want to test the gel rating:safe cat_ears command, you can run:

sc!gel rating:safe cat_ears

This way, you can make sure that the command does what you intend before scheduling it as an auto command.

Adding an Auto Command Job:

To add a new auto command job, simply use the following command:

sc!auto add <interval> <cmd_name> [cmd_arguments]

For example:

sc!auto add 5m gel rating:safe cat_ears

This command creates a new job that runs gel rating:safe cat_ears every 5 minutes.

Managing Auto Command Jobs

AutoCommands offers easy management of scheduled commands. You can delete a job by either its ID or its associated command. Here’s how:

To delete a job by its ID:

sc!auto del 69420

To delete a job by its command line:

sc!auto del gel cat_ears

This will find the first matching command with “gel cat_ears” and ask to confirm for deletion.

You can also list all the current jobs for your guild using:

sc!auto list