mirror of
https://github.com/Caraxi/mare.server.git
synced 2025-12-13 17:44:15 +01:00
add discord channel botlog
This commit is contained in:
parent
cad235eb1f
commit
e9ffde0824
8 changed files with 59 additions and 4 deletions
|
|
@ -219,6 +219,7 @@ public partial class MareWizardModule
|
|||
{
|
||||
services.DiscordVerifiedUsers[userid] = true;
|
||||
_logger.LogInformation("Relink: Verified {userid} from lodestone {lodestone}", userid, services.DiscordRelinkLodestoneMapping[userid]);
|
||||
await _botServices.LogToChannel($"<@{userid}> RELINK VERIFY: Success. ({url})").ConfigureAwait(false);
|
||||
services.DiscordRelinkLodestoneMapping.TryRemove(userid, out _);
|
||||
}
|
||||
else
|
||||
|
|
@ -226,11 +227,13 @@ public partial class MareWizardModule
|
|||
services.DiscordVerifiedUsers[userid] = false;
|
||||
_logger.LogInformation("Relink: Could not verify {userid} from lodestone {lodestone}, did not find authString: {authString}, status code was: {code}",
|
||||
userid, services.DiscordRelinkLodestoneMapping[userid], authString, response.StatusCode);
|
||||
await _botServices.LogToChannel($"<@{userid}> RELINK VERIFY: Failed: No Authstring. ({url})").ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.LogWarning("Could not verify {userid}, HttpStatusCode: {code}", userid, response.StatusCode);
|
||||
await _botServices.LogToChannel($"<@{userid}> RELINK VERIFY: Failed: HttpStatusCode {response.StatusCode}. ({url})").ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -266,6 +269,8 @@ public partial class MareWizardModule
|
|||
|
||||
await db.SaveChangesAsync().ConfigureAwait(false);
|
||||
|
||||
await _botServices.LogToChannel($"{Context.User.Mention} RELINK COMPLETE: => {user.UID}").ConfigureAwait(false);
|
||||
|
||||
return (user.UID, computedHash);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue