Updated Common files

This commit is contained in:
Toastie (DCS Team) 2024-07-07 18:10:58 +12:00
parent 3a36799941
commit 2d7f345c40
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4
5 changed files with 6 additions and 5 deletions

View file

@ -34,7 +34,7 @@ public sealed class Creds : IBotCredentials
Go to https://dashy.elliebot.net/me and login with your discord account
Go to the Keys page and click "Generate New Key" and copy it here
You and anyone else with the permission to run `.prompt` command will be able to use natural language to run bot's commands.
For example '@Bot how's the weather in Paris' will return the current weather in Paris as if you were to run `.weather Paris` command
For example '@Bot how's the weather in Paris' will return the current weather in Paris as if you were to run `.weather Paris` command.
""")]
public string EllieAiToken { get; set; }

View file

@ -11,5 +11,5 @@ public abstract class DbService
public abstract Task SetupAsync();
public abstract DbContext CreateRawDbContext(string dbType, string connString);
public abstract DbContext GetDbContext();
public abstract EllieContext GetDbContext();
}

View file

@ -29,7 +29,7 @@ public abstract class EllieInteractionBase
_onlyAuthor = onlyAuthor;
_singleUse = singleUse;
_clearAfter = clearAfter;
_interactionCompletedSource = new(TaskCreationOptions.RunContinuationsAsynchronously);
Client = client;

View file

@ -29,7 +29,8 @@ public class EllieInteractionService : IEllieInteractionService, IEService
Func<SocketMessageComponent, T, Task> onTrigger,
in T state,
bool singleUse = true,
bool clearAfter = true)
bool clearAfter = true
)
=> Create(userId,
button,
((Func<T, Func<SocketMessageComponent, Task>>)((data)

View file

@ -10,7 +10,7 @@ public sealed class EllieButtonInteractionHandler : EllieInteractionBase
bool onlyAuthor,
bool singleUse = true,
bool clearAfter = true)
: base(client, authorId, button.CustomId, onAction, onlyAuthor, singleUse)
: base(client, authorId, button.CustomId, onAction, onlyAuthor, singleUse, clearAfter)
{
Button = button;
}