Esempio n. 1
0
        /// <summary>
        /// Adds a role to a guild member.
        /// </summary>
        /// <param name="guildId"></param>
        /// <param name="userId"></param>
        /// <param name="roleId"></param>
        public async ValueTask AddGuildMemberRoleAsync(
            ulong guildId,
            ulong userId,
            ulong roleId)
        {
            var response = await RestClient.PutAsync(
                DiscordApiRoutes.GuildMemberRole(guildId, userId, roleId))
                           .ConfigureAwait(false);

            HandleErrors(response);
        }