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

General

Endpoints related to general Husqy Modules Serverstats.

GET - /modules/serverstats/

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

GET - /modules/serverstats/settings

Get the settings of the serverstats 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/serverstats/settings

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

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to change the serverstats module settings for
counter_panel_enabledyesbooleanIf the counter panel should be enabled
counter_panel_category_channelyesintegerThe ID of the category channel to use for the counter panel
counter_panel_member_count_channelyesinteger(May be None) The ID of the channel to use for the display of current guild member count
counter_panel_online_member_count_channelyesinteger(May be None) The ID of the channel to use for the display of current online guild member count
counter_panel_custom_panels_createyeslist(May be []) A list of objects consisting of a channel_name key and role_id key to add as custom panels for online members with role
counter_panel_custom_panels_deleteyeslist(May be []) A list of channel ID's which are a custom panels for online members with role to remove
counter_panel_server_boost_number_channelyesinteger(May be None) The ID of the channel to use for the display of current guild boosts
starboard_enabledyesbooleanIf the starboard should be enabled
starboard_channelyesinteger(May be None) The ID of the channel to use as the channel where starred messages are highlighted
starboard_countyesinteger(May be None if starboard_enabled is false) The amount of stars a message should have before going on the starboard
stats_command_usageyesbooleanIf command statistics should be enabled
stats_message_statisticsyesbooleanIf message statistics should be enabled
stats_track_bot_messagesyesbooleanIf bot messages should be tracked as part of the message statistics
stats_functions_reminders_statistics_enabledyesbooleanIf reminders statistics should be enabled
stats_functions_giveaways_statistics_enabledyesbooleanIf giveaways statistics should be enabled
stats_modules_tempchannels_statistics_enabledyesbooleanIf tempchannels statistics should be enabled
stats_modules_autoresponder_statistics_enabledyesbooleanIf autoresponder statistics should be enabled
stats_modules_reactionroles_statistics_enabledyesbooleanIf reactionroles statistics should be enabled
stats_modules_tags_statistics_enabledyesbooleanIf command tags should be enabled
  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
  • DatabaseError
DELETE - /modules/serverstats/settings/delete

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

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

Endpoint to enable the serverstats module for the specified guild.

Body data (JSON):

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

Possible errors:

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

Endpoint to disable the serverstats module for the specified guild.

Body data (JSON):

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

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • DatabaseError
  • InternalServerError

Starboard

Endpoints related to starboards

POST - /modules/serverstats/starboard/add
danger

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

Endpoint to check a message for sending to the starboard channel.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the possible starboard message is located
channel_idyesintegerThe ID of the channel where the interacted message is located
message_idyesintegerThe ID of the message which is the interacted message

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
POST - /modules/serverstats/starboard/remove
danger

Do not use this endpoint yourself! Starboard messages will be removed by Husqy when needed.

Endpoint to check a message for sending to the starboard channel.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the possible starboard message is located
channel_idyesintegerThe ID of the channel where the interacted message is located
message_idyesintegerThe ID of the message which is the interacted message

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError

Statistics

Endpoints related to statistics

note

Statistics view endpoints will return a list of objects containing all information you need about the statistics.

POST - /modules/serverstats/stats/counter-panel/check-deleted-channel
danger

Do not use this endpoint yourself! Husqy will update the configuration when a channel that is a counter panel channel is deleted.

Endpoint to check if a channel is a counter panel channel and update the configuration.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the removed channel is located
channel_idyesintegerThe ID of the channel that is removed

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
POST - /modules/serverstats/stats/counter-panel/update
danger

Do not use this endpoint yourself! Husqy will update counter panel channels on a regular interval.

Endpoint to check if a channel is a counter panel channel and update the configuration.

Body data (JSON):

fieldrequiredtypedescription

Possible errors:

  • SettingsError
  • ModuleDisabledError
  • InternalServerError

Commands

POST - /modules/serverstats/stats/command/check

Endpoint to check if a command usage has to be added to the statistics.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the command has been executed
commandyesstringThe command that is executed

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
GET - /modules/serverstats/stats/command/view

Get the statistics of the command usage.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to check the status of
daysnointegerThe amount of days to return back (maximum is 30)
user_idnointegerThe ID of the user to filter the statistics for

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError

Messages

POST - /modules/serverstats/stats/message/check

Endpoint to check if a message has to be added to the statistics.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the message has been send
member_is_botyesbooleanIf the member is a bot
channel_idyesintegerThe ID of the channel where the message is sent
message_idyesintegerThe ID of the message that is sent

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
GET - /modules/serverstats/stats/message/view

Get the statistics of the messages.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to check the status of
daysnointegerThe amount of days to return back (maximum is 30)
user_idnointegerThe ID of the user to filter the statistics for
channel_idnointegerThe ID of the channel to filter the statistics for

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError

Functions

Reminders

POST - /modules/serverstats/stats/functions/reminders/created

Endpoint to check if a created reminder has to be added to the statistics.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the reminder has been created

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
GET - /modules/serverstats/stats/functions/reminders/created/view

Get the statistics of the created reminders.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to check the status of
daysnointegerThe amount of days to return back (maximum is 30)
user_idnointegerThe ID of the user to filter the statistics for

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
POST - /modules/serverstats/stats/functions/reminders/deleted

