forked from adam/discord-bot-shtik
runs, performs features, doesn't crash
This commit is contained in:
parent
7c22ae1643
commit
1b8a714a96
@ -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)
|
||||||
|
@ -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;
|
||||||
|
@ -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()}";
|
||||||
}
|
}
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
15
fail133653846161056785/error0.err
Normal file
15
fail133653846161056785/error0.err
Normal 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
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user