snowtransfer
Advanced tools
Comparing version 0.3.2 to 0.3.3
@@ -298,2 +298,25 @@ /** | ||
/** | ||
* | ||
* @param guildId Id of the guild | ||
* @param memberId Id of the guild member | ||
* @param data object with a reason and a communication_disabled_until property | ||
* @returns Resolves the Promise on successful execution | ||
* | Permissions deeded | Condition | | ||
* |--------------------|-----------| | ||
* | MODERATE_MEMBERS | always | | ||
* | ||
* @example | ||
* // Timeout a user with a reason and disable their communication for 1 week | ||
* let client = new SnowTransfer('TOKEN') | ||
* let timeoutData = { | ||
* reason: 'Bad words', | ||
* "communication_disabled_until": new Date(Date.now() + 604800000).toISOString() | ||
* } | ||
* client.guild.createGuildTimeout('guild Id', 'memberId', timeoutData) | ||
*/ | ||
createGuildTimeout(guildId: string, memberId: string, data: { | ||
reason?: string; | ||
communication_disabled_until?: string; | ||
}): Promise<void>; | ||
/** | ||
* Remove a ban of a user | ||
@@ -300,0 +323,0 @@ * @param guildId Id of the guild |
@@ -320,2 +320,24 @@ "use strict"; | ||
/** | ||
* | ||
* @param guildId Id of the guild | ||
* @param memberId Id of the guild member | ||
* @param data object with a reason and a communication_disabled_until property | ||
* @returns Resolves the Promise on successful execution | ||
* | Permissions deeded | Condition | | ||
* |--------------------|-----------| | ||
* | MODERATE_MEMBERS | always | | ||
* | ||
* @example | ||
* // Timeout a user with a reason and disable their communication for 1 week | ||
* let client = new SnowTransfer('TOKEN') | ||
* let timeoutData = { | ||
* reason: 'Bad words', | ||
* "communication_disabled_until": new Date(Date.now() + 604800000).toISOString() | ||
* } | ||
* client.guild.createGuildTimeout('guild Id', 'memberId', timeoutData) | ||
*/ | ||
async createGuildTimeout(guildId, memberId, data) { | ||
return this.requestHandler.request(Endpoints_1.default.GUILD_MEMBER(guildId, memberId), 'patch', 'json', data); | ||
} | ||
/** | ||
* Remove a ban of a user | ||
@@ -322,0 +344,0 @@ * @param guildId Id of the guild |
MIT License | ||
Copyright (c) 2018 DasWolke | ||
Copyright (c) 2021 DasWolke | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy |
{ | ||
"name": "snowtransfer", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"description": "Minimalistic Rest client for the Discord Api", | ||
@@ -39,11 +39,11 @@ "main": "./dist/index.js", | ||
"@types/node": "^16.0.1", | ||
"@typescript-eslint/eslint-plugin": "^5.3.0", | ||
"@typescript-eslint/parser": "^5.3.0", | ||
"eslint": "^8.2.0", | ||
"typedoc": "^0.22.7", | ||
"@typescript-eslint/eslint-plugin": "^5.8.0", | ||
"@typescript-eslint/parser": "^5.8.0", | ||
"eslint": "^8.5.0", | ||
"typedoc": "^0.22.10", | ||
"typedoc-plugin-mdn-links": "^1.0.4", | ||
"typedoc-plugin-missing-exports": "^0.22.4", | ||
"typescript": "^4.4.4" | ||
"typedoc-plugin-missing-exports": "^0.22.6", | ||
"typescript": "^4.5.4" | ||
}, | ||
"files": ["dist", "README.md", "LICENSE.md"] | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
284506
5799