Updated Common files
This commit is contained in:
parent
3a36799941
commit
2d7f345c40
5 changed files with 6 additions and 5 deletions
|
@ -34,7 +34,7 @@ public sealed class Creds : IBotCredentials
|
||||||
Go to https://dashy.elliebot.net/me and login with your discord account
|
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
|
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.
|
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; }
|
public string EllieAiToken { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -11,5 +11,5 @@ public abstract class DbService
|
||||||
public abstract Task SetupAsync();
|
public abstract Task SetupAsync();
|
||||||
|
|
||||||
public abstract DbContext CreateRawDbContext(string dbType, string connString);
|
public abstract DbContext CreateRawDbContext(string dbType, string connString);
|
||||||
public abstract DbContext GetDbContext();
|
public abstract EllieContext GetDbContext();
|
||||||
}
|
}
|
|
@ -29,7 +29,7 @@ public abstract class EllieInteractionBase
|
||||||
_onlyAuthor = onlyAuthor;
|
_onlyAuthor = onlyAuthor;
|
||||||
_singleUse = singleUse;
|
_singleUse = singleUse;
|
||||||
_clearAfter = clearAfter;
|
_clearAfter = clearAfter;
|
||||||
|
|
||||||
_interactionCompletedSource = new(TaskCreationOptions.RunContinuationsAsynchronously);
|
_interactionCompletedSource = new(TaskCreationOptions.RunContinuationsAsynchronously);
|
||||||
|
|
||||||
Client = client;
|
Client = client;
|
||||||
|
|
|
@ -29,7 +29,8 @@ public class EllieInteractionService : IEllieInteractionService, IEService
|
||||||
Func<SocketMessageComponent, T, Task> onTrigger,
|
Func<SocketMessageComponent, T, Task> onTrigger,
|
||||||
in T state,
|
in T state,
|
||||||
bool singleUse = true,
|
bool singleUse = true,
|
||||||
bool clearAfter = true)
|
bool clearAfter = true
|
||||||
|
)
|
||||||
=> Create(userId,
|
=> Create(userId,
|
||||||
button,
|
button,
|
||||||
((Func<T, Func<SocketMessageComponent, Task>>)((data)
|
((Func<T, Func<SocketMessageComponent, Task>>)((data)
|
||||||
|
|
|
@ -10,7 +10,7 @@ public sealed class EllieButtonInteractionHandler : EllieInteractionBase
|
||||||
bool onlyAuthor,
|
bool onlyAuthor,
|
||||||
bool singleUse = true,
|
bool singleUse = true,
|
||||||
bool clearAfter = true)
|
bool clearAfter = true)
|
||||||
: base(client, authorId, button.CustomId, onAction, onlyAuthor, singleUse)
|
: base(client, authorId, button.CustomId, onAction, onlyAuthor, singleUse, clearAfter)
|
||||||
{
|
{
|
||||||
Button = button;
|
Button = button;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue