forked from adam/discord-bot-shtik
Compare commits
3 Commits
b3eb7b1ff1
...
4c06a74410
Author | SHA1 | Date | |
---|---|---|---|
4c06a74410 | |||
4c93fd3ef8 | |||
25674e3af6 |
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,5 +1,6 @@
|
||||
appsettings.Development.json
|
||||
assets/exchangepairs.json
|
||||
fail*/
|
||||
|
||||
# ---> VisualStudio
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
|
@ -139,10 +139,11 @@ public class TwitchInterface
|
||||
|
||||
private async void Client_OnConnected(object sender, OnConnectedArgs e)
|
||||
{
|
||||
Console.WriteLine($"twitch marking selfaccount as seeninchannel {protocolAsChannel.Id}");
|
||||
var selfAccount = UpsertAccount(e.BotUsername, protocolAsChannel.Id);
|
||||
Behaver.Instance.MarkSelf(selfAccount);
|
||||
|
||||
await _db.SaveChangesAsync();
|
||||
Behaver.Instance.MarkSelf(selfAccount);
|
||||
|
||||
Console.WriteLine($"Connected to {e.AutoJoinChannel}");
|
||||
}
|
||||
@ -159,10 +160,12 @@ public class TwitchInterface
|
||||
|
||||
private Account UpsertAccount(string username, Guid inChannel)
|
||||
{
|
||||
var seenInChannel = _db.Channels.FirstOrDefault(c => c.Id == inChannel);
|
||||
var acc = _db.Accounts.FirstOrDefault(ui => ui.ExternalId == username && ui.SeenInChannel.Id == inChannel);
|
||||
if (acc == null)
|
||||
{
|
||||
acc = new Account();
|
||||
acc.SeenInChannel = seenInChannel;
|
||||
_db.Accounts.Add(acc);
|
||||
}
|
||||
acc.Username = username;
|
||||
|
@ -13,11 +13,11 @@ that's read messages/view channels, send messages, send messages in threads, and
|
||||
|
||||
### Accounts
|
||||
|
||||
a `User` can have multiple `Account`s. e.g., @adam:greyn.club? that's an "account". I, however, am a `User`. An `Account` has references to the `Channels` its seen in.
|
||||
a `User` can have multiple `Account`s. e.g., @adam:greyn.club? that's an "account". I, however, am a `User`. An `Account` has references to the `Channels` its seen in - as in, leaf-level. If you're in a subchannel, you'll have an appropriate listing there - i.e., you will never have an account in "discord (itself)", you'll have one in the guild text-channels
|
||||
|
||||
### Attachment
|
||||
|
||||
debating whether to save a copy of every single attachment. Discord allows 25MB attachments, and shtikbot lives in several art channels.
|
||||
debating whether to save a copy of every single attachment. Discord allows 100MB attachments for turbo users, and shtikbot lives in several art channels. (unfortunately, being that shtikbot doesn't have a viable SMS spam vector, it's limited to 8MB, in contradiction to discord itself reporting a server that doesn't agree to put its own name on discord's finer-grained rules has a limit of 10MB)
|
||||
|
||||
### Channel
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
{
|
||||
"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