We are now verified! Husqy is now a verified bot in Discord making us visible in the app discovery and enabling bigger trust to users!
Want to help us translate the Husqy responses? We can't do it without you! Please visit our translations repo!
Skip to main content

Husqy API autoresponder module

General

Endpoints related to general Husqy Modules Autoresponder.

GET - /modules/autoresponder/

Home endpoint for the Modules Autoresponder Husqy API. Returns only success message displaying that it is the Modules Autoresponder Husqy API route.

DELETE - /modules/autoresponder/delete

Delete all settings of the autoresponder module for a specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to delete the settings from

Possible errors:

  • BadRequestError

Status

Endpoints related to the status of the module

GET - /modules/autoresponder/status

Get the status of the autoresponder module for the specified guild.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to check the status of

Possible errors:

  • BadRequestError
  • SettingsError
POST - /modules/autoresponder/enable

Endpoint to enable the autoresponder module for the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to enable the autoresponder module for

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleEnabledError
  • DatabaseError
POST - /modules/autoresponder/disable

Endpoint to disable the autoresponder module for the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to disable the autoresponder module for

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError

Triggers

Endpoints related to the triggers of the module

GET - /modules/autoresponder/triggers

Get the list of triggers for the autoresponder module for the specified guild.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to return the entries from
pagenointegerThe page number to get (default = 1)
page_sizenointegerThe amount of entries to return in one page (default = 10)

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
POST - /modules/autoresponder/triggers

Create a new trigger for the autoresponder module in the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild for which to create the autoresponder trigger
trigger_typeyesintegerThe type of the trigger. Can be 1 for "Wildcard", 2 for "Contains", 3 for "Starts with" or 4 for "Ends with"
match_caseyesbooleanIndicated if the trigger matching is case sensitive
triggeryesstringThe trigger
allowed_channelsyeslistThe list of channel ID's to allow (may be an empty list when all channels are allowed)
ignored_channelsyeslistThe list of channel ID's to ignore
allowed_rolesyeslistThe list of role ID's to allow (may be an empty list when all roles are allowed)
ignored_rolesyeslistThe list of role ID's to ignore
response_idsyeslistThe list of response ID's to send when the trigger has been hit

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
GET - /modules/autoresponder/trigger/{trigger_id}

Get the details of the specified autoresponder trigger in the specified guild.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to return the details of the autoresponder trigger from

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
DELETE - /modules/autoresponder/trigger/{trigger_id}

Delete the specified autoresponder trigger in the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild for which to delete the trigger

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError
  • InternalServerError
PUT - /modules/autoresponder/trigger/{trigger_id}

Edit the specified autoresponder trigger in the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild for which to edit the trigger
trigger_typeyesintegerThe type of the trigger. Can be 1 for "Wildcard", 2 for "Contains", 3 for "Starts with" or 4 for "Ends with"
match_caseyesbooleanIndicated if the trigger matching is case sensitive
triggeryesstringThe trigger
allowed_channelsyeslistThe list of channel ID's to allow (may be an empty list when all channels are allowed)
ignored_channelsyeslistThe list of channel ID's to ignore
allowed_rolesyeslistThe list of role ID's to allow (may be an empty list when all roles are allowed)
ignored_rolesyeslistThe list of role ID's to ignore
response_idsyeslistThe list of response ID's to send when the trigger has been hit

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError
POST - /modules/autoresponder/check
danger

Do not use this endpoint yourself! Responses will be send by Husqy when needed.

Endpoint to check if an autoresponder trigger has to be send for the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to check the autoresponder entry for
origin_message_idyesintegerThe ID of the message the member send that triggered the check
channel_idyesintegerThe ID of the channel where the message that triggered the check is located
member_rolesyeslistA list of the member that send the triggering message their role ID's

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError

Responses

Endpoints related to the responses of the module

GET - /modules/autoresponder/responses

Get the list of responses for the autoresponder module for the specified guild.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to return the entries from
pagenointegerThe page number to get (default = 1)
page_sizenointegerThe amount of entries to return in one page (default = 10)

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
POST - /modules/autoresponder/responses

Create a new response for the autoresponder module in the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild for which to create the autoresponder trigger
response_typeyesintegerThe type of the response. Can be 1 for "Message", 2 for "Embed" or 3 for "Reaction"
response_contentyesstringThe content to respond with. Can also be Husqy embed configuration (JSON) or None (for Wildcard trigger type or Reaction response type)
emoji_nameyesstringThe literal emoji, f.e. 😁 or the name of the emoji when it is a custom guild emoji. Can also be None if response type is not Reaction
emoji_idyesintegerThe ID of the custom emoji. When using a default emoji, this can be None

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
GET - /modules/autoresponder/response/{response_id}

Get the details of the specified autoresponder response in the specified guild.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to return the details of the autoresponder response from

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
DELETE - /modules/autoresponder/response/{response_id}

Delete the specified autoresponder response in the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild for which to delete the response

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError

Privacy

Endpoints related to privacy and the tags module

GET - /modules/autoresponder/privacy/get-user-entries
danger

Do not use this endpoint yourself! This endpoint will be used by Husqy's Privacy configurator (/privacy) command.

Endpoint to get the amount of references in autoresponder to your user.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to get the specified references in
privacy_member_idyesintegerThe ID of the member who wants to check their references

Possible errors:

  • BadRequestError
  • ForbiddenError
  • InternalServerError
DELETE - /modules/autoresponder/privacy/delete-user-entries
danger

Do not use this endpoint yourself! This endpoint will be used by Husqy's Privacy configurator (/privacy) command.

Endpoint to delete the references in autoresponder to your user.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to delete the specified references in
privacy_member_idyesintegerThe ID of the member who wants to remove their references

Possible errors:

  • BadRequestError
  • ForbiddenError
  • InternalServerError