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

View File

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

View File

@ -648,10 +648,11 @@ namespace NadekoBot.Modules.Searches
} }
[NadekoCommand, Usage, Description, Aliases] [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) if (usr == null)
usr = Context.User; usr = (IGuildUser)Context.User;
var avatarUrl = usr.RealAvatarUrl(); var avatarUrl = usr.RealAvatarUrl();
var shortenedAvatarUrl = await NadekoBot.Google.ShortenUrl(avatarUrl).ConfigureAwait(false); var shortenedAvatarUrl = await NadekoBot.Google.ShortenUrl(avatarUrl).ConfigureAwait(false);