runs, performs features, doesn't crash
Some checks failed
gitea/vassago/pipeline/head There was a failure building this commit
gitea.arg.rip/vassago/pipeline/head There was a failure building this commit

This commit is contained in:
Adam R Grey 2024-07-13 18:59:10 -04:00
parent 7c22ae1643
commit 1b8a714a96
5 changed files with 21 additions and 7 deletions

View File

@ -22,7 +22,7 @@ public class GeneralSnarkCloudNative : Behavior
if(Behaver.Instance.IsSelf(message.Author.Id)) if(Behaver.Instance.IsSelf(message.Author.Id))
return false; return false;
if(message.Channel.EffectivePermissions.ReactionsPossible) if(!message.Channel.EffectivePermissions.ReactionsPossible)
return false; return false;
if((MeannessFilterLevel)message.Channel.EffectivePermissions.MeannessFilterLevel < MeannessFilterLevel.Medium) if((MeannessFilterLevel)message.Channel.EffectivePermissions.MeannessFilterLevel < MeannessFilterLevel.Medium)

View File

@ -42,7 +42,7 @@ public class GeneralSnarkMisspellDefinitely : Behavior
foreach(var k in snarkmap.Keys) foreach(var k in snarkmap.Keys)
{ {
if( Regex.IsMatch(message.Content, "\\b"+k+"\\b", RegexOptions.IgnoreCase)) if( Regex.IsMatch(message.Content?.ToLower(), "\\b"+k+"\\b", RegexOptions.IgnoreCase))
return true; return true;
} }
return false; return false;

View File

@ -112,7 +112,7 @@ namespace vassago.Conversion
accumulator = reverseConversion.Item4(accumulator); accumulator = reverseConversion.Item4(accumulator);
} }
} }
if (normalizedDestUnit == currencyConf.Base || currencyConf.rates.Select(r => r.Key).Contains(normalizedDestUnit)) if (currencyConf != null && (normalizedDestUnit == currencyConf.Base || currencyConf.rates.Select(r => r.Key).Contains(normalizedDestUnit)))
{ {
return $"{String.Format("approximately {0:0.00}", accumulator)} {normalizedDestUnit} as of {currencyConf.DateUpdated.ToLongDateString()}"; return $"{String.Format("approximately {0:0.00}", accumulator)} {normalizedDestUnit} as of {currencyConf.DateUpdated.ToLongDateString()}";
} }

View File

@ -138,10 +138,9 @@ public class DiscordInterface
var mentionOfMe = "<@" + client.CurrentUser.Id + ">"; var mentionOfMe = "<@" + client.CurrentUser.Id + ">";
m.MentionsMe = true; m.MentionsMe = true;
} }
if (await Behaver.Instance.ActOn(m)) await Behaver.Instance.ActOn(m);
{ m.ActedOn = true; // for its own ruposess it might act on it later, but either way, fuck it, we checked.
m.ActedOn = true;
}
_db.SaveChanges(); _db.SaveChanges();
} }

View File

@ -0,0 +1,15 @@
{
"ClassName": "System.ComponentModel.Win32Exception",
"Message": "An error occurred trying to start process 'convert' with working directory '/home/adam/Desktop/vassago'. No such file or directory",
"Data": null,
"InnerException": null,
"HelpURL": null,
"StackTraceString": " at System.Diagnostics.Process.ForkAndExecProcess(ProcessStartInfo startInfo, String resolvedFilename, String[] argv, String[] envp, String cwd, Boolean setCredentials, UInt32 userId, UInt32 groupId, UInt32[] groups, Int32& stdinFd, Int32& stdoutFd, Int32& stderrFd, Boolean usesTerminal, Boolean throwOnNoExec)\n at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)\n at vassago.ExternalProcess.GoPlz(String commandPath, String commandArguments) in /home/adam/Desktop/vassago/externalProcess.cs:line 30",
"RemoteStackTraceString": null,
"RemoteStackIndex": 0,
"ExceptionMethod": null,
"HResult": -2147467259,
"Source": "System.Diagnostics.Process",
"WatsonBuckets": null,
"NativeErrorCode": 2
}