Added "Ask for Log File" message command with messages in various languages.

This commit is contained in:
pan.codes 2024-04-05 12:15:23 +02:00
parent 707a9fa5d8
commit aab1fad4e2
4 changed files with 46 additions and 0 deletions

View file

@ -35,6 +35,39 @@ namespace SMSModLogOutputAnalyzer
{ {
Console.WriteLine("Building module"); Console.WriteLine("Building module");
} }
[MessageCommand("Ask for Log file")]
public async Task AskForLog(IMessage message)
{
string title = "Please submit Log File";
string descr = "In order to assist you further, we are going to need your `BepInEx/LogOutput.log` file.";
if(message.Channel.Id == 1220431757266915400)
{
title = "Merci d'envoyer le fichier journal";
descr = "Afin de t'aider davantage, nous allons avoir besoin de ton fichier `BepInEx/LogOutput.log`.";
}
if(message.Channel.Id == 1220476339883216977)
{
title = "Bitte schick uns deine Log-Datei.";
descr = "Um dir weiterhelfen zu können, benötigen wir deine `BepInEx/LogOutput.log` Datei.";
}
if (message.Channel.Id == 1220488093124005909)
{
title = "Envía el archivo de registro";
descr = "Para poder ayudarte mejor, vamos a necesitar tu archivo `BepInEx/LogOutput.log`.";
}
if (message.Channel.Id == 1221180784598188082)
{
title = "Prześlij plik dziennika";
descr = "Aby pomóc Ci dalej, będziemy potrzebować Twojego pliku `BepInEx/LogOutput.log`.";
}
if (message.Channel.Id == 1225150931306549330)
{
title = "Por favor, envia o ficheiro de registo";
descr = "Para te podermos ajudar mais, vamos precisar do teu ficheiro `BepInEx/LogOutput.log`.";
}
var stream = new MemoryStream(Properties.Resources.LogOutput);
await RespondWithFileAsync(new FileAttachment(stream, "LogOutput.jpg"), "<@" + message.Author.Id + ">", embed: new EmbedBuilder().WithTitle(title).WithDescription(descr).WithImageUrl("attachment://LogOutput.jpg").Build());
}
[MessageCommand("Analyze Log")] [MessageCommand("Analyze Log")]
public async Task Analyze(IMessage message) public async Task Analyze(IMessage message)
{ {

View file

@ -76,5 +76,15 @@ namespace SMSModLogOutputAnalyzer.Properties {
return ResourceManager.GetString("Flowchart", resourceCulture); return ResourceManager.GetString("Flowchart", resourceCulture);
} }
} }
/// <summary>
/// Sucht eine lokalisierte Ressource vom Typ System.Byte[].
/// </summary>
internal static byte[] LogOutput {
get {
object obj = ResourceManager.GetObject("LogOutput", resourceCulture);
return ((byte[])(obj));
}
}
} }
} }

View file

@ -121,4 +121,7 @@
<data name="Flowchart" type="System.Resources.ResXFileRef, System.Windows.Forms"> <data name="Flowchart" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Flowchart.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value> <value>..\Resources\Flowchart.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
</data> </data>
<data name="LogOutput" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LogOutput.jpg;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
</root> </root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB