-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae23d4d
commit 9505bf8
Showing
29 changed files
with
1,588 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/** | ||
* @module addRoleToUser | ||
* Adds a specified role to a user within a specific guild. | ||
* | ||
* @param guildId - The ID of the guild where the user and role are located. | ||
* @param userId - The ID of the user to whom the role will be added. | ||
* @param roleId - The ID of the role to be added to the user. | ||
* @returns A promise that resolves to void when the role is successfully added. | ||
* @throws Will throw an error if there is a problem adding the role. | ||
* | ||
* @example | ||
* const token = 'your_discord_token_here'; | ||
* const guildId = 'your_guild_id_here'; | ||
* const userId = 'your_user_id_here'; | ||
* const roleId = 'your_role_id_here'; | ||
* | ||
* const run = async () => { | ||
* try { | ||
* await addRoleToUser(token, guildId, userId, roleId); | ||
* console.log('Role added successfully.'); | ||
* } catch (error) { | ||
* console.error(`Error: ${error.message}`); | ||
* } | ||
* } | ||
* | ||
* run(); | ||
*/ | ||
export declare function addRoleToUser(token: string, guildId: string, userId: string, roleId: string): Promise<void>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
export declare const VERSION = "0.1.0"; | ||
export declare const VERSION = "0.1.1"; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.