Changed some IUser to IGuildUser

This commit is contained in:
Kwoth 2017-04-25 04:27:58 +02:00
parent 185008e33b
commit 1c6e67ccf5
2 changed files with 7 additions and 4 deletions

View File

@ -161,8 +161,9 @@ namespace NadekoBot.Modules.Searches
} }
[NadekoCommand, Usage, Description, Aliases] [NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)]
[Priority(0)] [Priority(0)]
public Task Mal(IUser usr) => Mal(usr.Username); public Task Mal(IGuildUser usr) => Mal(usr.Username);
[NadekoCommand, Usage, Description, Aliases] [NadekoCommand, Usage, Description, Aliases]
public async Task Anime([Remainder] string query) public async Task Anime([Remainder] string query)

View File

@ -581,10 +581,11 @@ namespace NadekoBot.Modules.Searches
} }
[NadekoCommand, Usage, Description, Aliases] [NadekoCommand, Usage, Description, Aliases]
public async Task Revav([Remainder] IUser usr = null) [RequireContext(ContextType.Guild)]
public async Task Revav([Remainder] IGuildUser usr = null)
{ {
if (usr == null) if (usr == null)
usr = Context.User; usr = (IGuildUser)Context.User;
await Context.Channel.SendConfirmAsync($"https://images.google.com/searchbyimage?image_url={usr.RealAvatarUrl()}").ConfigureAwait(false); await Context.Channel.SendConfirmAsync($"https://images.google.com/searchbyimage?image_url={usr.RealAvatarUrl()}").ConfigureAwait(false);
} }
@ -633,7 +634,8 @@ namespace NadekoBot.Modules.Searches
} }
[NadekoCommand, Usage, Description, Aliases] [NadekoCommand, Usage, Description, Aliases]
public async Task Videocall(params IUser[] users) [RequireContext(ContextType.Guild)]
public async Task Videocall(params IGuildUser[] users)
{ {
var allUsrs = users.Append(Context.User); var allUsrs = users.Append(Context.User);
var allUsrsArray = allUsrs.ToArray(); var allUsrsArray = allUsrs.ToArray();