Working User Info Changes.
This commit is contained in:
@@ -55,10 +55,8 @@ public class LightlessModule : InteractionModuleBase
|
||||
var profileData = await GetUserProfileData(db, uidToGet).ConfigureAwait(false);
|
||||
if (profileData != null)
|
||||
{
|
||||
_logger.LogWarning("Fetching profile image for UID: {uid}", uidToGet);
|
||||
byte[] profileImage = GetProfileImage(profileData);
|
||||
byte[] bannerImage = GetBannerImage(profileData);
|
||||
_logger.LogWarning("Image in Bytes: {img}", profileImage);
|
||||
using MemoryStream profileImgStream = new(profileImage);
|
||||
using MemoryStream bannerImgStream = new(bannerImage);
|
||||
eb.WithThumbnailUrl("attachment://profileimage.png");
|
||||
@@ -602,10 +600,8 @@ public class LightlessModule : InteractionModuleBase
|
||||
}
|
||||
private byte[] GetProfileImage(UserProfileData profile)
|
||||
{
|
||||
_logger.LogWarning("Fetching image: {img}", profile.Base64ProfileImage);
|
||||
if (profile != null && profile.Base64ProfileImage != null && profile.Base64ProfileImage.Length > 0)
|
||||
{
|
||||
_logger.LogWarning("Fetching image complete");
|
||||
return Convert.FromBase64String(profile.Base64ProfileImage);
|
||||
}
|
||||
return Array.Empty<byte>();
|
||||
@@ -613,10 +609,8 @@ public class LightlessModule : InteractionModuleBase
|
||||
|
||||
private byte[] GetBannerImage(UserProfileData profile)
|
||||
{
|
||||
_logger.LogWarning("Fetching image: {img}", profile.Base64BannerImage);
|
||||
if (profile != null && profile.Base64BannerImage != null && profile.Base64BannerImage.Length > 0)
|
||||
{
|
||||
_logger.LogWarning("Fetching image complete");
|
||||
return Convert.FromBase64String(profile.Base64BannerImage);
|
||||
}
|
||||
return Array.Empty<byte>();
|
||||
|
||||
Reference in New Issue
Block a user