mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-09 07:17:56 +00:00
bot: add birthday command
This commit is contained in:
parent
b42e052fee
commit
62dc2ce78e
7 changed files with 124 additions and 7 deletions
|
|
@ -9,6 +9,7 @@ using Discord.Commands;
|
|||
using Discord.Commands.Builders;
|
||||
using Discord.WebSocket;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using NodaTime;
|
||||
|
||||
namespace PluralKit.Bot
|
||||
{
|
||||
|
|
@ -32,6 +33,19 @@ namespace PluralKit.Bot
|
|||
}
|
||||
}
|
||||
|
||||
class PassthroughTypeHandler<T> : SqlMapper.TypeHandler<T>
|
||||
{
|
||||
public override void SetValue(IDbDataParameter parameter, T value)
|
||||
{
|
||||
parameter.Value = value;
|
||||
}
|
||||
|
||||
public override T Parse(object value)
|
||||
{
|
||||
return (T) value;
|
||||
}
|
||||
}
|
||||
|
||||
class PKSystemTypeReader : TypeReader
|
||||
{
|
||||
public override async Task<TypeReaderResult> ReadAsync(ICommandContext context, string input, IServiceProvider services)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue