add register in addition
This commit is contained in:
@@ -79,7 +79,7 @@ namespace MareSynchronosServer.Discord
|
|||||||
if (discordAuthedUser != null && discordAuthedUser.User != null)
|
if (discordAuthedUser != null && discordAuthedUser.User != null)
|
||||||
{
|
{
|
||||||
logger.LogInformation("User will be purged on next round of deletions: " + discordAuthedUser.User);
|
logger.LogInformation("User will be purged on next round of deletions: " + discordAuthedUser.User);
|
||||||
discordAuthedUser.User.LastLoggedIn = new DateTime(1900, 1, 1);
|
discordAuthedUser.User.LastLoggedIn = new DateTime(1900, 1, 1).ToUniversalTime();
|
||||||
db.Remove(discordAuthedUser);
|
db.Remove(discordAuthedUser);
|
||||||
await db.SaveChangesAsync();
|
await db.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
@@ -291,19 +291,25 @@ namespace MareSynchronosServer.Discord
|
|||||||
|
|
||||||
private async Task DiscordClient_Ready()
|
private async Task DiscordClient_Ready()
|
||||||
{
|
{
|
||||||
var cb = new SlashCommandBuilder();
|
var register = new SlashCommandBuilder();
|
||||||
cb.WithName("register");
|
register.WithName("register");
|
||||||
cb.WithDescription("Starts the registration process for the Mare Synchronos server of this Discord");
|
register.WithDescription("Starts the registration process for the Mare Synchronos server of this Discord");
|
||||||
cb.AddOption("forced", ApplicationCommandOptionType.SubCommand, "Will forcefully overwrite your current character on the service, if present", false, false);
|
register.AddOption("forced", ApplicationCommandOptionType.SubCommand, "Will forcefully overwrite your current character on the service, if present", false, false);
|
||||||
|
|
||||||
var cb2 = new SlashCommandBuilder();
|
var registerForced = new SlashCommandBuilder();
|
||||||
cb2.WithName("verify");
|
registerForced.WithName("register");
|
||||||
cb2.WithDescription("Finishes the registration process for the Mare Synchronos server of this Discord");
|
registerForced.WithDescription("Starts the registration process for the Mare Synchronos server of this Discord");
|
||||||
|
registerForced.AddOption("forced", ApplicationCommandOptionType.SubCommand, "Will forcefully overwrite your current character on the service, if present", false, false);
|
||||||
|
|
||||||
|
var verify = new SlashCommandBuilder();
|
||||||
|
verify.WithName("verify");
|
||||||
|
verify.WithDescription("Finishes the registration process for the Mare Synchronos server of this Discord");
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
await discordClient.CreateGlobalApplicationCommandAsync(cb.Build());
|
await discordClient.CreateGlobalApplicationCommandAsync(register.Build());
|
||||||
await discordClient.CreateGlobalApplicationCommandAsync(cb2.Build());
|
await discordClient.CreateGlobalApplicationCommandAsync(registerForced.Build());
|
||||||
|
await discordClient.CreateGlobalApplicationCommandAsync(verify.Build());
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user