Endpoint to check if a deleted reminder has to be added to the statistics.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the reminder has been deleted

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
GET - /modules/serverstats/stats/functions/reminders/deleted/view

Get the statistics of the deleted reminders.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to check the status of
daysnointegerThe amount of days to return back (maximum is 30)
user_idnointegerThe ID of the user to filter the statistics for

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError

Giveaways

POST - /modules/serverstats/stats/functions/giveaways/responders

Endpoint to check if a giveaway response has to be added to the statistics.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the giveaway that has been responded to is located
old_giveaway_idyesstringThe ID of the giveaway that has been responded to

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
GET - /modules/serverstats/stats/functions/giveaways/responders/view

Get the statistics of the responders to giveaways.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to check the status of
daysnointegerThe amount of days to return back (maximum is 30)
user_idnointegerThe ID of the user to filter the statistics for

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
POST - /modules/serverstats/stats/functions/giveaways/created

Endpoint to check if a created giveaway has to be added to the statistics.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the giveaway has been created

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
GET - /modules/serverstats/stats/functions/giveaways/created/view

Get the statistics of the created giveaway.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to check the status of
daysnointegerThe amount of days to return back (maximum is 30)
user_idnointegerThe ID of the user to filter the statistics for

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
POST - /modules/serverstats/stats/functions/giveaways/deleted

Endpoint to check if a deleted giveaway has to be added to the statistics.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the giveaway has been deleted

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
GET - /modules/serverstats/stats/functions/giveaways/deleted/view

Get the statistics of the deleted giveaway.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to check the status of
daysnointegerThe amount of days to return back (maximum is 30)
user_idnointegerThe ID of the user to filter the statistics for

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError

Modules

Tempchannels

POST - /modules/serverstats/stats/modules/tempchannels/created

Endpoint to check if a created tempchannel has to be added to the statistics.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the tempchannel has been created
initial_creator_idyesintegerThe ID of the member creating the tempchannel

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
GET - /modules/serverstats/stats/modules/tempchannels/created/view

Get the statistics of the created tempchannels.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to check the status of
daysnointegerThe amount of days to return back (maximum is 30)
user_idnointegerThe ID of the user to filter the statistics for

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
POST - /modules/serverstats/stats/modules/tempchannels/creation-time

Endpoint to check if a creation time of a tempchannel has to be added to the statistics.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the tempchannel has been created
initial_creator_idyesintegerThe ID of the member creating the tempchannel
creation_time_delayyesintegerThe amount of time it took for the tempchannel to be created

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
GET - /modules/serverstats/stats/modules/tempchannels/creation-time/view

Get the statistics of the creation time of tempchannels.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to check the status of
daysnointegerThe amount of days to return back (maximum is 30)
user_idnointegerThe ID of the user to filter the statistics for

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError
POST - /modules/serverstats/stats/modules/tempchannels/deletion-time

Endpoint to check if a deletion time of a tempchannel has to be added to the statistics.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the tempchannel has been deleted
initial_creator_idyesintegerThe ID of the member who is the initial creator of the tempchannel
deletion_time_delayyesintegerThe amount of time it took for the tempchannel to be deleted

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
GET - /modules/serverstats/stats/modules/tempchannels/deletion-time/view

Get the statistics of the deletion time of tempchannels.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to check the status of
daysnointegerThe amount of days to return back (maximum is 30)
user_idnointegerThe ID of the user to filter the statistics for

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError

Reactionroles

POST - /modules/serverstats/stats/modules/reactionroles/check-time

Endpoint to check if a reactionrole check time should be added to the statistics.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the tempchannel has been deleted
check_time_delayyesintegerThe time it took for the reactionrole to be checked

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
GET - /modules/serverstats/stats/modules/reactionroles/check-time/view

Get the statistics of the check time of reactionroles.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to check the status of
daysnointegerThe amount of days to return back (maximum is 30)

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError

Tags

POST - /modules/serverstats/stats/modules/tags/send-time

Endpoint to check if a tag send time should be added to the statistics.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the tempchannel has been deleted
send_time_delayyesintegerThe time it took for the tag to be sent

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
GET - /modules/serverstats/stats/modules/tags/send-time/view

Get the statistics of the send time of tags.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to check the status of
daysnointegerThe amount of days to return back (maximum is 30)

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError

Autoresponder

POST - /modules/serverstats/stats/modules/autoresponder/response-time

Endpoint to check if a autoresponder response time should be added to the statistics.

Body data (JSON):

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild where the tempchannel has been deleted
response_time_delayyesintegerThe time it took for the autoresponder response to be checked

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
GET - /modules/serverstats/stats/modules/autoresponder/response-time/view

Get the statistics of the autoresponde response time.

Query string parameters:

fieldrequiredtypedescription
guild_idyesintegerThe ID of the guild to check the status of
daysnointegerThe amount of days to return back (maximum is 30)

Possible errors:

  • BadRequestError
  • SettingsError
  • ModuleDisabledError
  • InternalServerError

Privacy

Endpoints related to privacy and the tags module

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