mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Fix permission check in !level (#1957)
This commit is contained in:
@@ -1368,14 +1368,14 @@ namespace ArchiSteamFarm {
|
||||
throw new ArgumentNullException(nameof(steamID));
|
||||
}
|
||||
|
||||
if (!Bot.IsConnectedAndLoggedOn) {
|
||||
return FormatBotResponse(Strings.BotNotConnected);
|
||||
}
|
||||
|
||||
if (!Bot.HasPermission(steamID, BotConfig.EPermission.Master)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!Bot.IsConnectedAndLoggedOn) {
|
||||
return FormatBotResponse(Strings.BotNotConnected);
|
||||
}
|
||||
|
||||
uint? level = await Bot.ArchiHandler.GetLevel().ConfigureAwait(false);
|
||||
|
||||
return FormatBotResponse(level.HasValue ? string.Format(Strings.BotLevel, level.Value) : Strings.WarningFailed);
|
||||
|
||||
Reference in New Issue
Block a user