Fixed gif avatars
This commit is contained in:
parent
8788b284bf
commit
b215710915
@ -1 +1 @@
|
||||
Subproject commit 508026d5d4f4d8780d983c63ab25e4c15ad69e59
|
||||
Subproject commit ae614b68b336941bf780b5f3c74bf7f6ea505316
|
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user