more Iuser to IGuildUser

This commit is contained in:
Kwoth 2017-04-25 06:53:03 +02:00
parent 1c6e67ccf5
commit 54f51a8ce1
3 changed files with 8 additions and 6 deletions

View File

@ -188,7 +188,7 @@ namespace NadekoBot.Modules.Gambling
private static readonly TimeSpan _divorceLimit = TimeSpan.FromHours(6);
[NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)]
public async Task Divorce([Remainder]IUser target)
public async Task Divorce([Remainder]IGuildUser target)
{
if (target.Id == Context.User.Id)
return;
@ -264,7 +264,7 @@ namespace NadekoBot.Modules.Gambling
private static readonly TimeSpan _affinityLimit = TimeSpan.FromMinutes(30);
[NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)]
public async Task WaifuClaimerAffinity([Remainder]IUser u = null)
public async Task WaifuClaimerAffinity([Remainder]IGuildUser u = null)
{
if (u?.Id == Context.User.Id)
{
@ -389,10 +389,10 @@ namespace NadekoBot.Modules.Gambling
[NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)]
public async Task WaifuInfo([Remainder]IUser target = null)
public async Task WaifuInfo([Remainder]IGuildUser target = null)
{
if (target == null)
target = Context.User;
target = (IGuildUser)Context.User;
WaifuInfo w;
IList<WaifuInfo> claims;
int divorces;

View File

@ -47,6 +47,7 @@ namespace NadekoBot.Modules.Gambling
[NadekoCommand, Usage, Description, Aliases]
[Priority(0)]
[RequireContext(ContextType.Guild)]
public async Task Cash([Remainder] IUser user = null)
{
if(user == null)

View File

@ -648,10 +648,11 @@ namespace NadekoBot.Modules.Searches
}
[NadekoCommand, Usage, Description, Aliases]
public async Task Avatar([Remainder] IUser usr = null)
[RequireContext(ContextType.Guild)]
public async Task Avatar([Remainder] IGuildUser usr = null)
{
if (usr == null)
usr = Context.User;
usr = (IGuildUser)Context.User;
var avatarUrl = usr.RealAvatarUrl();
var shortenedAvatarUrl = await NadekoBot.Google.ShortenUrl(avatarUrl).ConfigureAwait(false);