Fixed gif avatars
This commit is contained in:
@ -663,17 +663,17 @@ namespace NadekoBot.Modules.Searches
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async Task Avatar(IUserMessage umsg, [Remainder] string mention = null)
|
||||
public async Task Avatar(IUserMessage umsg, [Remainder] IUser usr = null)
|
||||
{
|
||||
var channel = (ITextChannel)umsg.Channel;
|
||||
|
||||
var usr = umsg.MentionedUsers.FirstOrDefault();
|
||||
if (usr == null)
|
||||
{
|
||||
await channel.SendErrorAsync("Invalid user specified.").ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
await channel.SendMessageAsync(await NadekoBot.Google.ShortenUrl(usr.AvatarUrl).ConfigureAwait(false)).ConfigureAwait(false);
|
||||
usr = umsg.Author;
|
||||
|
||||
await channel.EmbedAsync(new EmbedBuilder().WithOkColor()
|
||||
.WithTitle($"{usr}'s Avatar")
|
||||
.WithImageUrl(usr.AvatarUrl)
|
||||
.Build()).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
[NadekoCommand, Usage, Description, Aliases]
|
||||
|
Reference in New Issue
Block a user