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

General

Endpoints related to general Husqy Modules Tempchannels.

GET - /modules/tempchannels/

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

GET - /modules/tempchannels/settings

Get the settings 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
  • ModuleDisabledError
  • InternalServerError
PUT - /modules/tempchannels/settings

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

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to change the tempchannels module settings for
voice_categoryyesintegerThe ID of category channel to use for tempchannels
text_categoryyesinteger(May be None) The ID of category channel to use for temporary text channels
create_textyesbooleanIf temporary text channels should be automatically created
voice_channel_nameyesstringThe name to give to tempchannels
text_channel_nameyesstring(May be None) The name to give to temporary text channels

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError
  • InternalServerError
DELETE - /modules/tempchannels/settings/delete

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

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

Endpoint to enable the tempchannels module for the specified guild.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to enable the tempchanenls module for
voice_categoryyesintegerThe ID of category channel to use for tempchannels
text_categoryyesinteger OR string(May be None) The ID of category channel to use for temporary text channels (may also be "same" if it should be the same as the voice category channel, this is only valid for this endpoint)
create_textyesbooleanIf temporary text channels should be automatically created
voice_channel_nameyesstringThe name to give to tempchannels
text_channel_nameyesstring(May be None) The name to give to temporary text channels

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleEnabledError
  • DatabaseError
  • InternalServerError
POST - /modules/tempchannels/disable

Endpoint to disable the tempchannels module for the specified guild.

Body data (JSON):

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

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError

Tempchannels

Endpoints related to the (possibly) known tempchannels of the module

GET - /modules/tempchannels/tempchannels

Get the current known active tempchannels of the specified guild.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to get the known tempchannels of

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
POST - /modules/tempchannels/tempchannel/check/add
danger

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

Endpoint to add a new tempchannel.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to check for the creation of the tempchannel
joined_channel_idyesintegerThe ID of the channel the member has joined and triggered the check

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError
POST - /modules/tempchannels/tempchannel/check/delete
danger

Do not use this endpoint yourself! Tempchannels will be deleted by Husqy when needed.

Endpoint to delete a known tempchannel.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to check for the deletion of the tempchannel
member_new_channelyesinteger(May be None) The ID of the new channel the member has joined and triggered the check
member_old_channelyesintegerThe ID of the old channel the member has left and triggered the check
connected_usersyesintegerThe amount of connected users in the left channel when the user who triggered the check had left

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError

Tempchannels settings

Endpoints related to the settings of the tempchannels

POST - /modules/tempchannels/tempchannel/edit/block

Endpoint to block users from a known tempchannel.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the target tempchannel is located
channel_idyesinteger(May be None) The ID of the channel where the /tempchannel edit command has been sent
message_idyesinteger(May be None) The ID of the message created by the /tempchannel edit command
target_tempchannel_idyesintegerThe ID of the target tempchannel
users_to_blockyeslistA list of user ID's to block from the tempchannel

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • NotFoundError
{
"success": False,
"data": {},
"error": {
"code": 404,
"message": "Not Found! {reason}",
},
},
POST - /modules/tempchannels/tempchannel/edit/claim

Endpoint to claim a known tempchannel that doesn't have an owner.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the target tempchannel is located
channel_idyesinteger(May be None) The ID of the channel where the /tempchannel edit command has been sent
message_idyesinteger(May be None) The ID of the message created by the /tempchannel edit command
target_tempchannel_idyesintegerThe ID of the target tempchannel

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • NotFoundError
{
"success": False,
"data": {},
"error": {
"code": 404,
"message": "Not Found! {reason}",
},
},
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
POST - /modules/tempchannels/tempchannel/edit/name

Endpoint to rename a known tempchannel.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the target tempchannel is located
channel_idyesinteger(May be None) The ID of the channel where the /tempchannel edit command has been sent
message_idyesinteger(May be None) The ID of the message created by the /tempchannel edit command
target_tempchannel_idyesintegerThe ID of the target tempchannel
tempchannel_nameyesstringThe new name for the tempchannel

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • NotFoundError
{
"success": False,
"data": {},
"error": {
"code": 404,
"message": "Not Found! {reason}",
},
},
POST - /modules/tempchannels/tempchannel/edit/onlyfor

Endpoint to limit the access to a specified role.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the target tempchannel is located
channel_idyesinteger(May be None) The ID of the channel where the /tempchannel edit command has been sent
message_idyesinteger(May be None) The ID of the message created by the /tempchannel edit command
target_tempchannel_idyesintegerThe ID of the target tempchannel
onlyfor_roleyesstringThe ID of the role to limit the access to the tempchannel to

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • NotFoundError
{
"success": False,
"data": {},
"error": {
"code": 404,
"message": "Not Found! {reason}",
},
},
POST - /modules/tempchannels/tempchannel/edit/slowmode

Endpoint to set the slowmode timeout for a tempchannel.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the target tempchannel is located
channel_idyesinteger(May be None) The ID of the channel where the /tempchannel edit command has been sent
message_idyesinteger(May be None) The ID of the message created by the /tempchannel edit command
target_tempchannel_idyesintegerThe ID of the target tempchannel
slowmode_secondsyesintegerThe amound of time in seconds to use for the slowmode delay

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
POST - /modules/tempchannels/tempchannel/edit/transfer

Endpoint to transfer ownership of a tempchannel to a new user.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the target tempchannel is located
channel_idyesinteger(May be None) The ID of the channel where the /tempchannel edit command has been sent
message_idyesinteger(May be None) The ID of the message created by the /tempchannel edit command
target_tempchannel_idyesintegerThe ID of the target tempchannel
new_owneryesintegerThe ID of the user who will be the new owner

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • NotFoundError
{
"success": False,
"data": {},
"error": {
"code": 404,
"message": "Not Found! {reason}",
},
},
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},
POST - /modules/tempchannels/tempchannel/edit/unblock

Endpoint to transfer ownership of a tempchannel to a new user.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the target tempchannel is located
channel_idyesinteger(May be None) The ID of the channel where the /tempchannel edit command has been sent
message_idyesinteger(May be None) The ID of the message created by the /tempchannel edit command
target_tempchannel_idyesintegerThe ID of the target tempchannel
users_to_unblockyeslistThe list of user ID's to unblock

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • NotFoundError
{
"success": False,
"data": {},
"error": {
"code": 404,
"message": "Not Found! {reason}",
},
},
POST - /modules/tempchannels/tempchannel/edit/user-limit

Endpoint to limit the amount of users who can join the tempchannel at once.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the target tempchannel is located
channel_idyesinteger(May be None) The ID of the channel where the /tempchannel edit command has been sent
message_idyesinteger(May be None) The ID of the message created by the /tempchannel edit command
target_tempchannel_idyesintegerThe ID of the target tempchannel
user_limityesintegerThe number of users who can be in the tempchannel at once

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • NotFoundError
{
"success": False,
"data": {},
"error": {
"code": 404,
"message": "Not Found! {reason}",
},
},
  • Unprocessable Entity
{
"success": False,
"data": {},
"error": {
"code": 422,
"message": "Unprocessable Entity! {reason}",
},
},

Privacy

Endpoints related to privacy and the tags module

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