add discord channel botlog
This commit is contained in:
@@ -225,6 +225,7 @@ public partial class MareWizardModule
|
||||
{
|
||||
services.DiscordVerifiedUsers[userid] = true;
|
||||
_logger.LogInformation("Verified {userid} from lodestone {lodestone}", userid, services.DiscordLodestoneMapping[userid]);
|
||||
await _botServices.LogToChannel($"<@{userid}> REGISTER VERIFY: Success.").ConfigureAwait(false);
|
||||
services.DiscordLodestoneMapping.TryRemove(userid, out _);
|
||||
}
|
||||
else
|
||||
@@ -232,11 +233,13 @@ public partial class MareWizardModule
|
||||
services.DiscordVerifiedUsers[userid] = false;
|
||||
_logger.LogInformation("Could not verify {userid} from lodestone {lodestone}, did not find authString: {authString}, status code was: {code}",
|
||||
userid, services.DiscordLodestoneMapping[userid], authString, response.StatusCode);
|
||||
await _botServices.LogToChannel($"<@{userid}> REGISTER VERIFY: Failed: No Authstring. ({url})").ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.LogWarning("Could not verify {userid}, HttpStatusCode: {code}", userid, response.StatusCode);
|
||||
await _botServices.LogToChannel($"<@{userid}> REGISTER VERIFY: Failed: HttpStatusCode {response.StatusCode}. ({url})").ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -283,6 +286,8 @@ public partial class MareWizardModule
|
||||
|
||||
_botServices.Logger.LogInformation("User registered: {userUID}:{hashedKey}", user.UID, hashedKey);
|
||||
|
||||
await _botServices.LogToChannel($"{Context.User.Mention} REGISTER COMPLETE: => {user.UID}").ConfigureAwait(false);
|
||||
|
||||
_botServices.DiscordVerifiedUsers.Remove(Context.User.Id, out _);
|
||||
|
||||
return (user.UID, computedHash);
|
||||
|
||||
Reference in New Issue
Block a user