You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 26, 2025. It is now read-only.
awaitcct.RespondAsync($"{cct.Message.Author.Mention} you must submit your token via a DM to avoid account takeover. Your token may have been exposed, an account relog is recommended.");
awaitctx.CreateResponseAsync(InteractionResponseType.ChannelMessageWithSource,newDiscordInteractionResponseBuilder().WithContent($"{ctx.User.Mention} you must submit your token via a DM to avoid account takeover. Your token may have been exposed, an account relog is recommended."));
28
+
return;
40
29
}
41
-
[Command("GenerateTokens"),Description("Export tokens from authentication url, run the command with no arguments for more info")]
awaitctx.CreateResponseAsync(InteractionResponseType.ChannelMessageWithSource,newDiscordInteractionResponseBuilder().WithContent($"Your token has been updated."));
awaitctx.CreateResponseAsync(InteractionResponseType.ChannelMessageWithSource,newDiscordInteractionResponseBuilder().WithContent($"Your token has been ingested. It will be used for all future commands coming from you. (Discord ID: {DiscordAuthorID})"));
41
+
}
42
+
43
+
[SlashCommand("GenerateTokens","Export tokens from authentication url, run the command with no arguments for more info")]
44
+
publicasyncTaskGenerateTokens(InteractionContextctx,[Option("TokenUrl","Authentication URL. Leave this blank to get usage instructions for this command.")]stringtokenuri=null)
awaitcct.RespondAsync($"{cct.Message.Author.Mention} you must submit your token via a DM to avoid account takeover. Your token may have been exposed, an account relog is recommended.");
awaitctx.CreateResponseAsync(InteractionResponseType.ChannelMessageWithSource,newDiscordInteractionResponseBuilder().WithContent($"{ctx.User.Mention} you must submit your token via a DM to avoid account takeover. Your token may have been exposed, an account relog is recommended."));
50
52
return;
51
53
}
52
54
53
55
if(tokenuri==null)
54
56
{
55
57
varinforesponse=newDiscordEmbedBuilder()
56
58
{
57
-
Title="Advanced info",
59
+
Title="Advanced info",
58
60
Description="The tokenuri parameter is the response from: \nhttps://login.live.com/oauth20_authorize.srf?display=touch&scope=service%3A%3Auser.auth.xboxlive.com%3A%3AMBI_SSL&redirect_uri=https%3A%2F%2Flogin.live.com%2Foauth20_desktop.srf&locale=en&response_type=token&client_id=0000000048093EE3, the full command should look something like:\n`generatetokens https://login.live.com/oauth20_desktop.srf?...access_token=...&refresh_token=...`"
e.Context.Client.DebugLogger.LogMessage(LogLevel.Info,"StoreBot",$"{e.Context.User.Username}:{e.Context.User.Id.ToString()} ran command '{e.Command.QualifiedName}'",DateTime.Now);
49
-
returnTask.CompletedTask;
47
+
sender.Client.Logger.LogInformation(newEventId(1337,"StoreBot"),$"{e.Context.User.Username} tried executing '{e.Context?.CommandName??"<unknown command>"}' but it errored: {e.Exception.GetType()}: {e.Exception.Message??"<no message>"}");
e.Context.Client.DebugLogger.LogMessage(LogLevel.Error,"StoreBot",$"{e.Context.User.Username} tried executing '{e.Command?.QualifiedName??"<unknown command>"}' but it errored: {e.Exception.GetType()}: {e.Exception.Message??"<no message>"}",DateTime.Now);
53
+
sender.Client.Logger.LogInformation(newEventId(1337,"StoreBot"),$"{e.Context.User.Username}:{e.Context.User.Id.ToString()} ran command '{e.Context.CommandName}'");
55
54
returnTask.CompletedTask;
56
55
}
57
56
@@ -65,8 +64,7 @@ public static async Task<DiscordConfiguration> LoadConfig()
65
64
Token=token,
66
65
TokenType=TokenType.Bot,
67
66
AutoReconnect=true,
68
-
LogLevel=LogLevel.Info,
69
-
UseInternalLogHandler=true
67
+
MinimumLogLevel=LogLevel.Information
70
68
};
71
69
returnconfigenv;
72
70
}
@@ -84,8 +82,7 @@ public static async Task<DiscordConfiguration> LoadConfig()
84
82
Token=cfgjson.Token,
85
83
TokenType=TokenType.Bot,
86
84
AutoReconnect=true,
87
-
LogLevel=LogLevel.Info,
88
-
UseInternalLogHandler=true
85
+
MinimumLogLevel=LogLevel.Information
89
86
};
90
87
returnconfig;
91
88
}
@@ -97,30 +94,16 @@ public static async Task Main(string[] args)
0 commit comments