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 greetings module

General

Endpoints related to general Husqy Modules Greetings.

GET - /modules/greetings/

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

GET - /modules/greetings/settings

Get the settings of the greetings module for the specified guild.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to check the status of

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
PUT - /modules/greetings/settings

Endpoint to change the settings of the greetings module for the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to change the greetings module settings for
greetings_in_guildyesbooleanIf the greetings in guild component should be enabled
greetings_in_guild_contentyesstring(May be None) The content to send to the greetings in guild channel
greetings_in_guild_typeyesstring(May be None) The type of response when a user joins a guild. May be "message" or "embed"
greetings_in_guild_channelyesinteger(May be None) The ID of the channel to use as the greetings in guild channel
greetings_to_useryesbooleanIf the greetings to user component should be enabled
greetings_to_user_contentyesstring(May be None) The content to send to the user
greetings_to_user_typeyesstring(May be None) The type of response when a user joins a guild. May be "message" or "embed"
leave_taking_in_guildyesbooleanIf the leave taking in guild component should be enabled
leave_taking_in_guild_contentyesstring(May be None) The content to send to the leave taking in guild channel
leave_taking_in_guild_typeyesstring(May be None) The type of response when a user leaves a guild. May be "message" or "embed"
leave_taking_in_guild_channelyesinteger(May be None) The ID of the channel to use as the leave taking channel
greetings_role_addyesbooleanIf the greetings role add component should be enabled
greetings_roleyesinteger(May be None) The ID of the role to add to a new member on join
warning

(May be None) in this context means that it may be none if that component is not going to be enabled, for example, if greetings_role_add is going to be false, greetings_role may be None!

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError
DELETE - /modules/greetings/settings/delete

Delete all settings of the greetings 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/greetings/status

Get the status of the greetings 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/greetings/enable

Endpoint to enable the greetings module for the specified guild.

Body data (JSON):

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

Possible errors:

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

Endpoint to disable the greetings module for the specified guild.

Body data (JSON):

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

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError

Function checks

Endpoint related to triggering the checking of sending greetings messages

POST - /modules/greetings/greeting/join-in-guild/check
danger

Do not use this endpoint yourself! Messages will be created by Husqy when needed.

Endpoint to check if the join in guild message should be send.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the member has joined

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
POST - /modules/greetings/greeting/join-role/check
danger

Do not use this endpoint yourself! Roles will be added by Husqy when needed.

Endpoint to check if the join role, role should be added.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the member has joined

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
POST - /modules/greetings/greeting/join-to-user/check
danger

Do not use this endpoint yourself! Messages will be created by Husqy when needed.

Endpoint to check if the join to user messages should be send.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the member has joined

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
POST - /modules/greetings/greeting/leave-in-guild/check
danger

Do not use this endpoint yourself! Messages will be created by Husqy when needed.

Endpoint to check if the leave taking in guild messages should be send.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the member has joined

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError

Privacy

Endpoints related to privacy and the tags module

GET - /modules/greetings/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 greetings 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/greetings/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 greetings 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