acc-bot

A simple Discord Bot for the CAPSHER ACC Bot Challenge!

This project is maintained by alexling540

← Home

Embeds

The $embed command lets users create, edit, delete, and schedule embeds. To get a better idea of how this command is structured see the Discord.js embed docs.

Usage

Subcommands

For all embed_id parameters, the naming rule is as follows: The id must be alphanumeric and may include dashes (-) and underscores (_) but no other special characters.

help

The help function for the embed command, will display a summarized version of the documentation found on this page.

↑ Top

list

Lists the ids of all embeds save in this server. Will be improved.

↑ Top

queue

Queues the embed with id embed_id to show up in the specified channel at the given time. If not enough arguments are given, the embed_id doesn’t follow the naming rules, the embed with id embed_id doesn’t exist, the channel doesn’t exist, or if the time is invalid, no embed will be queued and the user will be notified. If the embed already queued, then this will override the previous channel and time.

Valid datetime formats include:

See Mozilla’s docs for more information about valid datetimes. Chances are if it is parsable (i.e. not NaN), it is valid.

↑ Top

dequeue

Removes the embed with id embed_id from the queue, so it will not be automatically sent. If the embed_id doesn’t follow the naming rules or the embed with embed_id doesn’t exist, no embed will be removed from the queue and the user will be notified. If the embed was not queued in the first place, then nothing happens.

↑ Top

show

Sends the data of the embed with id embed_id into the channel that the command was called in. If the embed_id doesn’t follow the naming rules or the embed with embed_id doesn’t exist, no embed will be shown and the user will be notified.

↑ Top

new

This subcommand will start editing a new embed with an autogenerated id, if an embed_id is not given. If the given embed_id doesn’t follow the naming rules or is the same as an existing embed, no embed will be edited and the user will be notified. This command does not save to the server’s embed list, so remember to $embed save!

↑ Top

edit

This subcommand will open the editor to edit an embed with the given id embed_id. If the given embed_id doesn’t follow the naming rules or the embed with embed_id doesn’t exist, no embed will be edited and the user will be notified. If another embed is already being edited, the other embed will stay in the editor and the user will be notified.

↑ Top

save

This subcommand will save the embed currently in the editor. If no embed is being edited, the user will be notified.

↑ Top

cancel

This subcommand will revert all changes done to the embed in the editor. Users have the option of confirming or cancelling the revert. On confirmation, changes to the embed in the editor will be discarded. Please note that this action is NOT reversible!

↑ Top

delete

This subcommand will delete the embed with the given embed_id. If the given embed_id doesn’t follow the naming rules or the embed with embed_id doesn’t exist, no embed will be deleted and the user will be notified. Users have the option of confirming or cancelling the deletion. On confirmation, the embed will be removed from the server’s embed list. Please note that this action is NOT reversible!

↑ Top

setField

This subcommand will set a value based on args to the field field_name. If the field_name is invalid, then no field will be added and the user will be notified. We will call fields with only one argument, value, simple fields, and others complex fields. For simple fields, args will simply be value. For complex fields, users must provide a subfield and its corresponding value.

↑ Top

deleteField

This subcommand will remove a value or values based on the field_name from the field field_name. If the field_name is invalid, then no field will be deleted and the user will be notified. We will call fields with only one argument, value, simple fields, and others complex fields. For simple fields, simply pass in field_name with no args. For complex fields, if args are left empty, then the entire field will be deleted. Otherwise, specify which subfield with args. Unlike the separation of setField and addField, custom fields may be deleted using this subcommand. To delete custom field, set field_name as “field” and the args as the index of the custom field (starting at 0).

↑ Top

addField

This subcommand will add a custom field with “title” name and “description” value. If inline is passed as the last argument, the field will be inline. If name or value is missing, no field will be added and the user will be notified. This subcommand is different from setField as the custom field is unspecified.

↑ Top

Field Name

These are the field names as specified by Discord.js.

author

color

description

image

thumbnail

title

url