some random formatting
This commit is contained in:
parent
7399f798bc
commit
e7f06c38b4
@ -49,7 +49,6 @@ namespace NadekoBot.Modules.Permissions.Classes
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (timeBlackList.Contains(user.Id))
|
if (timeBlackList.Contains(user.Id))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -150,7 +149,8 @@ namespace NadekoBot.Modules.Permissions.Classes
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddUserCooldown(ulong serverId, ulong userId, string commandName) {
|
public void AddUserCooldown(ulong serverId, ulong userId, string commandName)
|
||||||
|
{
|
||||||
commandCooldowns.TryAdd(commandName, userId);
|
commandCooldowns.TryAdd(commandName, userId);
|
||||||
var tosave = serverId + ":" + commandName;
|
var tosave = serverId + ":" + commandName;
|
||||||
Task.Run(async () =>
|
Task.Run(async () =>
|
||||||
@ -158,7 +158,8 @@ namespace NadekoBot.Modules.Permissions.Classes
|
|||||||
ServerPermissions perms;
|
ServerPermissions perms;
|
||||||
PermissionsHandler.PermissionsDict.TryGetValue(serverId, out perms);
|
PermissionsHandler.PermissionsDict.TryGetValue(serverId, out perms);
|
||||||
int cd;
|
int cd;
|
||||||
if (!perms.CommandCooldowns.TryGetValue(commandName,out cd)) {
|
if (!perms.CommandCooldowns.TryGetValue(commandName, out cd))
|
||||||
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (commandCooldowns.TryAdd(tosave, userId))
|
if (commandCooldowns.TryAdd(tosave, userId))
|
||||||
|
Loading…
Reference in New Issue
Block a user